Makefile 111 KB

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