2
0

Makefile 108 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0
  3. #
  4. default: all
  5. MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macosclassic m68k-embedded m68k-sinclairql m68k-human68k powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macosclassic powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-haiku x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-android x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros arm-freertos arm-ios powerpc64-linux powerpc64-freebsd powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android mipsel-ps1 mips64-linux mips64el-linux jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-freebsd aarch64-darwin aarch64-win64 aarch64-embedded aarch64-iphonesim aarch64-android aarch64-ios wasm32-embedded wasm32-wasip1 wasm32-wasip1threads wasm32-wasip2 sparc64-linux riscv32-linux riscv32-embedded riscv32-freertos riscv64-linux riscv64-embedded xtensa-linux xtensa-embedded xtensa-freertos z80-embedded z80-zxspectrum z80-msxdos z80-amstradcpc loongarch64-linux
  6. BSDs = freebsd netbsd openbsd darwin dragonfly
  7. UNIXs = linux $(BSDs) solaris qnx haiku aix
  8. LIMIT83fs = go32v2 os2 emx watcom msdos win16 atari human68k
  9. OSNeedsComspecToRunBatch = go32v2 watcom
  10. FORCE:
  11. .PHONY: FORCE
  12. lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
  13. override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
  14. ifneq ($(findstring darwin,$(OSTYPE)),)
  15. inUnix=1 #darwin
  16. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  17. else
  18. ifeq ($(findstring ;,$(PATH)),)
  19. inUnix=1
  20. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  21. else
  22. SEARCHPATH:=$(subst ;, ,$(PATH))
  23. endif
  24. endif
  25. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  26. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  27. ifeq ($(PWD),)
  28. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  29. ifeq ($(PWD),)
  30. $(error You need the GNU utils package to use this Makefile)
  31. else
  32. PWD:=$(firstword $(PWD))
  33. SRCEXEEXT=
  34. endif
  35. else
  36. PWD:=$(firstword $(PWD))
  37. SRCEXEEXT=.exe
  38. endif
  39. ifndef inUnix
  40. ifeq ($(OS),Windows_NT)
  41. inWinNT=1
  42. else
  43. ifdef OS2_SHELL
  44. inOS2=1
  45. endif
  46. endif
  47. else
  48. ifneq ($(findstring cygdrive,$(PATH)),)
  49. inCygWin=1
  50. endif
  51. endif
  52. ifdef inUnix
  53. SRCBATCHEXT=.sh
  54. else
  55. ifdef inOS2
  56. SRCBATCHEXT=.cmd
  57. else
  58. SRCBATCHEXT=.bat
  59. endif
  60. endif
  61. ifdef COMSPEC
  62. ifneq ($(filter $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
  63. ifndef RUNBATCH
  64. RUNBATCH=$(COMSPEC) /C
  65. endif
  66. endif
  67. endif
  68. ifdef inUnix
  69. PATHSEP=/
  70. else
  71. PATHSEP:=$(subst /,\,/)
  72. ifdef inCygWin
  73. PATHSEP=/
  74. endif
  75. endif
  76. ifdef PWD
  77. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  78. ifdef inCygWin
  79. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  80. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  81. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  82. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  83. endif
  84. endif
  85. else
  86. BASEDIR=.
  87. endif
  88. ifdef inOS2
  89. ifndef ECHO
  90. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  91. ifeq ($(ECHO),)
  92. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  93. ifeq ($(ECHO),)
  94. ECHO=echo
  95. else
  96. ECHO:=$(firstword $(ECHO))
  97. endif
  98. else
  99. ECHO:=$(firstword $(ECHO))
  100. endif
  101. endif
  102. export ECHO
  103. endif
  104. override DEFAULT_FPCDIR=../../..
  105. ifndef FPC
  106. ifdef PP
  107. FPC=$(PP)
  108. endif
  109. endif
  110. ifndef FPC
  111. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  112. ifneq ($(FPCPROG),)
  113. FPCPROG:=$(firstword $(FPCPROG))
  114. ifneq ($(CPU_TARGET),)
  115. FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
  116. else
  117. FPC:=$(shell $(FPCPROG) -PB)
  118. endif
  119. ifneq ($(findstring Error,$(FPC)),)
  120. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  121. else
  122. ifeq ($(strip $(wildcard $(FPC))),)
  123. FPC:=$(firstword $(FPCPROG))
  124. endif
  125. endif
  126. else
  127. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  128. endif
  129. endif
  130. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  131. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  132. FOUNDFPC:=$(strip $(wildcard $(FPC)))
  133. ifeq ($(FOUNDFPC),)
  134. FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
  135. ifeq ($(FOUNDFPC),)
  136. $(error Compiler $(FPC) not found)
  137. endif
  138. endif
  139. ifndef FPC_COMPILERINFO
  140. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  141. endif
  142. ifndef FPC_VERSION
  143. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  144. endif
  145. export FPC FPC_VERSION FPC_COMPILERINFO
  146. unexport CHECKDEPEND ALLDEPENDENCIES
  147. ifndef CPU_TARGET
  148. ifdef CPU_TARGET_DEFAULT
  149. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  150. endif
  151. endif
  152. ifndef OS_TARGET
  153. ifdef OS_TARGET_DEFAULT
  154. OS_TARGET=$(OS_TARGET_DEFAULT)
  155. endif
  156. endif
  157. ifndef CPU_SOURCE
  158. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  159. endif
  160. ifndef CPU_TARGET
  161. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  162. endif
  163. ifndef OS_SOURCE
  164. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  165. endif
  166. ifndef OS_TARGET
  167. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  168. endif
  169. CPU_OS_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  170. ifdef SUB_TARGET
  171. L_SUB_TARGET=$(call lc,$(SUB_TARGET))
  172. FULL_TARGET:=$(CPU_TARGET)-$(OS_TARGET)-$(L_SUB_TARGET)
  173. else
  174. FULL_TARGET:=$(CPU_TARGET)-$(OS_TARGET)
  175. endif
  176. CPU_OS_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  177. ifdef SUB_SOURCE
  178. L_SUB_SOURCE=$(call lc,$(SUB_SOURCE))
  179. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)-$(L_SUB_SOURCE)
  180. else
  181. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  182. endif
  183. ifeq ($(CPU_TARGET),armeb)
  184. ARCH=arm
  185. override FPCOPT+=-Cb
  186. else
  187. ifeq ($(CPU_TARGET),armel)
  188. ARCH=arm
  189. override FPCOPT+=-CaEABI
  190. else
  191. ARCH=$(CPU_TARGET)
  192. endif
  193. endif
  194. ifeq ($(CPU_OS_TARGET),aarch64-embedded)
  195. endif
  196. ifdef SUB_TARGET
  197. FPCOPT+=-t$(SUB_TARGET)
  198. FPMAKE_OPT+=--subtarget=$(SUB_TARGET)
  199. endif
  200. ifeq ($(CPU_OS_TARGET),arm-embedded)
  201. ifeq ($(SUBARCH),)
  202. $(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
  203. endif
  204. override FPCOPT+=-Cp$(SUBARCH)
  205. endif
  206. ifeq ($(CPU_OS_TARGET),avr-embedded)
  207. ifeq ($(SUBARCH),)
  208. $(error When compiling for avr-embedded, a sub-architecture (e.g. SUBARCH=avr25 or SUBARCH=avr35) must be defined)
  209. endif
  210. override FPCOPT+=-Cp$(SUBARCH)
  211. endif
  212. ifeq ($(CPU_OS_TARGET),mipsel-embedded)
  213. ifeq ($(SUBARCH),)
  214. $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic32mx) must be defined)
  215. endif
  216. override FPCOPT+=-Cp$(SUBARCH)
  217. endif
  218. ifeq ($(CPU_OS_TARGET),xtensa-embedded)
  219. ifeq ($(SUBARCH),)
  220. $(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
  221. endif
  222. override FPCOPT+=-Cp$(SUBARCH)
  223. endif
  224. ifeq ($(CPU_OS_TARGET),xtensa-freertos)
  225. ifeq ($(SUBARCH),)
  226. $(error When compiling for xtensa-freertos, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
  227. endif
  228. override FPCOPT+=-Cp$(SUBARCH)
  229. endif
  230. ifeq ($(CPU_OS_TARGET),arm-freertos)
  231. ifeq ($(SUBARCH),)
  232. $(error When compiling for arm-freertos, a sub-architecture (e.g. SUBARCH=armv6m or SUBARCH=armv7em) must be defined)
  233. endif
  234. override FPCOPT+=-Cp$(SUBARCH)
  235. endif
  236. ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
  237. TARGETSUFFIX=$(OS_TARGET)
  238. SOURCESUFFIX=$(OS_SOURCE)
  239. else
  240. ifneq ($(filter $(OS_TARGET),$(LIMIT83fs)),)
  241. TARGETSUFFIX=$(OS_TARGET)
  242. else
  243. TARGETSUFFIX=$(FULL_TARGET)
  244. endif
  245. SOURCESUFFIX=$(FULL_SOURCE)
  246. endif
  247. ifneq ($(CPU_OS_TARGET),$(CPU_OS_SOURCE))
  248. CROSSCOMPILE=1
  249. endif
  250. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  251. ifeq ($(filter $(CPU_OS_TARGET),$(MAKEFILETARGETS)),)
  252. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  253. endif
  254. endif
  255. ifneq ($(filter $(OS_TARGET),$(BSDs)),)
  256. BSDhier=1
  257. endif
  258. ifeq ($(OS_TARGET),linux)
  259. linuxHier=1
  260. endif
  261. ifndef CROSSCOMPILE
  262. BUILDFULLNATIVE=1
  263. export BUILDFULLNATIVE
  264. endif
  265. ifdef BUILDFULLNATIVE
  266. BUILDNATIVE=1
  267. export BUILDNATIVE
  268. endif
  269. export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE SUB_TARGET SUB_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE CPU_OS_TARGET CPU_OS_SOURCE
  270. ifdef FPCDIR
  271. override FPCDIR:=$(subst \,/,$(FPCDIR))
  272. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  273. override FPCDIR=wrong
  274. endif
  275. else
  276. override FPCDIR=wrong
  277. endif
  278. ifdef DEFAULT_FPCDIR
  279. ifeq ($(FPCDIR),wrong)
  280. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  281. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  282. override FPCDIR=wrong
  283. endif
  284. endif
  285. endif
  286. ifeq ($(FPCDIR),wrong)
  287. ifdef inUnix
  288. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  289. ifeq ($(wildcard $(FPCDIR)/units),)
  290. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  291. endif
  292. else
  293. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  294. override FPCDIR:=$(FPCDIR)/..
  295. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  296. override FPCDIR:=$(FPCDIR)/..
  297. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  298. override FPCDIR:=$(BASEDIR)
  299. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  300. override FPCDIR=c:/pp
  301. endif
  302. endif
  303. endif
  304. endif
  305. endif
  306. ifndef CROSSBINDIR
  307. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  308. endif
  309. ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
  310. ifneq ($(filter $(OS_SOURCE),darwin ios),)
  311. DARWIN2DARWIN=1
  312. endif
  313. endif
  314. ifndef BINUTILSPREFIX
  315. ifndef CROSSBINDIR
  316. ifdef CROSSCOMPILE
  317. ifneq ($(OS_TARGET),msdos)
  318. ifndef DARWIN2DARWIN
  319. ifneq ($(CPU_TARGET),jvm)
  320. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  321. ifeq ($(OS_TARGET),android)
  322. ifeq ($(CPU_TARGET),arm)
  323. BINUTILSPREFIX=arm-linux-androideabi-
  324. else
  325. ifeq ($(CPU_TARGET),i386)
  326. BINUTILSPREFIX=i686-linux-android-
  327. else
  328. BINUTILSPREFIX=$(CPU_TARGET)-linux-android-
  329. endif
  330. endif
  331. endif
  332. endif
  333. endif
  334. else
  335. BINUTILSPREFIX=$(OS_TARGET)-
  336. endif
  337. endif
  338. endif
  339. endif
  340. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  341. ifeq ($(UNITSDIR),)
  342. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  343. endif
  344. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
  345. ifndef FPCFPMAKE
  346. ifdef CROSSCOMPILE
  347. ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
  348. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  349. ifneq ($(FPCPROG),)
  350. FPCPROG:=$(firstword $(FPCPROG))
  351. FPCFPMAKE:=$(shell $(FPCPROG) -PB)
  352. ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
  353. FPCFPMAKE:=$(firstword $(FPCPROG))
  354. endif
  355. else
  356. override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  357. endif
  358. else
  359. FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
  360. FPMAKE_SKIP_CONFIG=-n
  361. export FPCFPMAKE
  362. export FPMAKE_SKIP_CONFIG
  363. endif
  364. else
  365. FPMAKE_SKIP_CONFIG=-n
  366. FPCFPMAKE=$(FPC)
  367. endif
  368. endif
  369. override PACKAGE_NAME=ide
  370. PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ide/Makefile.fpc,$(PACKAGESDIR))))))
  371. COMPILERDIR=$(FPCDIR)/compiler
  372. ifneq ($(findstring 1.0.2,$(FPC_VERSION)),)
  373. override FPCOPT+=-Ca
  374. endif
  375. ifneq ($(findstring 1.0.4,$(FPC_VERSION)),)
  376. override FPCOPT+=-Ca
  377. endif
  378. ifndef PPC_TARGET
  379. PPC_TARGET=$(CPU_TARGET)
  380. endif
  381. override NOCPUDEF=1
  382. override FPCOPT+= -d$(PPC_TARGET)
  383. override FPCOPT+=-dBrowserCol -dGDB
  384. ifeq ($(PPC_TARGET),i386)
  385. override FPCOPT+= -Fu$(COMPILERDIR)/x86
  386. endif
  387. ifeq ($(PPC_TARGET),x86_64)
  388. override FPCOPT+= -Fu$(COMPILERDIR)/x86 -dNOOPT
  389. endif
  390. ifeq ($(PPC_TARGET),i8086)
  391. override FPCOPT+= -Fu$(COMPILERDIR)/x86
  392. endif
  393. ifeq ($(PPC_TARGET),powerpc)
  394. override FPCOPT+= -Fu$(COMPILERDIR)/ppcgen
  395. endif
  396. ifeq ($(PPC_TARGET),powerpc64)
  397. override FPCOPT+= -Fu$(COMPILERDIR)/ppcgen
  398. endif
  399. ifeq ($(PPC_TARGET),mipsel)
  400. override FPCOPT+= -Fu$(COMPILERDIR)/mips
  401. endif
  402. ifeq ($(PPC_TARGET),sparc)
  403. override FPCOPT+= -Fu$(COMPILERDIR)/sparcgen -Fi$(COMPILERDIR)/sparcgen
  404. endif
  405. ifeq ($(PPC_TARGET),sparc64)
  406. override FPCOPT+= -Fu$(COMPILERDIR)/sparcgen -Fi$(COMPILERDIR)/sparcgen
  407. endif
  408. ifeq ($(PPC_TARGET),wasm32)
  409. override FPCOPT+= -dNOOPT
  410. endif
  411. ifeq ($(PPC_TARGET),riscv32)
  412. override LOCALOPT+=-Furiscv
  413. endif
  414. ifeq ($(PPC_TARGET),riscv64)
  415. override LOCALOPT+=-Furiscv
  416. endif
  417. ifeq ($(CPU_OS_TARGET),i386-linux)
  418. override TARGET_UNITS+=compunit
  419. endif
  420. ifeq ($(CPU_OS_TARGET),i386-go32v2)
  421. override TARGET_UNITS+=compunit
  422. endif
  423. ifeq ($(CPU_OS_TARGET),i386-win32)
  424. override TARGET_UNITS+=compunit
  425. endif
  426. ifeq ($(CPU_OS_TARGET),i386-os2)
  427. override TARGET_UNITS+=compunit
  428. endif
  429. ifeq ($(CPU_OS_TARGET),i386-freebsd)
  430. override TARGET_UNITS+=compunit
  431. endif
  432. ifeq ($(CPU_OS_TARGET),i386-beos)
  433. override TARGET_UNITS+=compunit
  434. endif
  435. ifeq ($(CPU_OS_TARGET),i386-haiku)
  436. override TARGET_UNITS+=compunit
  437. endif
  438. ifeq ($(CPU_OS_TARGET),i386-netbsd)
  439. override TARGET_UNITS+=compunit
  440. endif
  441. ifeq ($(CPU_OS_TARGET),i386-solaris)
  442. override TARGET_UNITS+=compunit
  443. endif
  444. ifeq ($(CPU_OS_TARGET),i386-qnx)
  445. override TARGET_UNITS+=compunit
  446. endif
  447. ifeq ($(CPU_OS_TARGET),i386-netware)
  448. override TARGET_UNITS+=compunit
  449. endif
  450. ifeq ($(CPU_OS_TARGET),i386-openbsd)
  451. override TARGET_UNITS+=compunit
  452. endif
  453. ifeq ($(CPU_OS_TARGET),i386-wdosx)
  454. override TARGET_UNITS+=compunit
  455. endif
  456. ifeq ($(CPU_OS_TARGET),i386-darwin)
  457. override TARGET_UNITS+=compunit
  458. endif
  459. ifeq ($(CPU_OS_TARGET),i386-emx)
  460. override TARGET_UNITS+=compunit
  461. endif
  462. ifeq ($(CPU_OS_TARGET),i386-watcom)
  463. override TARGET_UNITS+=compunit
  464. endif
  465. ifeq ($(CPU_OS_TARGET),i386-netwlibc)
  466. override TARGET_UNITS+=compunit
  467. endif
  468. ifeq ($(CPU_OS_TARGET),i386-wince)
  469. override TARGET_UNITS+=compunit
  470. endif
  471. ifeq ($(CPU_OS_TARGET),i386-embedded)
  472. override TARGET_UNITS+=compunit
  473. endif
  474. ifeq ($(CPU_OS_TARGET),i386-symbian)
  475. override TARGET_UNITS+=compunit
  476. endif
  477. ifeq ($(CPU_OS_TARGET),i386-nativent)
  478. override TARGET_UNITS+=compunit
  479. endif
  480. ifeq ($(CPU_OS_TARGET),i386-iphonesim)
  481. override TARGET_UNITS+=compunit
  482. endif
  483. ifeq ($(CPU_OS_TARGET),i386-android)
  484. override TARGET_UNITS+=compunit
  485. endif
  486. ifeq ($(CPU_OS_TARGET),i386-aros)
  487. override TARGET_UNITS+=compunit
  488. endif
  489. ifeq ($(CPU_OS_TARGET),m68k-linux)
  490. override TARGET_UNITS+=compunit
  491. endif
  492. ifeq ($(CPU_OS_TARGET),m68k-netbsd)
  493. override TARGET_UNITS+=compunit
  494. endif
  495. ifeq ($(CPU_OS_TARGET),m68k-amiga)
  496. override TARGET_UNITS+=compunit
  497. endif
  498. ifeq ($(CPU_OS_TARGET),m68k-atari)
  499. override TARGET_UNITS+=compunit
  500. endif
  501. ifeq ($(CPU_OS_TARGET),m68k-palmos)
  502. override TARGET_UNITS+=compunit
  503. endif
  504. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  505. override TARGET_UNITS+=compunit
  506. endif
  507. ifeq ($(CPU_OS_TARGET),m68k-embedded)
  508. override TARGET_UNITS+=compunit
  509. endif
  510. ifeq ($(CPU_OS_TARGET),m68k-sinclairql)
  511. override TARGET_UNITS+=compunit
  512. endif
  513. ifeq ($(CPU_OS_TARGET),m68k-human68k)
  514. override TARGET_UNITS+=compunit
  515. endif
  516. ifeq ($(CPU_OS_TARGET),powerpc-linux)
  517. override TARGET_UNITS+=compunit
  518. endif
  519. ifeq ($(CPU_OS_TARGET),powerpc-netbsd)
  520. override TARGET_UNITS+=compunit
  521. endif
  522. ifeq ($(CPU_OS_TARGET),powerpc-amiga)
  523. override TARGET_UNITS+=compunit
  524. endif
  525. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  526. override TARGET_UNITS+=compunit
  527. endif
  528. ifeq ($(CPU_OS_TARGET),powerpc-darwin)
  529. override TARGET_UNITS+=compunit
  530. endif
  531. ifeq ($(CPU_OS_TARGET),powerpc-morphos)
  532. override TARGET_UNITS+=compunit
  533. endif
  534. ifeq ($(CPU_OS_TARGET),powerpc-embedded)
  535. override TARGET_UNITS+=compunit
  536. endif
  537. ifeq ($(CPU_OS_TARGET),powerpc-wii)
  538. override TARGET_UNITS+=compunit
  539. endif
  540. ifeq ($(CPU_OS_TARGET),powerpc-aix)
  541. override TARGET_UNITS+=compunit
  542. endif
  543. ifeq ($(CPU_OS_TARGET),sparc-linux)
  544. override TARGET_UNITS+=compunit
  545. endif
  546. ifeq ($(CPU_OS_TARGET),sparc-netbsd)
  547. override TARGET_UNITS+=compunit
  548. endif
  549. ifeq ($(CPU_OS_TARGET),sparc-solaris)
  550. override TARGET_UNITS+=compunit
  551. endif
  552. ifeq ($(CPU_OS_TARGET),sparc-embedded)
  553. override TARGET_UNITS+=compunit
  554. endif
  555. ifeq ($(CPU_OS_TARGET),x86_64-linux)
  556. override TARGET_UNITS+=compunit
  557. endif
  558. ifeq ($(CPU_OS_TARGET),x86_64-freebsd)
  559. override TARGET_UNITS+=compunit
  560. endif
  561. ifeq ($(CPU_OS_TARGET),x86_64-haiku)
  562. override TARGET_UNITS+=compunit
  563. endif
  564. ifeq ($(CPU_OS_TARGET),x86_64-netbsd)
  565. override TARGET_UNITS+=compunit
  566. endif
  567. ifeq ($(CPU_OS_TARGET),x86_64-solaris)
  568. override TARGET_UNITS+=compunit
  569. endif
  570. ifeq ($(CPU_OS_TARGET),x86_64-openbsd)
  571. override TARGET_UNITS+=compunit
  572. endif
  573. ifeq ($(CPU_OS_TARGET),x86_64-darwin)
  574. override TARGET_UNITS+=compunit
  575. endif
  576. ifeq ($(CPU_OS_TARGET),x86_64-win64)
  577. override TARGET_UNITS+=compunit
  578. endif
  579. ifeq ($(CPU_OS_TARGET),x86_64-embedded)
  580. override TARGET_UNITS+=compunit
  581. endif
  582. ifeq ($(CPU_OS_TARGET),x86_64-iphonesim)
  583. override TARGET_UNITS+=compunit
  584. endif
  585. ifeq ($(CPU_OS_TARGET),x86_64-android)
  586. override TARGET_UNITS+=compunit
  587. endif
  588. ifeq ($(CPU_OS_TARGET),x86_64-aros)
  589. override TARGET_UNITS+=compunit
  590. endif
  591. ifeq ($(CPU_OS_TARGET),x86_64-dragonfly)
  592. override TARGET_UNITS+=compunit
  593. endif
  594. ifeq ($(CPU_OS_TARGET),arm-linux)
  595. override TARGET_UNITS+=compunit
  596. endif
  597. ifeq ($(CPU_OS_TARGET),arm-netbsd)
  598. override TARGET_UNITS+=compunit
  599. endif
  600. ifeq ($(CPU_OS_TARGET),arm-palmos)
  601. override TARGET_UNITS+=compunit
  602. endif
  603. ifeq ($(CPU_OS_TARGET),arm-wince)
  604. override TARGET_UNITS+=compunit
  605. endif
  606. ifeq ($(CPU_OS_TARGET),arm-gba)
  607. override TARGET_UNITS+=compunit
  608. endif
  609. ifeq ($(CPU_OS_TARGET),arm-nds)
  610. override TARGET_UNITS+=compunit
  611. endif
  612. ifeq ($(CPU_OS_TARGET),arm-embedded)
  613. override TARGET_UNITS+=compunit
  614. endif
  615. ifeq ($(CPU_OS_TARGET),arm-symbian)
  616. override TARGET_UNITS+=compunit
  617. endif
  618. ifeq ($(CPU_OS_TARGET),arm-android)
  619. override TARGET_UNITS+=compunit
  620. endif
  621. ifeq ($(CPU_OS_TARGET),arm-aros)
  622. override TARGET_UNITS+=compunit
  623. endif
  624. ifeq ($(CPU_OS_TARGET),arm-freertos)
  625. override TARGET_UNITS+=compunit
  626. endif
  627. ifeq ($(CPU_OS_TARGET),arm-ios)
  628. override TARGET_UNITS+=compunit
  629. endif
  630. ifeq ($(CPU_OS_TARGET),powerpc64-linux)
  631. override TARGET_UNITS+=compunit
  632. endif
  633. ifeq ($(CPU_OS_TARGET),powerpc64-freebsd)
  634. override TARGET_UNITS+=compunit
  635. endif
  636. ifeq ($(CPU_OS_TARGET),powerpc64-darwin)
  637. override TARGET_UNITS+=compunit
  638. endif
  639. ifeq ($(CPU_OS_TARGET),powerpc64-embedded)
  640. override TARGET_UNITS+=compunit
  641. endif
  642. ifeq ($(CPU_OS_TARGET),powerpc64-aix)
  643. override TARGET_UNITS+=compunit
  644. endif
  645. ifeq ($(CPU_OS_TARGET),avr-embedded)
  646. override TARGET_UNITS+=compunit
  647. endif
  648. ifeq ($(CPU_OS_TARGET),armeb-linux)
  649. override TARGET_UNITS+=compunit
  650. endif
  651. ifeq ($(CPU_OS_TARGET),armeb-embedded)
  652. override TARGET_UNITS+=compunit
  653. endif
  654. ifeq ($(CPU_OS_TARGET),mips-linux)
  655. override TARGET_UNITS+=compunit
  656. endif
  657. ifeq ($(CPU_OS_TARGET),mipsel-linux)
  658. override TARGET_UNITS+=compunit
  659. endif
  660. ifeq ($(CPU_OS_TARGET),mipsel-embedded)
  661. override TARGET_UNITS+=compunit
  662. endif
  663. ifeq ($(CPU_OS_TARGET),mipsel-android)
  664. override TARGET_UNITS+=compunit
  665. endif
  666. ifeq ($(CPU_OS_TARGET),mipsel-ps1)
  667. override TARGET_UNITS+=compunit
  668. endif
  669. ifeq ($(CPU_OS_TARGET),mips64-linux)
  670. override TARGET_UNITS+=compunit
  671. endif
  672. ifeq ($(CPU_OS_TARGET),mips64el-linux)
  673. override TARGET_UNITS+=compunit
  674. endif
  675. ifeq ($(CPU_OS_TARGET),jvm-java)
  676. override TARGET_UNITS+=compunit
  677. endif
  678. ifeq ($(CPU_OS_TARGET),jvm-android)
  679. override TARGET_UNITS+=compunit
  680. endif
  681. ifeq ($(CPU_OS_TARGET),i8086-embedded)
  682. override TARGET_UNITS+=compunit
  683. endif
  684. ifeq ($(CPU_OS_TARGET),i8086-msdos)
  685. override TARGET_UNITS+=compunit
  686. endif
  687. ifeq ($(CPU_OS_TARGET),i8086-win16)
  688. override TARGET_UNITS+=compunit
  689. endif
  690. ifeq ($(CPU_OS_TARGET),aarch64-linux)
  691. override TARGET_UNITS+=compunit
  692. endif
  693. ifeq ($(CPU_OS_TARGET),aarch64-freebsd)
  694. override TARGET_UNITS+=compunit
  695. endif
  696. ifeq ($(CPU_OS_TARGET),aarch64-darwin)
  697. override TARGET_UNITS+=compunit
  698. endif
  699. ifeq ($(CPU_OS_TARGET),aarch64-win64)
  700. override TARGET_UNITS+=compunit
  701. endif
  702. ifeq ($(CPU_OS_TARGET),aarch64-embedded)
  703. override TARGET_UNITS+=compunit
  704. endif
  705. ifeq ($(CPU_OS_TARGET),aarch64-iphonesim)
  706. override TARGET_UNITS+=compunit
  707. endif
  708. ifeq ($(CPU_OS_TARGET),aarch64-android)
  709. override TARGET_UNITS+=compunit
  710. endif
  711. ifeq ($(CPU_OS_TARGET),aarch64-ios)
  712. override TARGET_UNITS+=compunit
  713. endif
  714. ifeq ($(CPU_OS_TARGET),wasm32-embedded)
  715. override TARGET_UNITS+=compunit
  716. endif
  717. ifeq ($(CPU_OS_TARGET),wasm32-wasip1)
  718. override TARGET_UNITS+=compunit
  719. endif
  720. ifeq ($(CPU_OS_TARGET),wasm32-wasip1threads)
  721. override TARGET_UNITS+=compunit
  722. endif
  723. ifeq ($(CPU_OS_TARGET),wasm32-wasip2)
  724. override TARGET_UNITS+=compunit
  725. endif
  726. ifeq ($(CPU_OS_TARGET),sparc64-linux)
  727. override TARGET_UNITS+=compunit
  728. endif
  729. ifeq ($(CPU_OS_TARGET),riscv32-linux)
  730. override TARGET_UNITS+=compunit
  731. endif
  732. ifeq ($(CPU_OS_TARGET),riscv32-embedded)
  733. override TARGET_UNITS+=compunit
  734. endif
  735. ifeq ($(CPU_OS_TARGET),riscv32-freertos)
  736. override TARGET_UNITS+=compunit
  737. endif
  738. ifeq ($(CPU_OS_TARGET),riscv64-linux)
  739. override TARGET_UNITS+=compunit
  740. endif
  741. ifeq ($(CPU_OS_TARGET),riscv64-embedded)
  742. override TARGET_UNITS+=compunit
  743. endif
  744. ifeq ($(CPU_OS_TARGET),xtensa-linux)
  745. override TARGET_UNITS+=compunit
  746. endif
  747. ifeq ($(CPU_OS_TARGET),xtensa-embedded)
  748. override TARGET_UNITS+=compunit
  749. endif
  750. ifeq ($(CPU_OS_TARGET),xtensa-freertos)
  751. override TARGET_UNITS+=compunit
  752. endif
  753. ifeq ($(CPU_OS_TARGET),z80-embedded)
  754. override TARGET_UNITS+=compunit
  755. endif
  756. ifeq ($(CPU_OS_TARGET),z80-zxspectrum)
  757. override TARGET_UNITS+=compunit
  758. endif
  759. ifeq ($(CPU_OS_TARGET),z80-msxdos)
  760. override TARGET_UNITS+=compunit
  761. endif
  762. ifeq ($(CPU_OS_TARGET),z80-amstradcpc)
  763. override TARGET_UNITS+=compunit
  764. endif
  765. ifeq ($(CPU_OS_TARGET),loongarch64-linux)
  766. override TARGET_UNITS+=compunit
  767. endif
  768. override INSTALL_FPCPACKAGE=y
  769. ifeq ($(CPU_OS_TARGET),i386-linux)
  770. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  771. endif
  772. ifeq ($(CPU_OS_TARGET),i386-go32v2)
  773. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  774. endif
  775. ifeq ($(CPU_OS_TARGET),i386-win32)
  776. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  777. endif
  778. ifeq ($(CPU_OS_TARGET),i386-os2)
  779. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  780. endif
  781. ifeq ($(CPU_OS_TARGET),i386-freebsd)
  782. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  783. endif
  784. ifeq ($(CPU_OS_TARGET),i386-beos)
  785. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  786. endif
  787. ifeq ($(CPU_OS_TARGET),i386-haiku)
  788. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  789. endif
  790. ifeq ($(CPU_OS_TARGET),i386-netbsd)
  791. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  792. endif
  793. ifeq ($(CPU_OS_TARGET),i386-solaris)
  794. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  795. endif
  796. ifeq ($(CPU_OS_TARGET),i386-qnx)
  797. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  798. endif
  799. ifeq ($(CPU_OS_TARGET),i386-netware)
  800. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  801. endif
  802. ifeq ($(CPU_OS_TARGET),i386-openbsd)
  803. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  804. endif
  805. ifeq ($(CPU_OS_TARGET),i386-wdosx)
  806. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  807. endif
  808. ifeq ($(CPU_OS_TARGET),i386-darwin)
  809. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  810. endif
  811. ifeq ($(CPU_OS_TARGET),i386-emx)
  812. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  813. endif
  814. ifeq ($(CPU_OS_TARGET),i386-watcom)
  815. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  816. endif
  817. ifeq ($(CPU_OS_TARGET),i386-netwlibc)
  818. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  819. endif
  820. ifeq ($(CPU_OS_TARGET),i386-wince)
  821. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  822. endif
  823. ifeq ($(CPU_OS_TARGET),i386-embedded)
  824. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  825. endif
  826. ifeq ($(CPU_OS_TARGET),i386-symbian)
  827. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  828. endif
  829. ifeq ($(CPU_OS_TARGET),i386-nativent)
  830. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  831. endif
  832. ifeq ($(CPU_OS_TARGET),i386-iphonesim)
  833. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  834. endif
  835. ifeq ($(CPU_OS_TARGET),i386-android)
  836. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  837. endif
  838. ifeq ($(CPU_OS_TARGET),i386-aros)
  839. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  840. endif
  841. ifeq ($(CPU_OS_TARGET),m68k-linux)
  842. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  843. endif
  844. ifeq ($(CPU_OS_TARGET),m68k-netbsd)
  845. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  846. endif
  847. ifeq ($(CPU_OS_TARGET),m68k-amiga)
  848. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  849. endif
  850. ifeq ($(CPU_OS_TARGET),m68k-atari)
  851. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  852. endif
  853. ifeq ($(CPU_OS_TARGET),m68k-palmos)
  854. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  855. endif
  856. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  857. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  858. endif
  859. ifeq ($(CPU_OS_TARGET),m68k-embedded)
  860. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  861. endif
  862. ifeq ($(CPU_OS_TARGET),m68k-sinclairql)
  863. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  864. endif
  865. ifeq ($(CPU_OS_TARGET),m68k-human68k)
  866. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  867. endif
  868. ifeq ($(CPU_OS_TARGET),powerpc-linux)
  869. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  870. endif
  871. ifeq ($(CPU_OS_TARGET),powerpc-netbsd)
  872. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  873. endif
  874. ifeq ($(CPU_OS_TARGET),powerpc-amiga)
  875. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  876. endif
  877. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  878. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  879. endif
  880. ifeq ($(CPU_OS_TARGET),powerpc-darwin)
  881. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  882. endif
  883. ifeq ($(CPU_OS_TARGET),powerpc-morphos)
  884. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  885. endif
  886. ifeq ($(CPU_OS_TARGET),powerpc-embedded)
  887. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  888. endif
  889. ifeq ($(CPU_OS_TARGET),powerpc-wii)
  890. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  891. endif
  892. ifeq ($(CPU_OS_TARGET),powerpc-aix)
  893. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  894. endif
  895. ifeq ($(CPU_OS_TARGET),sparc-linux)
  896. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  897. endif
  898. ifeq ($(CPU_OS_TARGET),sparc-netbsd)
  899. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  900. endif
  901. ifeq ($(CPU_OS_TARGET),sparc-solaris)
  902. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  903. endif
  904. ifeq ($(CPU_OS_TARGET),sparc-embedded)
  905. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  906. endif
  907. ifeq ($(CPU_OS_TARGET),x86_64-linux)
  908. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  909. endif
  910. ifeq ($(CPU_OS_TARGET),x86_64-freebsd)
  911. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  912. endif
  913. ifeq ($(CPU_OS_TARGET),x86_64-haiku)
  914. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  915. endif
  916. ifeq ($(CPU_OS_TARGET),x86_64-netbsd)
  917. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  918. endif
  919. ifeq ($(CPU_OS_TARGET),x86_64-solaris)
  920. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  921. endif
  922. ifeq ($(CPU_OS_TARGET),x86_64-openbsd)
  923. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  924. endif
  925. ifeq ($(CPU_OS_TARGET),x86_64-darwin)
  926. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  927. endif
  928. ifeq ($(CPU_OS_TARGET),x86_64-win64)
  929. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  930. endif
  931. ifeq ($(CPU_OS_TARGET),x86_64-embedded)
  932. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  933. endif
  934. ifeq ($(CPU_OS_TARGET),x86_64-iphonesim)
  935. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  936. endif
  937. ifeq ($(CPU_OS_TARGET),x86_64-android)
  938. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  939. endif
  940. ifeq ($(CPU_OS_TARGET),x86_64-aros)
  941. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  942. endif
  943. ifeq ($(CPU_OS_TARGET),x86_64-dragonfly)
  944. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  945. endif
  946. ifeq ($(CPU_OS_TARGET),arm-linux)
  947. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  948. endif
  949. ifeq ($(CPU_OS_TARGET),arm-netbsd)
  950. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  951. endif
  952. ifeq ($(CPU_OS_TARGET),arm-palmos)
  953. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  954. endif
  955. ifeq ($(CPU_OS_TARGET),arm-wince)
  956. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  957. endif
  958. ifeq ($(CPU_OS_TARGET),arm-gba)
  959. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  960. endif
  961. ifeq ($(CPU_OS_TARGET),arm-nds)
  962. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  963. endif
  964. ifeq ($(CPU_OS_TARGET),arm-embedded)
  965. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  966. endif
  967. ifeq ($(CPU_OS_TARGET),arm-symbian)
  968. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  969. endif
  970. ifeq ($(CPU_OS_TARGET),arm-android)
  971. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  972. endif
  973. ifeq ($(CPU_OS_TARGET),arm-aros)
  974. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  975. endif
  976. ifeq ($(CPU_OS_TARGET),arm-freertos)
  977. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  978. endif
  979. ifeq ($(CPU_OS_TARGET),arm-ios)
  980. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  981. endif
  982. ifeq ($(CPU_OS_TARGET),powerpc64-linux)
  983. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  984. endif
  985. ifeq ($(CPU_OS_TARGET),powerpc64-freebsd)
  986. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  987. endif
  988. ifeq ($(CPU_OS_TARGET),powerpc64-darwin)
  989. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  990. endif
  991. ifeq ($(CPU_OS_TARGET),powerpc64-embedded)
  992. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  993. endif
  994. ifeq ($(CPU_OS_TARGET),powerpc64-aix)
  995. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  996. endif
  997. ifeq ($(CPU_OS_TARGET),avr-embedded)
  998. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  999. endif
  1000. ifeq ($(CPU_OS_TARGET),armeb-linux)
  1001. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1002. endif
  1003. ifeq ($(CPU_OS_TARGET),armeb-embedded)
  1004. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1005. endif
  1006. ifeq ($(CPU_OS_TARGET),mips-linux)
  1007. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1008. endif
  1009. ifeq ($(CPU_OS_TARGET),mipsel-linux)
  1010. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1011. endif
  1012. ifeq ($(CPU_OS_TARGET),mipsel-embedded)
  1013. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1014. endif
  1015. ifeq ($(CPU_OS_TARGET),mipsel-android)
  1016. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1017. endif
  1018. ifeq ($(CPU_OS_TARGET),mipsel-ps1)
  1019. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1020. endif
  1021. ifeq ($(CPU_OS_TARGET),mips64-linux)
  1022. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1023. endif
  1024. ifeq ($(CPU_OS_TARGET),mips64el-linux)
  1025. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1026. endif
  1027. ifeq ($(CPU_OS_TARGET),jvm-java)
  1028. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1029. endif
  1030. ifeq ($(CPU_OS_TARGET),jvm-android)
  1031. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1032. endif
  1033. ifeq ($(CPU_OS_TARGET),i8086-embedded)
  1034. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1035. endif
  1036. ifeq ($(CPU_OS_TARGET),i8086-msdos)
  1037. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1038. endif
  1039. ifeq ($(CPU_OS_TARGET),i8086-win16)
  1040. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1041. endif
  1042. ifeq ($(CPU_OS_TARGET),aarch64-linux)
  1043. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1044. endif
  1045. ifeq ($(CPU_OS_TARGET),aarch64-freebsd)
  1046. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1047. endif
  1048. ifeq ($(CPU_OS_TARGET),aarch64-darwin)
  1049. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1050. endif
  1051. ifeq ($(CPU_OS_TARGET),aarch64-win64)
  1052. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1053. endif
  1054. ifeq ($(CPU_OS_TARGET),aarch64-embedded)
  1055. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1056. endif
  1057. ifeq ($(CPU_OS_TARGET),aarch64-iphonesim)
  1058. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1059. endif
  1060. ifeq ($(CPU_OS_TARGET),aarch64-android)
  1061. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1062. endif
  1063. ifeq ($(CPU_OS_TARGET),aarch64-ios)
  1064. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1065. endif
  1066. ifeq ($(CPU_OS_TARGET),wasm32-embedded)
  1067. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1068. endif
  1069. ifeq ($(CPU_OS_TARGET),wasm32-wasip1)
  1070. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1071. endif
  1072. ifeq ($(CPU_OS_TARGET),wasm32-wasip1threads)
  1073. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1074. endif
  1075. ifeq ($(CPU_OS_TARGET),wasm32-wasip2)
  1076. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1077. endif
  1078. ifeq ($(CPU_OS_TARGET),sparc64-linux)
  1079. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1080. endif
  1081. ifeq ($(CPU_OS_TARGET),riscv32-linux)
  1082. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1083. endif
  1084. ifeq ($(CPU_OS_TARGET),riscv32-embedded)
  1085. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1086. endif
  1087. ifeq ($(CPU_OS_TARGET),riscv32-freertos)
  1088. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1089. endif
  1090. ifeq ($(CPU_OS_TARGET),riscv64-linux)
  1091. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1092. endif
  1093. ifeq ($(CPU_OS_TARGET),riscv64-embedded)
  1094. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1095. endif
  1096. ifeq ($(CPU_OS_TARGET),xtensa-linux)
  1097. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1098. endif
  1099. ifeq ($(CPU_OS_TARGET),xtensa-embedded)
  1100. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1101. endif
  1102. ifeq ($(CPU_OS_TARGET),xtensa-freertos)
  1103. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1104. endif
  1105. ifeq ($(CPU_OS_TARGET),z80-embedded)
  1106. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1107. endif
  1108. ifeq ($(CPU_OS_TARGET),z80-zxspectrum)
  1109. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1110. endif
  1111. ifeq ($(CPU_OS_TARGET),z80-msxdos)
  1112. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1113. endif
  1114. ifeq ($(CPU_OS_TARGET),z80-amstradcpc)
  1115. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1116. endif
  1117. ifeq ($(CPU_OS_TARGET),loongarch64-linux)
  1118. override COMPILER_OPTIONS+=-Ur -dNOCATCH
  1119. endif
  1120. ifeq ($(CPU_OS_TARGET),i386-linux)
  1121. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1122. endif
  1123. ifeq ($(CPU_OS_TARGET),i386-go32v2)
  1124. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1125. endif
  1126. ifeq ($(CPU_OS_TARGET),i386-win32)
  1127. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1128. endif
  1129. ifeq ($(CPU_OS_TARGET),i386-os2)
  1130. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1131. endif
  1132. ifeq ($(CPU_OS_TARGET),i386-freebsd)
  1133. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1134. endif
  1135. ifeq ($(CPU_OS_TARGET),i386-beos)
  1136. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1137. endif
  1138. ifeq ($(CPU_OS_TARGET),i386-haiku)
  1139. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1140. endif
  1141. ifeq ($(CPU_OS_TARGET),i386-netbsd)
  1142. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1143. endif
  1144. ifeq ($(CPU_OS_TARGET),i386-solaris)
  1145. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1146. endif
  1147. ifeq ($(CPU_OS_TARGET),i386-qnx)
  1148. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1149. endif
  1150. ifeq ($(CPU_OS_TARGET),i386-netware)
  1151. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1152. endif
  1153. ifeq ($(CPU_OS_TARGET),i386-openbsd)
  1154. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1155. endif
  1156. ifeq ($(CPU_OS_TARGET),i386-wdosx)
  1157. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1158. endif
  1159. ifeq ($(CPU_OS_TARGET),i386-darwin)
  1160. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1161. endif
  1162. ifeq ($(CPU_OS_TARGET),i386-emx)
  1163. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1164. endif
  1165. ifeq ($(CPU_OS_TARGET),i386-watcom)
  1166. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1167. endif
  1168. ifeq ($(CPU_OS_TARGET),i386-netwlibc)
  1169. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1170. endif
  1171. ifeq ($(CPU_OS_TARGET),i386-wince)
  1172. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1173. endif
  1174. ifeq ($(CPU_OS_TARGET),i386-embedded)
  1175. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1176. endif
  1177. ifeq ($(CPU_OS_TARGET),i386-symbian)
  1178. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1179. endif
  1180. ifeq ($(CPU_OS_TARGET),i386-nativent)
  1181. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1182. endif
  1183. ifeq ($(CPU_OS_TARGET),i386-iphonesim)
  1184. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1185. endif
  1186. ifeq ($(CPU_OS_TARGET),i386-android)
  1187. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1188. endif
  1189. ifeq ($(CPU_OS_TARGET),i386-aros)
  1190. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1191. endif
  1192. ifeq ($(CPU_OS_TARGET),m68k-linux)
  1193. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1194. endif
  1195. ifeq ($(CPU_OS_TARGET),m68k-netbsd)
  1196. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1197. endif
  1198. ifeq ($(CPU_OS_TARGET),m68k-amiga)
  1199. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1200. endif
  1201. ifeq ($(CPU_OS_TARGET),m68k-atari)
  1202. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1203. endif
  1204. ifeq ($(CPU_OS_TARGET),m68k-palmos)
  1205. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1206. endif
  1207. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  1208. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1209. endif
  1210. ifeq ($(CPU_OS_TARGET),m68k-embedded)
  1211. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1212. endif
  1213. ifeq ($(CPU_OS_TARGET),m68k-sinclairql)
  1214. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1215. endif
  1216. ifeq ($(CPU_OS_TARGET),m68k-human68k)
  1217. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1218. endif
  1219. ifeq ($(CPU_OS_TARGET),powerpc-linux)
  1220. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1221. endif
  1222. ifeq ($(CPU_OS_TARGET),powerpc-netbsd)
  1223. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1224. endif
  1225. ifeq ($(CPU_OS_TARGET),powerpc-amiga)
  1226. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1227. endif
  1228. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  1229. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1230. endif
  1231. ifeq ($(CPU_OS_TARGET),powerpc-darwin)
  1232. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1233. endif
  1234. ifeq ($(CPU_OS_TARGET),powerpc-morphos)
  1235. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1236. endif
  1237. ifeq ($(CPU_OS_TARGET),powerpc-embedded)
  1238. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1239. endif
  1240. ifeq ($(CPU_OS_TARGET),powerpc-wii)
  1241. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1242. endif
  1243. ifeq ($(CPU_OS_TARGET),powerpc-aix)
  1244. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1245. endif
  1246. ifeq ($(CPU_OS_TARGET),sparc-linux)
  1247. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1248. endif
  1249. ifeq ($(CPU_OS_TARGET),sparc-netbsd)
  1250. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1251. endif
  1252. ifeq ($(CPU_OS_TARGET),sparc-solaris)
  1253. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1254. endif
  1255. ifeq ($(CPU_OS_TARGET),sparc-embedded)
  1256. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1257. endif
  1258. ifeq ($(CPU_OS_TARGET),x86_64-linux)
  1259. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1260. endif
  1261. ifeq ($(CPU_OS_TARGET),x86_64-freebsd)
  1262. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1263. endif
  1264. ifeq ($(CPU_OS_TARGET),x86_64-haiku)
  1265. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1266. endif
  1267. ifeq ($(CPU_OS_TARGET),x86_64-netbsd)
  1268. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1269. endif
  1270. ifeq ($(CPU_OS_TARGET),x86_64-solaris)
  1271. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1272. endif
  1273. ifeq ($(CPU_OS_TARGET),x86_64-openbsd)
  1274. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1275. endif
  1276. ifeq ($(CPU_OS_TARGET),x86_64-darwin)
  1277. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1278. endif
  1279. ifeq ($(CPU_OS_TARGET),x86_64-win64)
  1280. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1281. endif
  1282. ifeq ($(CPU_OS_TARGET),x86_64-embedded)
  1283. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1284. endif
  1285. ifeq ($(CPU_OS_TARGET),x86_64-iphonesim)
  1286. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1287. endif
  1288. ifeq ($(CPU_OS_TARGET),x86_64-android)
  1289. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1290. endif
  1291. ifeq ($(CPU_OS_TARGET),x86_64-aros)
  1292. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1293. endif
  1294. ifeq ($(CPU_OS_TARGET),x86_64-dragonfly)
  1295. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1296. endif
  1297. ifeq ($(CPU_OS_TARGET),arm-linux)
  1298. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1299. endif
  1300. ifeq ($(CPU_OS_TARGET),arm-netbsd)
  1301. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1302. endif
  1303. ifeq ($(CPU_OS_TARGET),arm-palmos)
  1304. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1305. endif
  1306. ifeq ($(CPU_OS_TARGET),arm-wince)
  1307. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1308. endif
  1309. ifeq ($(CPU_OS_TARGET),arm-gba)
  1310. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1311. endif
  1312. ifeq ($(CPU_OS_TARGET),arm-nds)
  1313. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1314. endif
  1315. ifeq ($(CPU_OS_TARGET),arm-embedded)
  1316. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1317. endif
  1318. ifeq ($(CPU_OS_TARGET),arm-symbian)
  1319. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1320. endif
  1321. ifeq ($(CPU_OS_TARGET),arm-android)
  1322. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1323. endif
  1324. ifeq ($(CPU_OS_TARGET),arm-aros)
  1325. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1326. endif
  1327. ifeq ($(CPU_OS_TARGET),arm-freertos)
  1328. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1329. endif
  1330. ifeq ($(CPU_OS_TARGET),arm-ios)
  1331. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1332. endif
  1333. ifeq ($(CPU_OS_TARGET),powerpc64-linux)
  1334. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1335. endif
  1336. ifeq ($(CPU_OS_TARGET),powerpc64-freebsd)
  1337. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1338. endif
  1339. ifeq ($(CPU_OS_TARGET),powerpc64-darwin)
  1340. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1341. endif
  1342. ifeq ($(CPU_OS_TARGET),powerpc64-embedded)
  1343. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1344. endif
  1345. ifeq ($(CPU_OS_TARGET),powerpc64-aix)
  1346. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1347. endif
  1348. ifeq ($(CPU_OS_TARGET),avr-embedded)
  1349. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1350. endif
  1351. ifeq ($(CPU_OS_TARGET),armeb-linux)
  1352. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1353. endif
  1354. ifeq ($(CPU_OS_TARGET),armeb-embedded)
  1355. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1356. endif
  1357. ifeq ($(CPU_OS_TARGET),mips-linux)
  1358. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1359. endif
  1360. ifeq ($(CPU_OS_TARGET),mipsel-linux)
  1361. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1362. endif
  1363. ifeq ($(CPU_OS_TARGET),mipsel-embedded)
  1364. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1365. endif
  1366. ifeq ($(CPU_OS_TARGET),mipsel-android)
  1367. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1368. endif
  1369. ifeq ($(CPU_OS_TARGET),mipsel-ps1)
  1370. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1371. endif
  1372. ifeq ($(CPU_OS_TARGET),mips64-linux)
  1373. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1374. endif
  1375. ifeq ($(CPU_OS_TARGET),mips64el-linux)
  1376. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1377. endif
  1378. ifeq ($(CPU_OS_TARGET),jvm-java)
  1379. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1380. endif
  1381. ifeq ($(CPU_OS_TARGET),jvm-android)
  1382. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1383. endif
  1384. ifeq ($(CPU_OS_TARGET),i8086-embedded)
  1385. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1386. endif
  1387. ifeq ($(CPU_OS_TARGET),i8086-msdos)
  1388. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1389. endif
  1390. ifeq ($(CPU_OS_TARGET),i8086-win16)
  1391. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1392. endif
  1393. ifeq ($(CPU_OS_TARGET),aarch64-linux)
  1394. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1395. endif
  1396. ifeq ($(CPU_OS_TARGET),aarch64-freebsd)
  1397. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1398. endif
  1399. ifeq ($(CPU_OS_TARGET),aarch64-darwin)
  1400. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1401. endif
  1402. ifeq ($(CPU_OS_TARGET),aarch64-win64)
  1403. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1404. endif
  1405. ifeq ($(CPU_OS_TARGET),aarch64-embedded)
  1406. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1407. endif
  1408. ifeq ($(CPU_OS_TARGET),aarch64-iphonesim)
  1409. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1410. endif
  1411. ifeq ($(CPU_OS_TARGET),aarch64-android)
  1412. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1413. endif
  1414. ifeq ($(CPU_OS_TARGET),aarch64-ios)
  1415. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1416. endif
  1417. ifeq ($(CPU_OS_TARGET),wasm32-embedded)
  1418. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1419. endif
  1420. ifeq ($(CPU_OS_TARGET),wasm32-wasip1)
  1421. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1422. endif
  1423. ifeq ($(CPU_OS_TARGET),wasm32-wasip1threads)
  1424. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1425. endif
  1426. ifeq ($(CPU_OS_TARGET),wasm32-wasip2)
  1427. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1428. endif
  1429. ifeq ($(CPU_OS_TARGET),sparc64-linux)
  1430. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1431. endif
  1432. ifeq ($(CPU_OS_TARGET),riscv32-linux)
  1433. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1434. endif
  1435. ifeq ($(CPU_OS_TARGET),riscv32-embedded)
  1436. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1437. endif
  1438. ifeq ($(CPU_OS_TARGET),riscv32-freertos)
  1439. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1440. endif
  1441. ifeq ($(CPU_OS_TARGET),riscv64-linux)
  1442. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1443. endif
  1444. ifeq ($(CPU_OS_TARGET),riscv64-embedded)
  1445. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1446. endif
  1447. ifeq ($(CPU_OS_TARGET),xtensa-linux)
  1448. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1449. endif
  1450. ifeq ($(CPU_OS_TARGET),xtensa-embedded)
  1451. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1452. endif
  1453. ifeq ($(CPU_OS_TARGET),xtensa-freertos)
  1454. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1455. endif
  1456. ifeq ($(CPU_OS_TARGET),z80-embedded)
  1457. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1458. endif
  1459. ifeq ($(CPU_OS_TARGET),z80-zxspectrum)
  1460. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1461. endif
  1462. ifeq ($(CPU_OS_TARGET),z80-msxdos)
  1463. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1464. endif
  1465. ifeq ($(CPU_OS_TARGET),z80-amstradcpc)
  1466. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1467. endif
  1468. ifeq ($(CPU_OS_TARGET),loongarch64-linux)
  1469. override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  1470. endif
  1471. ifeq ($(CPU_OS_TARGET),i386-linux)
  1472. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1473. endif
  1474. ifeq ($(CPU_OS_TARGET),i386-go32v2)
  1475. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1476. endif
  1477. ifeq ($(CPU_OS_TARGET),i386-win32)
  1478. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1479. endif
  1480. ifeq ($(CPU_OS_TARGET),i386-os2)
  1481. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1482. endif
  1483. ifeq ($(CPU_OS_TARGET),i386-freebsd)
  1484. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1485. endif
  1486. ifeq ($(CPU_OS_TARGET),i386-beos)
  1487. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1488. endif
  1489. ifeq ($(CPU_OS_TARGET),i386-haiku)
  1490. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1491. endif
  1492. ifeq ($(CPU_OS_TARGET),i386-netbsd)
  1493. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1494. endif
  1495. ifeq ($(CPU_OS_TARGET),i386-solaris)
  1496. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1497. endif
  1498. ifeq ($(CPU_OS_TARGET),i386-qnx)
  1499. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1500. endif
  1501. ifeq ($(CPU_OS_TARGET),i386-netware)
  1502. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1503. endif
  1504. ifeq ($(CPU_OS_TARGET),i386-openbsd)
  1505. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1506. endif
  1507. ifeq ($(CPU_OS_TARGET),i386-wdosx)
  1508. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1509. endif
  1510. ifeq ($(CPU_OS_TARGET),i386-darwin)
  1511. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1512. endif
  1513. ifeq ($(CPU_OS_TARGET),i386-emx)
  1514. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1515. endif
  1516. ifeq ($(CPU_OS_TARGET),i386-watcom)
  1517. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1518. endif
  1519. ifeq ($(CPU_OS_TARGET),i386-netwlibc)
  1520. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1521. endif
  1522. ifeq ($(CPU_OS_TARGET),i386-wince)
  1523. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1524. endif
  1525. ifeq ($(CPU_OS_TARGET),i386-embedded)
  1526. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1527. endif
  1528. ifeq ($(CPU_OS_TARGET),i386-symbian)
  1529. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1530. endif
  1531. ifeq ($(CPU_OS_TARGET),i386-nativent)
  1532. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1533. endif
  1534. ifeq ($(CPU_OS_TARGET),i386-iphonesim)
  1535. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1536. endif
  1537. ifeq ($(CPU_OS_TARGET),i386-android)
  1538. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1539. endif
  1540. ifeq ($(CPU_OS_TARGET),i386-aros)
  1541. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1542. endif
  1543. ifeq ($(CPU_OS_TARGET),m68k-linux)
  1544. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1545. endif
  1546. ifeq ($(CPU_OS_TARGET),m68k-netbsd)
  1547. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1548. endif
  1549. ifeq ($(CPU_OS_TARGET),m68k-amiga)
  1550. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1551. endif
  1552. ifeq ($(CPU_OS_TARGET),m68k-atari)
  1553. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1554. endif
  1555. ifeq ($(CPU_OS_TARGET),m68k-palmos)
  1556. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1557. endif
  1558. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  1559. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1560. endif
  1561. ifeq ($(CPU_OS_TARGET),m68k-embedded)
  1562. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1563. endif
  1564. ifeq ($(CPU_OS_TARGET),m68k-sinclairql)
  1565. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1566. endif
  1567. ifeq ($(CPU_OS_TARGET),m68k-human68k)
  1568. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1569. endif
  1570. ifeq ($(CPU_OS_TARGET),powerpc-linux)
  1571. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1572. endif
  1573. ifeq ($(CPU_OS_TARGET),powerpc-netbsd)
  1574. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1575. endif
  1576. ifeq ($(CPU_OS_TARGET),powerpc-amiga)
  1577. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1578. endif
  1579. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  1580. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1581. endif
  1582. ifeq ($(CPU_OS_TARGET),powerpc-darwin)
  1583. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1584. endif
  1585. ifeq ($(CPU_OS_TARGET),powerpc-morphos)
  1586. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1587. endif
  1588. ifeq ($(CPU_OS_TARGET),powerpc-embedded)
  1589. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1590. endif
  1591. ifeq ($(CPU_OS_TARGET),powerpc-wii)
  1592. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1593. endif
  1594. ifeq ($(CPU_OS_TARGET),powerpc-aix)
  1595. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1596. endif
  1597. ifeq ($(CPU_OS_TARGET),sparc-linux)
  1598. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1599. endif
  1600. ifeq ($(CPU_OS_TARGET),sparc-netbsd)
  1601. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1602. endif
  1603. ifeq ($(CPU_OS_TARGET),sparc-solaris)
  1604. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1605. endif
  1606. ifeq ($(CPU_OS_TARGET),sparc-embedded)
  1607. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1608. endif
  1609. ifeq ($(CPU_OS_TARGET),x86_64-linux)
  1610. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1611. endif
  1612. ifeq ($(CPU_OS_TARGET),x86_64-freebsd)
  1613. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1614. endif
  1615. ifeq ($(CPU_OS_TARGET),x86_64-haiku)
  1616. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1617. endif
  1618. ifeq ($(CPU_OS_TARGET),x86_64-netbsd)
  1619. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1620. endif
  1621. ifeq ($(CPU_OS_TARGET),x86_64-solaris)
  1622. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1623. endif
  1624. ifeq ($(CPU_OS_TARGET),x86_64-openbsd)
  1625. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1626. endif
  1627. ifeq ($(CPU_OS_TARGET),x86_64-darwin)
  1628. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1629. endif
  1630. ifeq ($(CPU_OS_TARGET),x86_64-win64)
  1631. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1632. endif
  1633. ifeq ($(CPU_OS_TARGET),x86_64-embedded)
  1634. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1635. endif
  1636. ifeq ($(CPU_OS_TARGET),x86_64-iphonesim)
  1637. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1638. endif
  1639. ifeq ($(CPU_OS_TARGET),x86_64-android)
  1640. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1641. endif
  1642. ifeq ($(CPU_OS_TARGET),x86_64-aros)
  1643. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1644. endif
  1645. ifeq ($(CPU_OS_TARGET),x86_64-dragonfly)
  1646. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1647. endif
  1648. ifeq ($(CPU_OS_TARGET),arm-linux)
  1649. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1650. endif
  1651. ifeq ($(CPU_OS_TARGET),arm-netbsd)
  1652. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1653. endif
  1654. ifeq ($(CPU_OS_TARGET),arm-palmos)
  1655. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1656. endif
  1657. ifeq ($(CPU_OS_TARGET),arm-wince)
  1658. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1659. endif
  1660. ifeq ($(CPU_OS_TARGET),arm-gba)
  1661. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1662. endif
  1663. ifeq ($(CPU_OS_TARGET),arm-nds)
  1664. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1665. endif
  1666. ifeq ($(CPU_OS_TARGET),arm-embedded)
  1667. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1668. endif
  1669. ifeq ($(CPU_OS_TARGET),arm-symbian)
  1670. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1671. endif
  1672. ifeq ($(CPU_OS_TARGET),arm-android)
  1673. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1674. endif
  1675. ifeq ($(CPU_OS_TARGET),arm-aros)
  1676. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1677. endif
  1678. ifeq ($(CPU_OS_TARGET),arm-freertos)
  1679. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1680. endif
  1681. ifeq ($(CPU_OS_TARGET),arm-ios)
  1682. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1683. endif
  1684. ifeq ($(CPU_OS_TARGET),powerpc64-linux)
  1685. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1686. endif
  1687. ifeq ($(CPU_OS_TARGET),powerpc64-freebsd)
  1688. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1689. endif
  1690. ifeq ($(CPU_OS_TARGET),powerpc64-darwin)
  1691. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1692. endif
  1693. ifeq ($(CPU_OS_TARGET),powerpc64-embedded)
  1694. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1695. endif
  1696. ifeq ($(CPU_OS_TARGET),powerpc64-aix)
  1697. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1698. endif
  1699. ifeq ($(CPU_OS_TARGET),avr-embedded)
  1700. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1701. endif
  1702. ifeq ($(CPU_OS_TARGET),armeb-linux)
  1703. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1704. endif
  1705. ifeq ($(CPU_OS_TARGET),armeb-embedded)
  1706. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1707. endif
  1708. ifeq ($(CPU_OS_TARGET),mips-linux)
  1709. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1710. endif
  1711. ifeq ($(CPU_OS_TARGET),mipsel-linux)
  1712. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1713. endif
  1714. ifeq ($(CPU_OS_TARGET),mipsel-embedded)
  1715. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1716. endif
  1717. ifeq ($(CPU_OS_TARGET),mipsel-android)
  1718. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1719. endif
  1720. ifeq ($(CPU_OS_TARGET),mipsel-ps1)
  1721. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1722. endif
  1723. ifeq ($(CPU_OS_TARGET),mips64-linux)
  1724. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1725. endif
  1726. ifeq ($(CPU_OS_TARGET),mips64el-linux)
  1727. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1728. endif
  1729. ifeq ($(CPU_OS_TARGET),jvm-java)
  1730. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1731. endif
  1732. ifeq ($(CPU_OS_TARGET),jvm-android)
  1733. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1734. endif
  1735. ifeq ($(CPU_OS_TARGET),i8086-embedded)
  1736. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1737. endif
  1738. ifeq ($(CPU_OS_TARGET),i8086-msdos)
  1739. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1740. endif
  1741. ifeq ($(CPU_OS_TARGET),i8086-win16)
  1742. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1743. endif
  1744. ifeq ($(CPU_OS_TARGET),aarch64-linux)
  1745. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1746. endif
  1747. ifeq ($(CPU_OS_TARGET),aarch64-freebsd)
  1748. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1749. endif
  1750. ifeq ($(CPU_OS_TARGET),aarch64-darwin)
  1751. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1752. endif
  1753. ifeq ($(CPU_OS_TARGET),aarch64-win64)
  1754. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1755. endif
  1756. ifeq ($(CPU_OS_TARGET),aarch64-embedded)
  1757. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1758. endif
  1759. ifeq ($(CPU_OS_TARGET),aarch64-iphonesim)
  1760. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1761. endif
  1762. ifeq ($(CPU_OS_TARGET),aarch64-android)
  1763. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1764. endif
  1765. ifeq ($(CPU_OS_TARGET),aarch64-ios)
  1766. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1767. endif
  1768. ifeq ($(CPU_OS_TARGET),wasm32-embedded)
  1769. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1770. endif
  1771. ifeq ($(CPU_OS_TARGET),wasm32-wasip1)
  1772. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1773. endif
  1774. ifeq ($(CPU_OS_TARGET),wasm32-wasip1threads)
  1775. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1776. endif
  1777. ifeq ($(CPU_OS_TARGET),wasm32-wasip2)
  1778. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1779. endif
  1780. ifeq ($(CPU_OS_TARGET),sparc64-linux)
  1781. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1782. endif
  1783. ifeq ($(CPU_OS_TARGET),riscv32-linux)
  1784. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1785. endif
  1786. ifeq ($(CPU_OS_TARGET),riscv32-embedded)
  1787. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1788. endif
  1789. ifeq ($(CPU_OS_TARGET),riscv32-freertos)
  1790. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1791. endif
  1792. ifeq ($(CPU_OS_TARGET),riscv64-linux)
  1793. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1794. endif
  1795. ifeq ($(CPU_OS_TARGET),riscv64-embedded)
  1796. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1797. endif
  1798. ifeq ($(CPU_OS_TARGET),xtensa-linux)
  1799. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1800. endif
  1801. ifeq ($(CPU_OS_TARGET),xtensa-embedded)
  1802. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1803. endif
  1804. ifeq ($(CPU_OS_TARGET),xtensa-freertos)
  1805. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1806. endif
  1807. ifeq ($(CPU_OS_TARGET),z80-embedded)
  1808. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1809. endif
  1810. ifeq ($(CPU_OS_TARGET),z80-zxspectrum)
  1811. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1812. endif
  1813. ifeq ($(CPU_OS_TARGET),z80-msxdos)
  1814. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1815. endif
  1816. ifeq ($(CPU_OS_TARGET),z80-amstradcpc)
  1817. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1818. endif
  1819. ifeq ($(CPU_OS_TARGET),loongarch64-linux)
  1820. override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  1821. endif
  1822. ifdef REQUIRE_UNITSDIR
  1823. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  1824. endif
  1825. ifdef REQUIRE_PACKAGESDIR
  1826. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  1827. endif
  1828. ifdef ZIPINSTALL
  1829. ifneq ($(filter $(OS_TARGET),$(UNIXs)),)
  1830. UNIXHier=1
  1831. endif
  1832. else
  1833. ifneq ($(filter $(OS_SOURCE),$(UNIXs)),)
  1834. UNIXHier=1
  1835. endif
  1836. endif
  1837. ifndef INSTALL_PREFIX
  1838. ifdef PREFIX
  1839. INSTALL_PREFIX=$(PREFIX)
  1840. endif
  1841. endif
  1842. ifndef INSTALL_PREFIX
  1843. ifdef UNIXHier
  1844. INSTALL_PREFIX=/usr/local
  1845. else
  1846. ifdef INSTALL_FPCPACKAGE
  1847. INSTALL_BASEDIR:=/pp
  1848. else
  1849. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  1850. endif
  1851. endif
  1852. endif
  1853. export INSTALL_PREFIX
  1854. ifdef INSTALL_FPCSUBDIR
  1855. export INSTALL_FPCSUBDIR
  1856. endif
  1857. ifndef DIST_DESTDIR
  1858. DIST_DESTDIR:=$(BASEDIR)
  1859. endif
  1860. export DIST_DESTDIR
  1861. ifndef COMPILER_UNITTARGETDIR
  1862. ifdef PACKAGEDIR_MAIN
  1863. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  1864. else
  1865. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  1866. endif
  1867. endif
  1868. ifndef COMPILER_TARGETDIR
  1869. COMPILER_TARGETDIR=.
  1870. endif
  1871. ifndef INSTALL_BASEDIR
  1872. ifdef UNIXHier
  1873. ifdef INSTALL_FPCPACKAGE
  1874. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  1875. else
  1876. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  1877. endif
  1878. else
  1879. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  1880. endif
  1881. endif
  1882. ifndef INSTALL_BINDIR
  1883. ifdef UNIXHier
  1884. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  1885. else
  1886. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  1887. ifdef INSTALL_FPCPACKAGE
  1888. ifdef CROSSCOMPILE
  1889. ifdef CROSSINSTALL
  1890. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  1891. else
  1892. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  1893. endif
  1894. else
  1895. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  1896. endif
  1897. endif
  1898. endif
  1899. endif
  1900. ifndef INSTALL_UNITDIR
  1901. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  1902. ifdef INSTALL_FPCPACKAGE
  1903. ifdef PACKAGE_NAME
  1904. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  1905. endif
  1906. endif
  1907. endif
  1908. ifndef INSTALL_LIBDIR
  1909. ifdef UNIXHier
  1910. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  1911. else
  1912. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  1913. endif
  1914. endif
  1915. ifndef INSTALL_SOURCEDIR
  1916. ifdef UNIXHier
  1917. ifdef BSDhier
  1918. SRCPREFIXDIR=share/src
  1919. else
  1920. ifdef linuxHier
  1921. SRCPREFIXDIR=share/src
  1922. else
  1923. SRCPREFIXDIR=src
  1924. endif
  1925. endif
  1926. ifdef INSTALL_FPCPACKAGE
  1927. ifdef INSTALL_FPCSUBDIR
  1928. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  1929. else
  1930. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1931. endif
  1932. else
  1933. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1934. endif
  1935. else
  1936. ifdef INSTALL_FPCPACKAGE
  1937. ifdef INSTALL_FPCSUBDIR
  1938. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  1939. else
  1940. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  1941. endif
  1942. else
  1943. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  1944. endif
  1945. endif
  1946. endif
  1947. ifndef INSTALL_DOCDIR
  1948. ifdef UNIXHier
  1949. ifdef BSDhier
  1950. DOCPREFIXDIR=share/doc
  1951. else
  1952. ifdef linuxHier
  1953. DOCPREFIXDIR=share/doc
  1954. else
  1955. DOCPREFIXDIR=doc
  1956. endif
  1957. endif
  1958. ifdef INSTALL_FPCPACKAGE
  1959. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1960. else
  1961. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1962. endif
  1963. else
  1964. ifdef INSTALL_FPCPACKAGE
  1965. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  1966. else
  1967. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  1968. endif
  1969. endif
  1970. endif
  1971. ifndef INSTALL_EXAMPLEDIR
  1972. ifdef UNIXHier
  1973. ifdef INSTALL_FPCPACKAGE
  1974. ifdef BSDhier
  1975. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1976. else
  1977. ifdef linuxHier
  1978. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  1979. else
  1980. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  1981. endif
  1982. endif
  1983. else
  1984. ifdef BSDhier
  1985. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1986. else
  1987. ifdef linuxHier
  1988. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1989. else
  1990. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1991. endif
  1992. endif
  1993. endif
  1994. else
  1995. ifdef INSTALL_FPCPACKAGE
  1996. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  1997. else
  1998. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  1999. endif
  2000. endif
  2001. endif
  2002. ifndef INSTALL_DATADIR
  2003. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  2004. endif
  2005. ifndef INSTALL_SHAREDDIR
  2006. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  2007. endif
  2008. ifdef CROSSCOMPILE
  2009. ifndef CROSSBINDIR
  2010. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  2011. ifeq ($(CROSSBINDIR),)
  2012. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  2013. endif
  2014. endif
  2015. else
  2016. CROSSBINDIR=
  2017. endif
  2018. ifeq ($(OS_SOURCE),linux)
  2019. ifndef GCCLIBDIR
  2020. ifeq ($(CPU_TARGET),i386)
  2021. ifneq ($(filter x86_64,$(shell uname -a)),)
  2022. ifeq ($(BINUTILSPREFIX),)
  2023. GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
  2024. else
  2025. CROSSGCCOPT=-m32
  2026. endif
  2027. endif
  2028. endif
  2029. ifeq ($(CPU_TARGET),powerpc)
  2030. ifeq ($(BINUTILSPREFIX),)
  2031. GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
  2032. else
  2033. CROSSGCCOPT=-m32
  2034. endif
  2035. endif
  2036. ifeq ($(CPU_TARGET),powerpc64)
  2037. ifeq ($(BINUTILSPREFIX),)
  2038. GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
  2039. else
  2040. CROSSGCCOPT=-m64
  2041. endif
  2042. endif
  2043. ifeq ($(CPU_TARGET),sparc)
  2044. ifneq ($(filter sparc64,$(shell uname -a)),)
  2045. ifeq ($(BINUTILSPREFIX),)
  2046. GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
  2047. else
  2048. CROSSGCCOPT=-m32
  2049. endif
  2050. endif
  2051. endif
  2052. ifneq ($(filter $(CPU_TARGET),mips64 mipsel64),)
  2053. ifeq ($(BINUTILSPREFIX),)
  2054. GCCLIBDIR:=$(shell dirname `gcc -mabi=64 -print-libgcc-file-name`)
  2055. else
  2056. CROSSGCCOPT=-mabi=64
  2057. endif
  2058. endif
  2059. ifneq ($(filter $(CPU_TARGET),mips mipsel),)
  2060. ifeq ($(BINUTILSPREFIX),)
  2061. GCCLIBDIR:=$(shell dirname `gcc -mabi=32 -print-libgcc-file-name`)
  2062. else
  2063. CROSSGCCOPT=-mabi=32
  2064. endif
  2065. endif
  2066. ifeq ($(BINUTILSPREFIX),)
  2067. ifeq ($(GCCLIBDIR),)
  2068. GCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
  2069. endif
  2070. else
  2071. ifeq ($(CROSSGCCOPT),)
  2072. CROSSGCCOPT=-g
  2073. endif
  2074. endif
  2075. endif
  2076. ifdef FPCFPMAKE
  2077. FPCFPMAKE_CPU_TARGET=$(shell $(FPCFPMAKE) -iTP)
  2078. ifeq ($(CPU_TARGET),$(FPCFPMAKE_CPU_TARGET))
  2079. FPCMAKEGCCLIBDIR:=$(GCCLIBDIR)
  2080. else
  2081. ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),aarch64 powerpc64 riscv64 sparc64 x86_64 loongarch64),)
  2082. FPCMAKE_CROSSGCCOPT=-m64
  2083. else
  2084. ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),mips64 mips64el),)
  2085. FPCMAKE_CROSSGCCOPT=-mabi=64
  2086. else
  2087. ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),mips mipsel),)
  2088. FPCMAKE_CROSSGCCOPT=-mabi=32
  2089. else
  2090. ifeq ($(FPCFPMAKE_CPU_TARGET),riscv64)
  2091. FPCMAKE_CROSSGCCOPT=-mabi=lp64
  2092. else
  2093. ifeq ($(FPCFPMAKE_CPU_TARGET),riscv32)
  2094. FPCMAKE_CROSSGCCOPT=-mabi=ilp32
  2095. else
  2096. ifeq ($(FPCFPMAKE_CPU_TARGET),loongarch64)
  2097. FPCMAKE_CROSSGCCOPT=-mabi=lp64d
  2098. else
  2099. FPCMAKE_CROSSGCCOPT=-m32
  2100. endif
  2101. endif
  2102. endif
  2103. endif
  2104. endif
  2105. endif
  2106. FPCMAKEGCCLIBDIR:=$(shell dirname `gcc $(FPCMAKE_CROSSGCCOPT) -print-libgcc-file-name`)
  2107. endif
  2108. endif
  2109. ifndef FPCMAKEGCCLIBDIR
  2110. FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
  2111. endif
  2112. ifndef GCCLIBDIR
  2113. CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
  2114. ifneq ($(CROSSGCC),)
  2115. GCCLIBDIR:=$(shell dirname `$(CROSSGCC) $(CROSSGCCOPT) -print-libgcc-file-name`)
  2116. endif
  2117. endif
  2118. endif
  2119. ifdef inUnix
  2120. ifeq ($(OS_SOURCE),netbsd)
  2121. OTHERLIBDIR:=/usr/pkg/lib
  2122. endif
  2123. export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
  2124. endif
  2125. BATCHEXT=.bat
  2126. LOADEREXT=.as
  2127. EXEEXT=.exe
  2128. PPLEXT=.ppl
  2129. PPUEXT=.ppu
  2130. OEXT=.o
  2131. LTOEXT=.bc
  2132. ASMEXT=.s
  2133. SMARTEXT=.sl
  2134. STATICLIBEXT=.a
  2135. SHAREDLIBEXT=.so
  2136. SHAREDLIBPREFIX=libfp
  2137. STATICLIBPREFIX=libp
  2138. IMPORTLIBPREFIX=libimp
  2139. RSTEXT=.rsj
  2140. EXEDBGEXT=.dbg
  2141. ALL_EXEEXT=.exe
  2142. ifeq ($(OS_TARGET),go32v1)
  2143. STATICLIBPREFIX=
  2144. SHORTSUFFIX=v1
  2145. endif
  2146. ifeq ($(OS_TARGET),go32v2)
  2147. STATICLIBPREFIX=
  2148. SHORTSUFFIX=dos
  2149. IMPORTLIBPREFIX=
  2150. endif
  2151. ifeq ($(OS_TARGET),watcom)
  2152. STATICLIBPREFIX=
  2153. OEXT=.obj
  2154. ASMEXT=.asm
  2155. SHAREDLIBEXT=.dll
  2156. SHORTSUFFIX=wat
  2157. IMPORTLIBPREFIX=
  2158. endif
  2159. ifneq ($(CPU_TARGET),jvm)
  2160. ifeq ($(OS_TARGET),android)
  2161. BATCHEXT=.sh
  2162. EXEEXT=
  2163. HASSHAREDLIB=1
  2164. SHORTSUFFIX=lnx
  2165. endif
  2166. endif
  2167. ifeq ($(OS_TARGET),linux)
  2168. BATCHEXT=.sh
  2169. EXEEXT=
  2170. HASSHAREDLIB=1
  2171. SHORTSUFFIX=lnx
  2172. endif
  2173. ifeq ($(OS_TARGET),dragonfly)
  2174. BATCHEXT=.sh
  2175. EXEEXT=
  2176. HASSHAREDLIB=1
  2177. SHORTSUFFIX=df
  2178. endif
  2179. ifeq ($(OS_TARGET),freebsd)
  2180. BATCHEXT=.sh
  2181. EXEEXT=
  2182. HASSHAREDLIB=1
  2183. SHORTSUFFIX=fbs
  2184. endif
  2185. ifeq ($(OS_TARGET),netbsd)
  2186. BATCHEXT=.sh
  2187. EXEEXT=
  2188. HASSHAREDLIB=1
  2189. SHORTSUFFIX=nbs
  2190. endif
  2191. ifeq ($(OS_TARGET),openbsd)
  2192. BATCHEXT=.sh
  2193. EXEEXT=
  2194. HASSHAREDLIB=1
  2195. SHORTSUFFIX=obs
  2196. endif
  2197. ifeq ($(OS_TARGET),win32)
  2198. SHAREDLIBEXT=.dll
  2199. SHORTSUFFIX=w32
  2200. endif
  2201. ifeq ($(OS_TARGET),os2)
  2202. BATCHEXT=.cmd
  2203. AOUTEXT=.out
  2204. STATICLIBPREFIX=
  2205. SHAREDLIBEXT=.dll
  2206. SHORTSUFFIX=os2
  2207. ECHO=echo
  2208. IMPORTLIBPREFIX=
  2209. endif
  2210. ifeq ($(OS_TARGET),emx)
  2211. BATCHEXT=.cmd
  2212. AOUTEXT=.out
  2213. STATICLIBPREFIX=
  2214. SHAREDLIBEXT=.dll
  2215. SHORTSUFFIX=emx
  2216. ECHO=echo
  2217. IMPORTLIBPREFIX=
  2218. endif
  2219. ifeq ($(OS_TARGET),amiga)
  2220. EXEEXT=
  2221. SHAREDLIBEXT=.library
  2222. SHORTSUFFIX=amg
  2223. endif
  2224. ifeq ($(OS_TARGET),aros)
  2225. EXEEXT=
  2226. SHAREDLIBEXT=.library
  2227. SHORTSUFFIX=aros
  2228. endif
  2229. ifeq ($(OS_TARGET),morphos)
  2230. EXEEXT=
  2231. SHAREDLIBEXT=.library
  2232. SHORTSUFFIX=mos
  2233. endif
  2234. ifeq ($(OS_TARGET),atari)
  2235. EXEEXT=.ttp
  2236. SHORTSUFFIX=ata
  2237. endif
  2238. ALL_EXEEXT+=.ttp
  2239. ifeq ($(OS_TARGET),beos)
  2240. BATCHEXT=.sh
  2241. EXEEXT=
  2242. SHORTSUFFIX=be
  2243. endif
  2244. ifeq ($(OS_TARGET),haiku)
  2245. BATCHEXT=.sh
  2246. EXEEXT=
  2247. SHORTSUFFIX=hai
  2248. endif
  2249. ifeq ($(OS_TARGET),solaris)
  2250. BATCHEXT=.sh
  2251. EXEEXT=
  2252. SHORTSUFFIX=sun
  2253. endif
  2254. ifeq ($(OS_TARGET),qnx)
  2255. BATCHEXT=.sh
  2256. EXEEXT=
  2257. SHORTSUFFIX=qnx
  2258. endif
  2259. ifeq ($(OS_TARGET),netware)
  2260. EXEEXT=.nlm
  2261. STATICLIBPREFIX=
  2262. SHORTSUFFIX=nw
  2263. IMPORTLIBPREFIX=imp
  2264. endif
  2265. ALL_EXEEXT+=.nlm
  2266. ifeq ($(OS_TARGET),netwlibc)
  2267. EXEEXT=.nlm
  2268. STATICLIBPREFIX=
  2269. SHORTSUFFIX=nwl
  2270. IMPORTLIBPREFIX=imp
  2271. endif
  2272. ifeq ($(OS_TARGET),macosclassic)
  2273. BATCHEXT=
  2274. EXEEXT=
  2275. DEBUGSYMEXT=.xcoff
  2276. SHORTSUFFIX=mac
  2277. IMPORTLIBPREFIX=imp
  2278. endif
  2279. ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
  2280. BATCHEXT=.sh
  2281. EXEEXT=
  2282. HASSHAREDLIB=1
  2283. SHORTSUFFIX=dwn
  2284. EXEDBGEXT=.dSYM
  2285. endif
  2286. ifeq ($(OS_TARGET),gba)
  2287. EXEEXT=.gba
  2288. SHAREDLIBEXT=.so
  2289. SHORTSUFFIX=gba
  2290. endif
  2291. ALL_EXEEXT+=.gba
  2292. ifeq ($(OS_TARGET),symbian)
  2293. SHAREDLIBEXT=.dll
  2294. SHORTSUFFIX=symbian
  2295. endif
  2296. ifeq ($(OS_TARGET),NativeNT)
  2297. SHAREDLIBEXT=.dll
  2298. SHORTSUFFIX=nativent
  2299. endif
  2300. ifeq ($(OS_TARGET),wii)
  2301. EXEEXT=.dol
  2302. SHAREDLIBEXT=.so
  2303. SHORTSUFFIX=wii
  2304. endif
  2305. ALL_EXEEXT+=.dol
  2306. ifeq ($(OS_TARGET),aix)
  2307. BATCHEXT=.sh
  2308. EXEEXT=
  2309. SHAREDLIBEXT=.a
  2310. SHORTSUFFIX=aix
  2311. endif
  2312. ifeq ($(OS_TARGET),java)
  2313. OEXT=.class
  2314. ASMEXT=.j
  2315. SHAREDLIBEXT=.jar
  2316. SHORTSUFFIX=java
  2317. endif
  2318. ifeq ($(CPU_TARGET),jvm)
  2319. ifeq ($(OS_TARGET),android)
  2320. OEXT=.class
  2321. ASMEXT=.j
  2322. SHAREDLIBEXT=.jar
  2323. SHORTSUFFIX=android
  2324. endif
  2325. endif
  2326. ifeq ($(OS_TARGET),msdos)
  2327. STATICLIBPREFIX=
  2328. STATICLIBEXT=.a
  2329. SHORTSUFFIX=d16
  2330. endif
  2331. ifeq ($(OS_TARGET),msxdos)
  2332. STATICLIBPREFIX=
  2333. STATICLIBEXT=.a
  2334. SHORTSUFFIX=msd
  2335. endif
  2336. ifeq ($(OS_TARGET),embedded)
  2337. ifeq ($(CPU_TARGET),i8086)
  2338. STATICLIBPREFIX=
  2339. STATICLIBEXT=.a
  2340. else
  2341. EXEEXT=.bin
  2342. endif
  2343. ifeq ($(CPU_TARGET),z80)
  2344. OEXT=.rel
  2345. endif
  2346. SHORTSUFFIX=emb
  2347. endif
  2348. ALL_EXEEXT+=.bin
  2349. ifeq ($(OS_TARGET),win16)
  2350. STATICLIBPREFIX=
  2351. STATICLIBEXT=.a
  2352. SHAREDLIBEXT=.dll
  2353. SHORTSUFFIX=w16
  2354. endif
  2355. ifeq ($(OS_TARGET),zxspectrum)
  2356. OEXT=.rel
  2357. endif
  2358. ifeq ($(OS_TARGET),wasip1)
  2359. EXEEXT=.wasm
  2360. endif
  2361. ALL_EXEEXT+=.wasm
  2362. ifeq ($(OS_TARGET),wasip1threads)
  2363. EXEEXT=.wasm
  2364. endif
  2365. ifeq ($(OS_TARGET),wasip2)
  2366. EXEEXT=.wasm
  2367. endif
  2368. ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
  2369. FPCMADE=fpcmade.$(SHORTSUFFIX)
  2370. ZIPSUFFIX=$(SHORTSUFFIX)
  2371. ZIPCROSSPREFIX=
  2372. ZIPSOURCESUFFIX=src
  2373. ZIPEXAMPLESUFFIX=exm
  2374. else
  2375. FPCMADE=fpcmade.$(TARGETSUFFIX)
  2376. ZIPSOURCESUFFIX=.source
  2377. ZIPEXAMPLESUFFIX=.examples
  2378. ifdef CROSSCOMPILE
  2379. ZIPSUFFIX=.$(SOURCESUFFIX)
  2380. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  2381. else
  2382. ZIPSUFFIX=.$(TARGETSUFFIX)
  2383. ZIPCROSSPREFIX=
  2384. endif
  2385. endif
  2386. ifndef ECHO
  2387. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  2388. ifeq ($(ECHO),)
  2389. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  2390. ifeq ($(ECHO),)
  2391. ECHO= __missing_command_ECHO
  2392. else
  2393. ECHO:=$(firstword $(ECHO))
  2394. endif
  2395. else
  2396. ECHO:=$(firstword $(ECHO))
  2397. endif
  2398. endif
  2399. export ECHO
  2400. ifndef DATE
  2401. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  2402. ifeq ($(DATE),)
  2403. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  2404. ifeq ($(DATE),)
  2405. DATE= __missing_command_DATE
  2406. else
  2407. DATE:=$(firstword $(DATE))
  2408. endif
  2409. else
  2410. DATE:=$(firstword $(DATE))
  2411. endif
  2412. endif
  2413. export DATE
  2414. ifndef GINSTALL
  2415. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  2416. ifeq ($(GINSTALL),)
  2417. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  2418. ifeq ($(GINSTALL),)
  2419. GINSTALL= __missing_command_GINSTALL
  2420. else
  2421. GINSTALL:=$(firstword $(GINSTALL))
  2422. endif
  2423. else
  2424. GINSTALL:=$(firstword $(GINSTALL))
  2425. endif
  2426. endif
  2427. export GINSTALL
  2428. ifndef CPPROG
  2429. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  2430. ifeq ($(CPPROG),)
  2431. CPPROG= __missing_command_CPPROG
  2432. else
  2433. CPPROG:=$(firstword $(CPPROG))
  2434. endif
  2435. endif
  2436. export CPPROG
  2437. ifndef RMPROG
  2438. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  2439. ifeq ($(RMPROG),)
  2440. RMPROG= __missing_command_RMPROG
  2441. else
  2442. RMPROG:=$(firstword $(RMPROG))
  2443. endif
  2444. endif
  2445. export RMPROG
  2446. ifndef MVPROG
  2447. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  2448. ifeq ($(MVPROG),)
  2449. MVPROG= __missing_command_MVPROG
  2450. else
  2451. MVPROG:=$(firstword $(MVPROG))
  2452. endif
  2453. endif
  2454. export MVPROG
  2455. ifndef MKDIRPROG
  2456. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2457. ifeq ($(MKDIRPROG),)
  2458. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2459. ifeq ($(MKDIRPROG),)
  2460. MKDIRPROG= __missing_command_MKDIRPROG
  2461. else
  2462. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2463. endif
  2464. else
  2465. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2466. endif
  2467. endif
  2468. export MKDIRPROG
  2469. ifndef ECHOREDIR
  2470. ifndef inUnix
  2471. ECHOREDIR=echo
  2472. else
  2473. ECHOREDIR=$(ECHO)
  2474. endif
  2475. endif
  2476. ifndef COPY
  2477. COPY:=$(CPPROG) -fp
  2478. endif
  2479. ifndef COPYTREE
  2480. COPYTREE:=$(CPPROG) -Rfp
  2481. endif
  2482. ifndef MKDIRTREE
  2483. MKDIRTREE:=$(MKDIRPROG) -p
  2484. endif
  2485. ifndef MOVE
  2486. MOVE:=$(MVPROG) -f
  2487. endif
  2488. ifndef DEL
  2489. DEL:=$(RMPROG) -f
  2490. endif
  2491. ifndef DELTREE
  2492. DELTREE:=$(RMPROG) -rf
  2493. endif
  2494. ifndef INSTALL
  2495. ifdef inUnix
  2496. INSTALL:=$(GINSTALL) -c -m 644
  2497. else
  2498. INSTALL:=$(COPY)
  2499. endif
  2500. endif
  2501. ifndef INSTALLEXE
  2502. ifdef inUnix
  2503. INSTALLEXE:=$(GINSTALL) -c -m 755
  2504. else
  2505. INSTALLEXE:=$(COPY)
  2506. endif
  2507. endif
  2508. ifndef MKDIR
  2509. MKDIR:=$(GINSTALL) -m 755 -d
  2510. endif
  2511. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  2512. ifndef PPUMOVE
  2513. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  2514. ifeq ($(PPUMOVE),)
  2515. PPUMOVE= __missing_command_PPUMOVE
  2516. else
  2517. PPUMOVE:=$(firstword $(PPUMOVE))
  2518. endif
  2519. endif
  2520. export PPUMOVE
  2521. ifndef FPCMAKE
  2522. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  2523. ifeq ($(FPCMAKE),)
  2524. FPCMAKE= __missing_command_FPCMAKE
  2525. else
  2526. FPCMAKE:=$(firstword $(FPCMAKE))
  2527. endif
  2528. endif
  2529. export FPCMAKE
  2530. ifndef ZIPPROG
  2531. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  2532. ifeq ($(ZIPPROG),)
  2533. ZIPPROG= __missing_command_ZIPPROG
  2534. else
  2535. ZIPPROG:=$(firstword $(ZIPPROG))
  2536. endif
  2537. endif
  2538. export ZIPPROG
  2539. ifndef TARPROG
  2540. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  2541. ifeq ($(TARPROG),)
  2542. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  2543. ifeq ($(TARPROG),)
  2544. TARPROG= __missing_command_TARPROG
  2545. else
  2546. TARPROG:=$(firstword $(TARPROG))
  2547. endif
  2548. else
  2549. TARPROG:=$(firstword $(TARPROG))
  2550. endif
  2551. endif
  2552. export TARPROG
  2553. ASNAME=$(BINUTILSPREFIX)as
  2554. LDNAME=$(BINUTILSPREFIX)ld
  2555. ARNAME=$(BINUTILSPREFIX)ar
  2556. RCNAME=$(BINUTILSPREFIX)rc
  2557. NASMNAME=$(BINUTILSPREFIX)nasm
  2558. ifndef ASPROG
  2559. ifdef CROSSBINDIR
  2560. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  2561. else
  2562. ASPROG=$(ASNAME)
  2563. endif
  2564. endif
  2565. ifndef LDPROG
  2566. ifdef CROSSBINDIR
  2567. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  2568. else
  2569. LDPROG=$(LDNAME)
  2570. endif
  2571. endif
  2572. ifndef RCPROG
  2573. ifdef CROSSBINDIR
  2574. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  2575. else
  2576. RCPROG=$(RCNAME)
  2577. endif
  2578. endif
  2579. ifndef ARPROG
  2580. ifdef CROSSBINDIR
  2581. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  2582. else
  2583. ARPROG=$(ARNAME)
  2584. endif
  2585. endif
  2586. ifndef NASMPROG
  2587. ifdef CROSSBINDIR
  2588. NASMPROG=$(CROSSBINDIR)/$(NASMNAME)$(SRCEXEEXT)
  2589. else
  2590. NASMPROG=$(NASMNAME)
  2591. endif
  2592. endif
  2593. AS=$(ASPROG)
  2594. LD=$(LDPROG)
  2595. RC=$(RCPROG)
  2596. AR=$(ARPROG)
  2597. NASM=$(NASMPROG)
  2598. ifdef inUnix
  2599. PPAS=./ppas$(SRCBATCHEXT)
  2600. else
  2601. PPAS=ppas$(SRCBATCHEXT)
  2602. endif
  2603. ifdef inUnix
  2604. LDCONFIG=ldconfig
  2605. else
  2606. LDCONFIG=
  2607. endif
  2608. ifdef DATE
  2609. DATESTR:=$(shell $(DATE) +%Y%m%d)
  2610. else
  2611. DATESTR=
  2612. endif
  2613. ZIPOPT=-9
  2614. ZIPEXT=.zip
  2615. ifeq ($(USETAR),bz2)
  2616. TAROPT=vj
  2617. TAREXT=.tar.bz2
  2618. else
  2619. TAROPT=vz
  2620. TAREXT=.tar.gz
  2621. endif
  2622. override REQUIRE_PACKAGES=rtl rtl rtl-extra
  2623. ifeq ($(CPU_OS_TARGET),i386-linux)
  2624. REQUIRE_PACKAGES_RTL=1
  2625. REQUIRE_PACKAGES_RTL-EXTRA=1
  2626. endif
  2627. ifeq ($(CPU_OS_TARGET),i386-go32v2)
  2628. REQUIRE_PACKAGES_RTL=1
  2629. REQUIRE_PACKAGES_RTL-EXTRA=1
  2630. endif
  2631. ifeq ($(CPU_OS_TARGET),i386-win32)
  2632. REQUIRE_PACKAGES_RTL=1
  2633. REQUIRE_PACKAGES_RTL-EXTRA=1
  2634. endif
  2635. ifeq ($(CPU_OS_TARGET),i386-os2)
  2636. REQUIRE_PACKAGES_RTL=1
  2637. REQUIRE_PACKAGES_RTL-EXTRA=1
  2638. endif
  2639. ifeq ($(CPU_OS_TARGET),i386-freebsd)
  2640. REQUIRE_PACKAGES_RTL=1
  2641. REQUIRE_PACKAGES_RTL-EXTRA=1
  2642. endif
  2643. ifeq ($(CPU_OS_TARGET),i386-beos)
  2644. REQUIRE_PACKAGES_RTL=1
  2645. REQUIRE_PACKAGES_RTL-EXTRA=1
  2646. endif
  2647. ifeq ($(CPU_OS_TARGET),i386-haiku)
  2648. REQUIRE_PACKAGES_RTL=1
  2649. REQUIRE_PACKAGES_RTL-EXTRA=1
  2650. endif
  2651. ifeq ($(CPU_OS_TARGET),i386-netbsd)
  2652. REQUIRE_PACKAGES_RTL=1
  2653. REQUIRE_PACKAGES_RTL-EXTRA=1
  2654. endif
  2655. ifeq ($(CPU_OS_TARGET),i386-solaris)
  2656. REQUIRE_PACKAGES_RTL=1
  2657. REQUIRE_PACKAGES_RTL-EXTRA=1
  2658. endif
  2659. ifeq ($(CPU_OS_TARGET),i386-qnx)
  2660. REQUIRE_PACKAGES_RTL=1
  2661. REQUIRE_PACKAGES_RTL-EXTRA=1
  2662. endif
  2663. ifeq ($(CPU_OS_TARGET),i386-netware)
  2664. REQUIRE_PACKAGES_RTL=1
  2665. REQUIRE_PACKAGES_RTL-EXTRA=1
  2666. endif
  2667. ifeq ($(CPU_OS_TARGET),i386-openbsd)
  2668. REQUIRE_PACKAGES_RTL=1
  2669. REQUIRE_PACKAGES_RTL-EXTRA=1
  2670. endif
  2671. ifeq ($(CPU_OS_TARGET),i386-wdosx)
  2672. REQUIRE_PACKAGES_RTL=1
  2673. REQUIRE_PACKAGES_RTL-EXTRA=1
  2674. endif
  2675. ifeq ($(CPU_OS_TARGET),i386-darwin)
  2676. REQUIRE_PACKAGES_RTL=1
  2677. REQUIRE_PACKAGES_RTL-EXTRA=1
  2678. endif
  2679. ifeq ($(CPU_OS_TARGET),i386-emx)
  2680. REQUIRE_PACKAGES_RTL=1
  2681. REQUIRE_PACKAGES_RTL-EXTRA=1
  2682. endif
  2683. ifeq ($(CPU_OS_TARGET),i386-watcom)
  2684. REQUIRE_PACKAGES_RTL=1
  2685. REQUIRE_PACKAGES_RTL-EXTRA=1
  2686. endif
  2687. ifeq ($(CPU_OS_TARGET),i386-netwlibc)
  2688. REQUIRE_PACKAGES_RTL=1
  2689. REQUIRE_PACKAGES_RTL-EXTRA=1
  2690. endif
  2691. ifeq ($(CPU_OS_TARGET),i386-wince)
  2692. REQUIRE_PACKAGES_RTL=1
  2693. REQUIRE_PACKAGES_RTL-EXTRA=1
  2694. endif
  2695. ifeq ($(CPU_OS_TARGET),i386-embedded)
  2696. REQUIRE_PACKAGES_RTL=1
  2697. REQUIRE_PACKAGES_RTL-EXTRA=1
  2698. endif
  2699. ifeq ($(CPU_OS_TARGET),i386-symbian)
  2700. REQUIRE_PACKAGES_RTL=1
  2701. REQUIRE_PACKAGES_RTL-EXTRA=1
  2702. endif
  2703. ifeq ($(CPU_OS_TARGET),i386-nativent)
  2704. REQUIRE_PACKAGES_RTL=1
  2705. REQUIRE_PACKAGES_RTL-EXTRA=1
  2706. endif
  2707. ifeq ($(CPU_OS_TARGET),i386-iphonesim)
  2708. REQUIRE_PACKAGES_RTL=1
  2709. REQUIRE_PACKAGES_RTL-EXTRA=1
  2710. endif
  2711. ifeq ($(CPU_OS_TARGET),i386-android)
  2712. REQUIRE_PACKAGES_RTL=1
  2713. REQUIRE_PACKAGES_RTL-EXTRA=1
  2714. endif
  2715. ifeq ($(CPU_OS_TARGET),i386-aros)
  2716. REQUIRE_PACKAGES_RTL=1
  2717. REQUIRE_PACKAGES_RTL-EXTRA=1
  2718. endif
  2719. ifeq ($(CPU_OS_TARGET),m68k-linux)
  2720. REQUIRE_PACKAGES_RTL=1
  2721. REQUIRE_PACKAGES_RTL-EXTRA=1
  2722. endif
  2723. ifeq ($(CPU_OS_TARGET),m68k-netbsd)
  2724. REQUIRE_PACKAGES_RTL=1
  2725. REQUIRE_PACKAGES_RTL-EXTRA=1
  2726. endif
  2727. ifeq ($(CPU_OS_TARGET),m68k-amiga)
  2728. REQUIRE_PACKAGES_RTL=1
  2729. REQUIRE_PACKAGES_RTL-EXTRA=1
  2730. endif
  2731. ifeq ($(CPU_OS_TARGET),m68k-atari)
  2732. REQUIRE_PACKAGES_RTL=1
  2733. REQUIRE_PACKAGES_RTL-EXTRA=1
  2734. endif
  2735. ifeq ($(CPU_OS_TARGET),m68k-palmos)
  2736. REQUIRE_PACKAGES_RTL=1
  2737. REQUIRE_PACKAGES_RTL-EXTRA=1
  2738. endif
  2739. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  2740. REQUIRE_PACKAGES_RTL=1
  2741. REQUIRE_PACKAGES_RTL-EXTRA=1
  2742. endif
  2743. ifeq ($(CPU_OS_TARGET),m68k-embedded)
  2744. REQUIRE_PACKAGES_RTL=1
  2745. REQUIRE_PACKAGES_RTL-EXTRA=1
  2746. endif
  2747. ifeq ($(CPU_OS_TARGET),m68k-sinclairql)
  2748. REQUIRE_PACKAGES_RTL=1
  2749. REQUIRE_PACKAGES_RTL-EXTRA=1
  2750. endif
  2751. ifeq ($(CPU_OS_TARGET),m68k-human68k)
  2752. REQUIRE_PACKAGES_RTL=1
  2753. REQUIRE_PACKAGES_RTL-EXTRA=1
  2754. endif
  2755. ifeq ($(CPU_OS_TARGET),powerpc-linux)
  2756. REQUIRE_PACKAGES_RTL=1
  2757. REQUIRE_PACKAGES_RTL-EXTRA=1
  2758. endif
  2759. ifeq ($(CPU_OS_TARGET),powerpc-netbsd)
  2760. REQUIRE_PACKAGES_RTL=1
  2761. REQUIRE_PACKAGES_RTL-EXTRA=1
  2762. endif
  2763. ifeq ($(CPU_OS_TARGET),powerpc-amiga)
  2764. REQUIRE_PACKAGES_RTL=1
  2765. REQUIRE_PACKAGES_RTL-EXTRA=1
  2766. endif
  2767. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  2768. REQUIRE_PACKAGES_RTL=1
  2769. REQUIRE_PACKAGES_RTL-EXTRA=1
  2770. endif
  2771. ifeq ($(CPU_OS_TARGET),powerpc-darwin)
  2772. REQUIRE_PACKAGES_RTL=1
  2773. REQUIRE_PACKAGES_RTL-EXTRA=1
  2774. endif
  2775. ifeq ($(CPU_OS_TARGET),powerpc-morphos)
  2776. REQUIRE_PACKAGES_RTL=1
  2777. REQUIRE_PACKAGES_RTL-EXTRA=1
  2778. endif
  2779. ifeq ($(CPU_OS_TARGET),powerpc-embedded)
  2780. REQUIRE_PACKAGES_RTL=1
  2781. REQUIRE_PACKAGES_RTL-EXTRA=1
  2782. endif
  2783. ifeq ($(CPU_OS_TARGET),powerpc-wii)
  2784. REQUIRE_PACKAGES_RTL=1
  2785. REQUIRE_PACKAGES_RTL-EXTRA=1
  2786. endif
  2787. ifeq ($(CPU_OS_TARGET),powerpc-aix)
  2788. REQUIRE_PACKAGES_RTL=1
  2789. REQUIRE_PACKAGES_RTL-EXTRA=1
  2790. endif
  2791. ifeq ($(CPU_OS_TARGET),sparc-linux)
  2792. REQUIRE_PACKAGES_RTL=1
  2793. REQUIRE_PACKAGES_RTL-EXTRA=1
  2794. endif
  2795. ifeq ($(CPU_OS_TARGET),sparc-netbsd)
  2796. REQUIRE_PACKAGES_RTL=1
  2797. REQUIRE_PACKAGES_RTL-EXTRA=1
  2798. endif
  2799. ifeq ($(CPU_OS_TARGET),sparc-solaris)
  2800. REQUIRE_PACKAGES_RTL=1
  2801. REQUIRE_PACKAGES_RTL-EXTRA=1
  2802. endif
  2803. ifeq ($(CPU_OS_TARGET),sparc-embedded)
  2804. REQUIRE_PACKAGES_RTL=1
  2805. REQUIRE_PACKAGES_RTL-EXTRA=1
  2806. endif
  2807. ifeq ($(CPU_OS_TARGET),x86_64-linux)
  2808. REQUIRE_PACKAGES_RTL=1
  2809. REQUIRE_PACKAGES_RTL-EXTRA=1
  2810. endif
  2811. ifeq ($(CPU_OS_TARGET),x86_64-freebsd)
  2812. REQUIRE_PACKAGES_RTL=1
  2813. REQUIRE_PACKAGES_RTL-EXTRA=1
  2814. endif
  2815. ifeq ($(CPU_OS_TARGET),x86_64-haiku)
  2816. REQUIRE_PACKAGES_RTL=1
  2817. REQUIRE_PACKAGES_RTL-EXTRA=1
  2818. endif
  2819. ifeq ($(CPU_OS_TARGET),x86_64-netbsd)
  2820. REQUIRE_PACKAGES_RTL=1
  2821. REQUIRE_PACKAGES_RTL-EXTRA=1
  2822. endif
  2823. ifeq ($(CPU_OS_TARGET),x86_64-solaris)
  2824. REQUIRE_PACKAGES_RTL=1
  2825. REQUIRE_PACKAGES_RTL-EXTRA=1
  2826. endif
  2827. ifeq ($(CPU_OS_TARGET),x86_64-openbsd)
  2828. REQUIRE_PACKAGES_RTL=1
  2829. REQUIRE_PACKAGES_RTL-EXTRA=1
  2830. endif
  2831. ifeq ($(CPU_OS_TARGET),x86_64-darwin)
  2832. REQUIRE_PACKAGES_RTL=1
  2833. REQUIRE_PACKAGES_RTL-EXTRA=1
  2834. endif
  2835. ifeq ($(CPU_OS_TARGET),x86_64-win64)
  2836. REQUIRE_PACKAGES_RTL=1
  2837. REQUIRE_PACKAGES_RTL-EXTRA=1
  2838. endif
  2839. ifeq ($(CPU_OS_TARGET),x86_64-embedded)
  2840. REQUIRE_PACKAGES_RTL=1
  2841. REQUIRE_PACKAGES_RTL-EXTRA=1
  2842. endif
  2843. ifeq ($(CPU_OS_TARGET),x86_64-iphonesim)
  2844. REQUIRE_PACKAGES_RTL=1
  2845. REQUIRE_PACKAGES_RTL-EXTRA=1
  2846. endif
  2847. ifeq ($(CPU_OS_TARGET),x86_64-android)
  2848. REQUIRE_PACKAGES_RTL=1
  2849. REQUIRE_PACKAGES_RTL-EXTRA=1
  2850. endif
  2851. ifeq ($(CPU_OS_TARGET),x86_64-aros)
  2852. REQUIRE_PACKAGES_RTL=1
  2853. REQUIRE_PACKAGES_RTL-EXTRA=1
  2854. endif
  2855. ifeq ($(CPU_OS_TARGET),x86_64-dragonfly)
  2856. REQUIRE_PACKAGES_RTL=1
  2857. REQUIRE_PACKAGES_RTL-EXTRA=1
  2858. endif
  2859. ifeq ($(CPU_OS_TARGET),arm-linux)
  2860. REQUIRE_PACKAGES_RTL=1
  2861. REQUIRE_PACKAGES_RTL-EXTRA=1
  2862. endif
  2863. ifeq ($(CPU_OS_TARGET),arm-netbsd)
  2864. REQUIRE_PACKAGES_RTL=1
  2865. REQUIRE_PACKAGES_RTL-EXTRA=1
  2866. endif
  2867. ifeq ($(CPU_OS_TARGET),arm-palmos)
  2868. REQUIRE_PACKAGES_RTL=1
  2869. REQUIRE_PACKAGES_RTL-EXTRA=1
  2870. endif
  2871. ifeq ($(CPU_OS_TARGET),arm-wince)
  2872. REQUIRE_PACKAGES_RTL=1
  2873. REQUIRE_PACKAGES_RTL-EXTRA=1
  2874. endif
  2875. ifeq ($(CPU_OS_TARGET),arm-gba)
  2876. REQUIRE_PACKAGES_RTL=1
  2877. REQUIRE_PACKAGES_RTL-EXTRA=1
  2878. endif
  2879. ifeq ($(CPU_OS_TARGET),arm-nds)
  2880. REQUIRE_PACKAGES_RTL=1
  2881. REQUIRE_PACKAGES_RTL-EXTRA=1
  2882. endif
  2883. ifeq ($(CPU_OS_TARGET),arm-embedded)
  2884. REQUIRE_PACKAGES_RTL=1
  2885. REQUIRE_PACKAGES_RTL-EXTRA=1
  2886. endif
  2887. ifeq ($(CPU_OS_TARGET),arm-symbian)
  2888. REQUIRE_PACKAGES_RTL=1
  2889. REQUIRE_PACKAGES_RTL-EXTRA=1
  2890. endif
  2891. ifeq ($(CPU_OS_TARGET),arm-android)
  2892. REQUIRE_PACKAGES_RTL=1
  2893. REQUIRE_PACKAGES_RTL-EXTRA=1
  2894. endif
  2895. ifeq ($(CPU_OS_TARGET),arm-aros)
  2896. REQUIRE_PACKAGES_RTL=1
  2897. REQUIRE_PACKAGES_RTL-EXTRA=1
  2898. endif
  2899. ifeq ($(CPU_OS_TARGET),arm-freertos)
  2900. REQUIRE_PACKAGES_RTL=1
  2901. REQUIRE_PACKAGES_RTL-EXTRA=1
  2902. endif
  2903. ifeq ($(CPU_OS_TARGET),arm-ios)
  2904. REQUIRE_PACKAGES_RTL=1
  2905. REQUIRE_PACKAGES_RTL-EXTRA=1
  2906. endif
  2907. ifeq ($(CPU_OS_TARGET),powerpc64-linux)
  2908. REQUIRE_PACKAGES_RTL=1
  2909. REQUIRE_PACKAGES_RTL-EXTRA=1
  2910. endif
  2911. ifeq ($(CPU_OS_TARGET),powerpc64-freebsd)
  2912. REQUIRE_PACKAGES_RTL=1
  2913. REQUIRE_PACKAGES_RTL-EXTRA=1
  2914. endif
  2915. ifeq ($(CPU_OS_TARGET),powerpc64-darwin)
  2916. REQUIRE_PACKAGES_RTL=1
  2917. REQUIRE_PACKAGES_RTL-EXTRA=1
  2918. endif
  2919. ifeq ($(CPU_OS_TARGET),powerpc64-embedded)
  2920. REQUIRE_PACKAGES_RTL=1
  2921. REQUIRE_PACKAGES_RTL-EXTRA=1
  2922. endif
  2923. ifeq ($(CPU_OS_TARGET),powerpc64-aix)
  2924. REQUIRE_PACKAGES_RTL=1
  2925. REQUIRE_PACKAGES_RTL-EXTRA=1
  2926. endif
  2927. ifeq ($(CPU_OS_TARGET),avr-embedded)
  2928. REQUIRE_PACKAGES_RTL=1
  2929. REQUIRE_PACKAGES_RTL-EXTRA=1
  2930. endif
  2931. ifeq ($(CPU_OS_TARGET),armeb-linux)
  2932. REQUIRE_PACKAGES_RTL=1
  2933. REQUIRE_PACKAGES_RTL-EXTRA=1
  2934. endif
  2935. ifeq ($(CPU_OS_TARGET),armeb-embedded)
  2936. REQUIRE_PACKAGES_RTL=1
  2937. REQUIRE_PACKAGES_RTL-EXTRA=1
  2938. endif
  2939. ifeq ($(CPU_OS_TARGET),mips-linux)
  2940. REQUIRE_PACKAGES_RTL=1
  2941. REQUIRE_PACKAGES_RTL-EXTRA=1
  2942. endif
  2943. ifeq ($(CPU_OS_TARGET),mipsel-linux)
  2944. REQUIRE_PACKAGES_RTL=1
  2945. REQUIRE_PACKAGES_RTL-EXTRA=1
  2946. endif
  2947. ifeq ($(CPU_OS_TARGET),mipsel-embedded)
  2948. REQUIRE_PACKAGES_RTL=1
  2949. REQUIRE_PACKAGES_RTL-EXTRA=1
  2950. endif
  2951. ifeq ($(CPU_OS_TARGET),mipsel-android)
  2952. REQUIRE_PACKAGES_RTL=1
  2953. REQUIRE_PACKAGES_RTL-EXTRA=1
  2954. endif
  2955. ifeq ($(CPU_OS_TARGET),mipsel-ps1)
  2956. REQUIRE_PACKAGES_RTL=1
  2957. REQUIRE_PACKAGES_RTL-EXTRA=1
  2958. endif
  2959. ifeq ($(CPU_OS_TARGET),mips64-linux)
  2960. REQUIRE_PACKAGES_RTL=1
  2961. REQUIRE_PACKAGES_RTL-EXTRA=1
  2962. endif
  2963. ifeq ($(CPU_OS_TARGET),mips64el-linux)
  2964. REQUIRE_PACKAGES_RTL=1
  2965. REQUIRE_PACKAGES_RTL-EXTRA=1
  2966. endif
  2967. ifeq ($(CPU_OS_TARGET),jvm-java)
  2968. REQUIRE_PACKAGES_RTL=1
  2969. REQUIRE_PACKAGES_RTL-EXTRA=1
  2970. endif
  2971. ifeq ($(CPU_OS_TARGET),jvm-android)
  2972. REQUIRE_PACKAGES_RTL=1
  2973. REQUIRE_PACKAGES_RTL-EXTRA=1
  2974. endif
  2975. ifeq ($(CPU_OS_TARGET),i8086-embedded)
  2976. REQUIRE_PACKAGES_RTL=1
  2977. REQUIRE_PACKAGES_RTL-EXTRA=1
  2978. endif
  2979. ifeq ($(CPU_OS_TARGET),i8086-msdos)
  2980. REQUIRE_PACKAGES_RTL=1
  2981. REQUIRE_PACKAGES_RTL-EXTRA=1
  2982. endif
  2983. ifeq ($(CPU_OS_TARGET),i8086-win16)
  2984. REQUIRE_PACKAGES_RTL=1
  2985. REQUIRE_PACKAGES_RTL-EXTRA=1
  2986. endif
  2987. ifeq ($(CPU_OS_TARGET),aarch64-linux)
  2988. REQUIRE_PACKAGES_RTL=1
  2989. REQUIRE_PACKAGES_RTL-EXTRA=1
  2990. endif
  2991. ifeq ($(CPU_OS_TARGET),aarch64-freebsd)
  2992. REQUIRE_PACKAGES_RTL=1
  2993. REQUIRE_PACKAGES_RTL-EXTRA=1
  2994. endif
  2995. ifeq ($(CPU_OS_TARGET),aarch64-darwin)
  2996. REQUIRE_PACKAGES_RTL=1
  2997. REQUIRE_PACKAGES_RTL-EXTRA=1
  2998. endif
  2999. ifeq ($(CPU_OS_TARGET),aarch64-win64)
  3000. REQUIRE_PACKAGES_RTL=1
  3001. REQUIRE_PACKAGES_RTL-EXTRA=1
  3002. endif
  3003. ifeq ($(CPU_OS_TARGET),aarch64-embedded)
  3004. REQUIRE_PACKAGES_RTL=1
  3005. REQUIRE_PACKAGES_RTL-EXTRA=1
  3006. endif
  3007. ifeq ($(CPU_OS_TARGET),aarch64-iphonesim)
  3008. REQUIRE_PACKAGES_RTL=1
  3009. REQUIRE_PACKAGES_RTL-EXTRA=1
  3010. endif
  3011. ifeq ($(CPU_OS_TARGET),aarch64-android)
  3012. REQUIRE_PACKAGES_RTL=1
  3013. REQUIRE_PACKAGES_RTL-EXTRA=1
  3014. endif
  3015. ifeq ($(CPU_OS_TARGET),aarch64-ios)
  3016. REQUIRE_PACKAGES_RTL=1
  3017. REQUIRE_PACKAGES_RTL-EXTRA=1
  3018. endif
  3019. ifeq ($(CPU_OS_TARGET),wasm32-embedded)
  3020. REQUIRE_PACKAGES_RTL=1
  3021. REQUIRE_PACKAGES_RTL-EXTRA=1
  3022. endif
  3023. ifeq ($(CPU_OS_TARGET),wasm32-wasip1)
  3024. REQUIRE_PACKAGES_RTL=1
  3025. REQUIRE_PACKAGES_RTL-EXTRA=1
  3026. endif
  3027. ifeq ($(CPU_OS_TARGET),wasm32-wasip1threads)
  3028. REQUIRE_PACKAGES_RTL=1
  3029. REQUIRE_PACKAGES_RTL-EXTRA=1
  3030. endif
  3031. ifeq ($(CPU_OS_TARGET),wasm32-wasip2)
  3032. REQUIRE_PACKAGES_RTL=1
  3033. REQUIRE_PACKAGES_RTL-EXTRA=1
  3034. endif
  3035. ifeq ($(CPU_OS_TARGET),sparc64-linux)
  3036. REQUIRE_PACKAGES_RTL=1
  3037. REQUIRE_PACKAGES_RTL-EXTRA=1
  3038. endif
  3039. ifeq ($(CPU_OS_TARGET),riscv32-linux)
  3040. REQUIRE_PACKAGES_RTL=1
  3041. REQUIRE_PACKAGES_RTL-EXTRA=1
  3042. endif
  3043. ifeq ($(CPU_OS_TARGET),riscv32-embedded)
  3044. REQUIRE_PACKAGES_RTL=1
  3045. REQUIRE_PACKAGES_RTL-EXTRA=1
  3046. endif
  3047. ifeq ($(CPU_OS_TARGET),riscv32-freertos)
  3048. REQUIRE_PACKAGES_RTL=1
  3049. REQUIRE_PACKAGES_RTL-EXTRA=1
  3050. endif
  3051. ifeq ($(CPU_OS_TARGET),riscv64-linux)
  3052. REQUIRE_PACKAGES_RTL=1
  3053. REQUIRE_PACKAGES_RTL-EXTRA=1
  3054. endif
  3055. ifeq ($(CPU_OS_TARGET),riscv64-embedded)
  3056. REQUIRE_PACKAGES_RTL=1
  3057. REQUIRE_PACKAGES_RTL-EXTRA=1
  3058. endif
  3059. ifeq ($(CPU_OS_TARGET),xtensa-linux)
  3060. REQUIRE_PACKAGES_RTL=1
  3061. REQUIRE_PACKAGES_RTL-EXTRA=1
  3062. endif
  3063. ifeq ($(CPU_OS_TARGET),xtensa-embedded)
  3064. REQUIRE_PACKAGES_RTL=1
  3065. REQUIRE_PACKAGES_RTL-EXTRA=1
  3066. endif
  3067. ifeq ($(CPU_OS_TARGET),xtensa-freertos)
  3068. REQUIRE_PACKAGES_RTL=1
  3069. REQUIRE_PACKAGES_RTL-EXTRA=1
  3070. endif
  3071. ifeq ($(CPU_OS_TARGET),z80-embedded)
  3072. REQUIRE_PACKAGES_RTL=1
  3073. REQUIRE_PACKAGES_RTL-EXTRA=1
  3074. endif
  3075. ifeq ($(CPU_OS_TARGET),z80-zxspectrum)
  3076. REQUIRE_PACKAGES_RTL=1
  3077. REQUIRE_PACKAGES_RTL-EXTRA=1
  3078. endif
  3079. ifeq ($(CPU_OS_TARGET),z80-msxdos)
  3080. REQUIRE_PACKAGES_RTL=1
  3081. REQUIRE_PACKAGES_RTL-EXTRA=1
  3082. endif
  3083. ifeq ($(CPU_OS_TARGET),z80-amstradcpc)
  3084. REQUIRE_PACKAGES_RTL=1
  3085. REQUIRE_PACKAGES_RTL-EXTRA=1
  3086. endif
  3087. ifeq ($(CPU_OS_TARGET),loongarch64-linux)
  3088. REQUIRE_PACKAGES_RTL=1
  3089. REQUIRE_PACKAGES_RTL-EXTRA=1
  3090. endif
  3091. ifdef REQUIRE_PACKAGES_RTL
  3092. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  3093. ifeq ($(PACKAGEDIR_RTL),)
  3094. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile,,$(strip $(wildcard $(addsuffix /rtl/Makefile,$(PACKAGESDIR))))))
  3095. ifneq ($(PACKAGEDIR_RTL),)
  3096. PACKAGEDIR_RTL:=$(firstword $(subst /fpmake.pp,,$(strip $(wildcard $(addsuffix /rtl/fpmake.pp,$(PACKAGESDIR))))))
  3097. endif
  3098. endif
  3099. ifneq ($(PACKAGEDIR_RTL),)
  3100. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  3101. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  3102. else
  3103. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  3104. endif
  3105. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)),)
  3106. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)
  3107. else
  3108. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)),)
  3109. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)
  3110. else
  3111. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)
  3112. endif
  3113. endif
  3114. ifdef CHECKDEPEND
  3115. $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
  3116. $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
  3117. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
  3118. endif
  3119. else
  3120. PACKAGEDIR_RTL=
  3121. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  3122. ifneq ($(UNITDIR_RTL),)
  3123. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  3124. else
  3125. UNITDIR_RTL=
  3126. endif
  3127. endif
  3128. ifdef UNITDIR_RTL
  3129. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  3130. endif
  3131. ifdef UNITDIR_FPMAKE_RTL
  3132. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL)
  3133. endif
  3134. endif
  3135. ifdef REQUIRE_PACKAGES_RTL-EXTRA
  3136. PACKAGEDIR_RTL-EXTRA:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl-extra/Makefile.fpc,$(PACKAGESDIR))))))
  3137. ifeq ($(PACKAGEDIR_RTL-EXTRA),)
  3138. PACKAGEDIR_RTL-EXTRA:=$(firstword $(subst /Makefile,,$(strip $(wildcard $(addsuffix /rtl-extra/Makefile,$(PACKAGESDIR))))))
  3139. ifneq ($(PACKAGEDIR_RTL-EXTRA),)
  3140. PACKAGEDIR_RTL-EXTRA:=$(firstword $(subst /fpmake.pp,,$(strip $(wildcard $(addsuffix /rtl-extra/fpmake.pp,$(PACKAGESDIR))))))
  3141. endif
  3142. endif
  3143. ifneq ($(PACKAGEDIR_RTL-EXTRA),)
  3144. ifneq ($(wildcard $(PACKAGEDIR_RTL-EXTRA)/units/$(TARGETSUFFIX)),)
  3145. UNITDIR_RTL-EXTRA=$(PACKAGEDIR_RTL-EXTRA)/units/$(TARGETSUFFIX)
  3146. else
  3147. UNITDIR_RTL-EXTRA=$(PACKAGEDIR_RTL-EXTRA)
  3148. endif
  3149. ifneq ($(wildcard $(PACKAGEDIR_RTL-EXTRA)/units/$(SOURCESUFFIX)),)
  3150. UNITDIR_FPMAKE_RTL-EXTRA=$(PACKAGEDIR_RTL-EXTRA)/units/$(SOURCESUFFIX)
  3151. else
  3152. ifneq ($(wildcard $(PACKAGEDIR_RTL-EXTRA)/units_bs/$(SOURCESUFFIX)),)
  3153. UNITDIR_FPMAKE_RTL-EXTRA=$(PACKAGEDIR_RTL-EXTRA)/units_bs/$(SOURCESUFFIX)
  3154. else
  3155. UNITDIR_FPMAKE_RTL-EXTRA=$(PACKAGEDIR_RTL-EXTRA)
  3156. endif
  3157. endif
  3158. ifdef CHECKDEPEND
  3159. $(PACKAGEDIR_RTL-EXTRA)/$(FPCMADE):
  3160. $(MAKE) -C $(PACKAGEDIR_RTL-EXTRA) $(FPCMADE)
  3161. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL-EXTRA)/$(FPCMADE)
  3162. endif
  3163. else
  3164. PACKAGEDIR_RTL-EXTRA=
  3165. UNITDIR_RTL-EXTRA:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl-extra/Package.fpc,$(UNITSDIR)))))
  3166. ifneq ($(UNITDIR_RTL-EXTRA),)
  3167. UNITDIR_RTL-EXTRA:=$(firstword $(UNITDIR_RTL-EXTRA))
  3168. else
  3169. UNITDIR_RTL-EXTRA=
  3170. endif
  3171. endif
  3172. ifdef UNITDIR_RTL-EXTRA
  3173. override COMPILER_UNITDIR+=$(UNITDIR_RTL-EXTRA)
  3174. endif
  3175. ifdef UNITDIR_FPMAKE_RTL-EXTRA
  3176. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL-EXTRA)
  3177. endif
  3178. endif
  3179. ifndef NOCPUDEF
  3180. override FPCOPTDEF=$(ARCH)
  3181. endif
  3182. ifneq ($(OS_TARGET),$(OS_SOURCE))
  3183. override FPCOPT+=-T$(OS_TARGET)
  3184. endif
  3185. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  3186. override FPCOPT+=-P$(ARCH)
  3187. endif
  3188. ifeq ($(OS_SOURCE),openbsd)
  3189. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  3190. override FPCMAKEOPT+=-FD$(NEW_BINUTILS_PATH)
  3191. override FPMAKE_BUILD_OPT+=-FD$(NEW_BINUTILS_PATH)
  3192. endif
  3193. ifndef CROSSBOOTSTRAP
  3194. ifneq ($(BINUTILSPREFIX),)
  3195. override FPCOPT+=-XP$(BINUTILSPREFIX)
  3196. ifneq ($(RLINKPATH),)
  3197. override FPCOPT+=-Xr$(RLINKPATH)
  3198. endif
  3199. endif
  3200. endif
  3201. ifndef CROSSCOMPILE
  3202. ifneq ($(BINUTILSPREFIX),)
  3203. override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
  3204. override FPMAKE_BUILD_OPT+=-XP$(BINUTILSPREFIX)
  3205. endif
  3206. endif
  3207. ifdef UNITDIR
  3208. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  3209. endif
  3210. ifdef LIBDIR
  3211. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  3212. endif
  3213. ifdef OBJDIR
  3214. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  3215. endif
  3216. ifdef INCDIR
  3217. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  3218. endif
  3219. ifdef LINKSMART
  3220. override FPCOPT+=-XX
  3221. endif
  3222. ifdef CREATESMART
  3223. override FPCOPT+=-CX
  3224. endif
  3225. ifdef DEBUG
  3226. override FPCOPT+=-gl
  3227. override FPCOPTDEF+=DEBUG
  3228. endif
  3229. ifdef RELEASE
  3230. FPCCPUOPT:=-O2
  3231. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  3232. override FPCOPTDEF+=RELEASE
  3233. endif
  3234. ifdef STRIP
  3235. override FPCOPT+=-Xs
  3236. endif
  3237. ifdef OPTIMIZE
  3238. override FPCOPT+=-O2
  3239. endif
  3240. ifdef VERBOSE
  3241. override FPCOPT+=-vwni
  3242. endif
  3243. ifdef COMPILER_OPTIONS
  3244. override FPCOPT+=$(COMPILER_OPTIONS)
  3245. endif
  3246. ifdef COMPILER_UNITDIR
  3247. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  3248. endif
  3249. ifdef COMPILER_LIBRARYDIR
  3250. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  3251. endif
  3252. ifdef COMPILER_OBJECTDIR
  3253. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  3254. endif
  3255. ifdef COMPILER_INCLUDEDIR
  3256. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  3257. endif
  3258. ifdef CROSSBINDIR
  3259. override FPCOPT+=-FD$(CROSSBINDIR)
  3260. endif
  3261. ifdef COMPILER_TARGETDIR
  3262. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  3263. ifeq ($(COMPILER_TARGETDIR),.)
  3264. override TARGETDIRPREFIX=
  3265. else
  3266. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  3267. endif
  3268. endif
  3269. ifdef COMPILER_UNITTARGETDIR
  3270. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  3271. ifeq ($(COMPILER_UNITTARGETDIR),.)
  3272. override UNITTARGETDIRPREFIX=
  3273. else
  3274. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  3275. endif
  3276. else
  3277. ifdef COMPILER_TARGETDIR
  3278. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  3279. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  3280. endif
  3281. endif
  3282. ifdef SYSROOTPATH
  3283. override FPCOPT+=-XR$(SYSROOTPATH)
  3284. else
  3285. ifeq ($(OS_TARGET),$(OS_SOURCE))
  3286. ifeq ($(OS_TARGET),darwin)
  3287. ifeq ($(CPU_TARGET),aarch64)
  3288. ifneq ($(wildcard /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk),)
  3289. override FPCOPT+=-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
  3290. endif
  3291. endif
  3292. endif
  3293. endif
  3294. endif
  3295. ifdef CREATESHARED
  3296. override FPCOPT+=-Cg
  3297. endif
  3298. ifneq ($(filter $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
  3299. ifneq ($(filter $(CPU_TARGET),x86_64 mips mipsel mips64 mips64el riscv64 powerpc64),)
  3300. override FPCOPT+=-Cg
  3301. endif
  3302. endif
  3303. ifneq ($(filter $(CPU_TARGET),z80),)
  3304. override FPCOPT+=-CX -XX
  3305. endif
  3306. ifdef LINKSHARED
  3307. endif
  3308. ifdef GCCLIBDIR
  3309. override FPCOPT+=-Fl$(GCCLIBDIR)
  3310. ifdef FPCMAKEGCCLIBDIR
  3311. override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
  3312. else
  3313. override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
  3314. endif
  3315. endif
  3316. ifdef OTHERLIBDIR
  3317. override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
  3318. endif
  3319. ifdef OPT
  3320. override FPCOPT+=$(OPT)
  3321. endif
  3322. ifdef FPMAKEBUILDOPT
  3323. override FPMAKE_BUILD_OPT+=$(FPMAKEBUILDOPT)
  3324. endif
  3325. ifdef FPCOPTDEF
  3326. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  3327. endif
  3328. ifdef CFGFILE
  3329. override FPCOPT+=@$(CFGFILE)
  3330. endif
  3331. ifdef USEENV
  3332. override FPCEXTCMD:=$(FPCOPT)
  3333. override FPCOPT:=!FPCEXTCMD
  3334. export FPCEXTCMD
  3335. endif
  3336. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  3337. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  3338. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  3339. override ACROSSCOMPILE=1
  3340. endif
  3341. ifdef ACROSSCOMPILE
  3342. override FPCOPT+=$(CROSSOPT)
  3343. endif
  3344. override COMPILER:=$(strip $(FPC) $(FPCOPT))
  3345. ifneq (,$(filter -sh,$(COMPILER)))
  3346. UseEXECPPAS=1
  3347. endif
  3348. ifneq (,$(filter -s,$(COMPILER)))
  3349. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  3350. UseEXECPPAS=1
  3351. endif
  3352. endif
  3353. ifneq ($(UseEXECPPAS),1)
  3354. EXECPPAS=
  3355. else
  3356. ifdef RUNBATCH
  3357. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  3358. else
  3359. EXECPPAS:=@$(PPAS)
  3360. endif
  3361. endif
  3362. .PHONY: fpc_units
  3363. ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
  3364. override ALLTARGET+=fpc_units
  3365. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  3366. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  3367. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  3368. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  3369. endif
  3370. fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
  3371. ifdef TARGET_RSTS
  3372. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  3373. override CLEANRSTFILES+=$(RSTFILES)
  3374. endif
  3375. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  3376. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  3377. @$(ECHOREDIR) Compiled > $(FPCMADE)
  3378. fpc_all: $(FPCMADE)
  3379. fpc_smart:
  3380. $(MAKE) all LINKSMART=1 CREATESMART=1
  3381. fpc_debug:
  3382. $(MAKE) all DEBUG=1
  3383. fpc_release:
  3384. $(MAKE) all RELEASE=1
  3385. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) $(LTOEXT) .pas .lpr .dpr .pp .rc .res
  3386. $(COMPILER_UNITTARGETDIR):
  3387. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  3388. $(COMPILER_TARGETDIR):
  3389. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  3390. %$(PPUEXT): %.pp
  3391. $(COMPILER) $<
  3392. $(EXECPPAS)
  3393. %$(PPUEXT): %.pas
  3394. $(COMPILER) $<
  3395. $(EXECPPAS)
  3396. %$(EXEEXT): %.pp
  3397. $(COMPILER) $<
  3398. $(EXECPPAS)
  3399. %$(EXEEXT): %.pas
  3400. $(COMPILER) $<
  3401. $(EXECPPAS)
  3402. %$(EXEEXT): %.lpr
  3403. $(COMPILER) $<
  3404. $(EXECPPAS)
  3405. %$(EXEEXT): %.dpr
  3406. $(COMPILER) $<
  3407. $(EXECPPAS)
  3408. %.res: %.rc
  3409. windres -i $< -o $@
  3410. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3411. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3412. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3413. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3414. vpath %.inc $(COMPILER_INCLUDEDIR)
  3415. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  3416. vpath %$(LTOEXT) $(COMPILER_UNITTARGETDIR)
  3417. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  3418. .PHONY: fpc_shared
  3419. override INSTALLTARGET+=fpc_shared_install
  3420. ifndef SHARED_LIBVERSION
  3421. SHARED_LIBVERSION=$(FPC_VERSION)
  3422. endif
  3423. ifndef SHARED_LIBNAME
  3424. SHARED_LIBNAME=$(PACKAGE_NAME)
  3425. endif
  3426. ifndef SHARED_FULLNAME
  3427. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  3428. endif
  3429. ifndef SHARED_LIBUNITS
  3430. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  3431. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  3432. endif
  3433. fpc_shared:
  3434. ifdef HASSHAREDLIB
  3435. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  3436. ifneq ($(SHARED_BUILD),n)
  3437. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR) -P$(BINUTILSPREFIX)
  3438. endif
  3439. else
  3440. @$(ECHO) Shared Libraries not supported
  3441. endif
  3442. fpc_shared_install:
  3443. ifneq ($(SHARED_BUILD),n)
  3444. ifneq ($(SHARED_LIBUNITS),)
  3445. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  3446. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  3447. endif
  3448. endif
  3449. endif
  3450. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  3451. ifdef INSTALL_UNITS
  3452. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  3453. endif
  3454. ifdef INSTALL_BUILDUNIT
  3455. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  3456. endif
  3457. ifdef INSTALLPPUFILES
  3458. ifneq ($(IMPORTLIBPREFIX)-$(STATICLIBEXT),$(STATICLIBPREFIX)-$(STATICLIBEXT))
  3459. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  3460. else
  3461. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  3462. endif
  3463. ifneq ($(UNITTARGETDIRPREFIX),)
  3464. override INSTALLPPUFILENAMES:=$(notdir $(INSTALLPPUFILES))
  3465. override INSTALLPPULINKFILENAMES:=$(notdir $(INSTALLPPULINKFILES))
  3466. override INSTALLPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILENAMES))
  3467. override INSTALLPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILENAMES)))
  3468. endif
  3469. override INSTALL_CREATEPACKAGEFPC=1
  3470. endif
  3471. ifdef INSTALLEXEFILES
  3472. ifneq ($(TARGETDIRPREFIX),)
  3473. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  3474. endif
  3475. endif
  3476. fpc_install: all $(INSTALLTARGET)
  3477. ifdef INSTALLEXEFILES
  3478. $(MKDIR) $(INSTALL_BINDIR)
  3479. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  3480. endif
  3481. ifdef INSTALL_CREATEPACKAGEFPC
  3482. ifdef FPCMAKE
  3483. ifdef PACKAGE_VERSION
  3484. ifneq ($(wildcard Makefile.fpc),)
  3485. ifdef FPCMAKENEW
  3486. $(MKDIR) $(INSTALL_UNITDIR)
  3487. $(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  3488. else
  3489. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  3490. $(MKDIR) $(INSTALL_UNITDIR)
  3491. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  3492. endif
  3493. endif
  3494. endif
  3495. endif
  3496. endif
  3497. ifdef INSTALLPPUFILES
  3498. $(MKDIR) $(INSTALL_UNITDIR)
  3499. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  3500. ifneq ($(INSTALLPPULINKFILES),)
  3501. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  3502. endif
  3503. ifneq ($(wildcard $(LIB_FULLNAME)),)
  3504. $(MKDIR) $(INSTALL_LIBDIR)
  3505. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  3506. ifdef inUnix
  3507. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  3508. endif
  3509. endif
  3510. endif
  3511. ifdef INSTALL_FILES
  3512. $(MKDIR) $(INSTALL_DATADIR)
  3513. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  3514. endif
  3515. fpc_sourceinstall: distclean
  3516. $(MKDIR) $(INSTALL_SOURCEDIR)
  3517. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  3518. fpc_exampleinstall: $(EXAMPLEINSTALLTARGET) $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  3519. ifdef HASEXAMPLES
  3520. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  3521. endif
  3522. ifdef EXAMPLESOURCEFILES
  3523. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  3524. endif
  3525. ifdef TARGET_EXAMPLEDIRS
  3526. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  3527. endif
  3528. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  3529. ifdef EXEFILES
  3530. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  3531. override CLEANEXEDBGFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEDBGFILES))
  3532. endif
  3533. ifdef CLEAN_PROGRAMS
  3534. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  3535. override ALL_CLEANEXEFILES+=$(foreach lEXEEXT,$(ALL_EXEEXT),$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(lEXEEXT), $(CLEAN_PROGRAMS))))
  3536. override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
  3537. endif
  3538. ifdef CLEAN_UNITS
  3539. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  3540. endif
  3541. ifdef CLEANPPUFILES
  3542. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  3543. ifdef DEBUGSYMEXT
  3544. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  3545. endif
  3546. override CLEANPPUFILENAMES:=$(CLEANPPUFILES)
  3547. override CLEANPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILENAMES))
  3548. override CLEANPPULINKFILENAMES:=$(CLEANPPULINKFILES)
  3549. override CLEANPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILENAMES)))
  3550. endif
  3551. fpc_clean: $(CLEANTARGET)
  3552. ifdef CLEANEXEFILES
  3553. -$(DEL) $(CLEANEXEFILES)
  3554. endif
  3555. ifdef CLEANEXEDBGFILES
  3556. -$(DELTREE) $(CLEANEXEDBGFILES)
  3557. endif
  3558. ifdef CLEANPPUFILES
  3559. -$(DEL) $(CLEANPPUFILES)
  3560. endif
  3561. ifneq ($(CLEANPPULINKFILES),)
  3562. -$(DEL) $(CLEANPPULINKFILES)
  3563. endif
  3564. ifdef CLEANRSTFILES
  3565. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  3566. endif
  3567. ifdef CLEAN_FILES
  3568. -$(DEL) $(CLEAN_FILES)
  3569. endif
  3570. ifdef LIB_NAME
  3571. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  3572. endif
  3573. -$(DEL) $(FPCMADE) *$(FULL_TARGET).fpm Package.fpc *$(ASMEXT)
  3574. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res symbol_order*.fpc
  3575. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  3576. fpc_cleanall: $(CLEANTARGET)
  3577. ifdef CLEANEXEFILES
  3578. -$(DEL) $(CLEANEXEFILES)
  3579. endif
  3580. ifdef ALL_CLEANEXEFILES
  3581. -$(DEL) $(ALL_CLEANEXEFILES)
  3582. endif
  3583. ifdef COMPILER_UNITTARGETDIR
  3584. ifdef CLEANPPUFILES
  3585. -$(DEL) $(CLEANPPUFILES)
  3586. endif
  3587. ifneq ($(CLEANPPULINKFILES),)
  3588. -$(DEL) $(CLEANPPULINKFILES)
  3589. endif
  3590. ifdef CLEANRSTFILES
  3591. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  3592. endif
  3593. endif
  3594. ifdef CLEAN_FILES
  3595. -$(DEL) $(CLEAN_FILES)
  3596. endif
  3597. -$(DELTREE) units
  3598. -$(DELTREE) bin
  3599. -$(DEL) *$(OEXT) *$(LTOEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  3600. ifneq ($(PPUEXT),.ppu)
  3601. -$(DEL) *.o *.ppu *.a
  3602. endif
  3603. -$(DELTREE) *$(SMARTEXT)
  3604. -$(DEL) fpcmade.* Package*.fpc *.fpm
  3605. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res symbol_order*.fpc
  3606. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  3607. ifdef AOUTEXT
  3608. -$(DEL) *$(AOUTEXT)
  3609. endif
  3610. ifdef DEBUGSYMEXT
  3611. -$(DEL) *$(DEBUGSYMEXT)
  3612. endif
  3613. ifdef LOCALFPMAKEBIN
  3614. -$(DEL) $(LOCALFPMAKEBIN)
  3615. -$(DEL) $(FPMAKEBINOBJ)
  3616. endif
  3617. fpc_distclean: cleanall
  3618. .PHONY: fpc_baseinfo
  3619. override INFORULES+=fpc_baseinfo
  3620. fpc_baseinfo:
  3621. @$(ECHO)
  3622. @$(ECHO) == Package info ==
  3623. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  3624. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  3625. @$(ECHO)
  3626. @$(ECHO) == Configuration info ==
  3627. @$(ECHO)
  3628. @$(ECHO) FPC.......... $(FPC)
  3629. @$(ECHO) FPC Version.. $(FPC_VERSION)
  3630. @$(ECHO) Source CPU... $(CPU_SOURCE)
  3631. @$(ECHO) Target CPU... $(CPU_TARGET)
  3632. @$(ECHO) Source OS.... $(OS_SOURCE)
  3633. @$(ECHO) Target OS.... $(OS_TARGET)
  3634. @$(ECHO) Full Source.. $(FULL_SOURCE)
  3635. @$(ECHO) Full Target.. $(FULL_TARGET)
  3636. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  3637. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  3638. @$(ECHO) FPC fpmake... $(FPCFPMAKE)
  3639. @$(ECHO)
  3640. @$(ECHO) == Directory info ==
  3641. @$(ECHO)
  3642. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  3643. @$(ECHO)
  3644. @$(ECHO) Basedir......... $(BASEDIR)
  3645. @$(ECHO) FPCDir.......... $(FPCDIR)
  3646. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  3647. @$(ECHO) UnitsDir........ $(UNITSDIR)
  3648. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  3649. @$(ECHO)
  3650. @$(ECHO) GCC library..... $(GCCLIBDIR)
  3651. @$(ECHO) Other library... $(OTHERLIBDIR)
  3652. @$(ECHO)
  3653. @$(ECHO) == Tools info ==
  3654. @$(ECHO)
  3655. @$(ECHO) As........ $(AS)
  3656. @$(ECHO) Ld........ $(LD)
  3657. @$(ECHO) Ar........ $(AR)
  3658. @$(ECHO) Rc........ $(RC)
  3659. @$(ECHO)
  3660. @$(ECHO) Mv........ $(MVPROG)
  3661. @$(ECHO) Cp........ $(CPPROG)
  3662. @$(ECHO) Rm........ $(RMPROG)
  3663. @$(ECHO) GInstall.. $(GINSTALL)
  3664. @$(ECHO) Echo...... $(ECHO)
  3665. @$(ECHO) Shell..... $(SHELL)
  3666. @$(ECHO) Date...... $(DATE)
  3667. @$(ECHO) FPCMake... $(FPCMAKE)
  3668. @$(ECHO) PPUMove... $(PPUMOVE)
  3669. @$(ECHO) Zip....... $(ZIPPROG)
  3670. @$(ECHO)
  3671. @$(ECHO) == Object info ==
  3672. @$(ECHO)
  3673. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  3674. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  3675. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  3676. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  3677. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  3678. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  3679. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  3680. @$(ECHO)
  3681. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  3682. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  3683. @$(ECHO)
  3684. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  3685. @$(ECHO) Install Files....... $(INSTALL_FILES)
  3686. @$(ECHO)
  3687. @$(ECHO) == Install info ==
  3688. @$(ECHO)
  3689. @$(ECHO) DateStr.............. $(DATESTR)
  3690. @$(ECHO) ZipName.............. $(ZIPNAME)
  3691. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  3692. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  3693. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  3694. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  3695. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  3696. @$(ECHO)
  3697. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  3698. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  3699. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  3700. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  3701. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  3702. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  3703. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  3704. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  3705. @$(ECHO)
  3706. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  3707. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  3708. @$(ECHO)
  3709. .PHONY: fpc_info
  3710. fpc_info: $(INFORULES)
  3711. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  3712. fpc_makefile_dirs
  3713. fpc_makefile:
  3714. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  3715. fpc_makefile_sub1:
  3716. ifdef TARGET_DIRS
  3717. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  3718. endif
  3719. ifdef TARGET_EXAMPLEDIRS
  3720. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  3721. endif
  3722. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  3723. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  3724. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  3725. debug: fpc_debug
  3726. smart: fpc_smart
  3727. release: fpc_release
  3728. units: fpc_units
  3729. examples:
  3730. shared: fpc_shared
  3731. sourceinstall: fpc_sourceinstall
  3732. exampleinstall: fpc_exampleinstall
  3733. distinstall:
  3734. zipinstall:
  3735. zipsourceinstall:
  3736. zipexampleinstall:
  3737. zipdistinstall:
  3738. distclean: fpc_distclean
  3739. cleanall: fpc_cleanall
  3740. info: fpc_info
  3741. makefiles: fpc_makefiles
  3742. .PHONY: debug smart release units examples shared sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
  3743. ifneq ($(wildcard fpcmake.loc),)
  3744. include fpcmake.loc
  3745. endif
  3746. .NOTPARALLEL:
  3747. .PHONY: compiler_ppuclean all clean install
  3748. compiler_ppuclean:
  3749. $(MAKE) -C $(COMPILERDIR) ppuclean
  3750. all: compiler_ppuclean fpc_all
  3751. clean: cleanall
  3752. install: