Makefile 111 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305
  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+=lesson6
  362. endif
  363. ifeq ($(FULL_TARGET),i386-go32v2)
  364. override TARGET_PROGRAMS+=lesson6
  365. endif
  366. ifeq ($(FULL_TARGET),i386-win32)
  367. override TARGET_PROGRAMS+=lesson6
  368. endif
  369. ifeq ($(FULL_TARGET),i386-os2)
  370. override TARGET_PROGRAMS+=lesson6
  371. endif
  372. ifeq ($(FULL_TARGET),i386-freebsd)
  373. override TARGET_PROGRAMS+=lesson6
  374. endif
  375. ifeq ($(FULL_TARGET),i386-beos)
  376. override TARGET_PROGRAMS+=lesson6
  377. endif
  378. ifeq ($(FULL_TARGET),i386-haiku)
  379. override TARGET_PROGRAMS+=lesson6
  380. endif
  381. ifeq ($(FULL_TARGET),i386-netbsd)
  382. override TARGET_PROGRAMS+=lesson6
  383. endif
  384. ifeq ($(FULL_TARGET),i386-solaris)
  385. override TARGET_PROGRAMS+=lesson6
  386. endif
  387. ifeq ($(FULL_TARGET),i386-netware)
  388. override TARGET_PROGRAMS+=lesson6
  389. endif
  390. ifeq ($(FULL_TARGET),i386-openbsd)
  391. override TARGET_PROGRAMS+=lesson6
  392. endif
  393. ifeq ($(FULL_TARGET),i386-wdosx)
  394. override TARGET_PROGRAMS+=lesson6
  395. endif
  396. ifeq ($(FULL_TARGET),i386-darwin)
  397. override TARGET_PROGRAMS+=lesson6
  398. endif
  399. ifeq ($(FULL_TARGET),i386-emx)
  400. override TARGET_PROGRAMS+=lesson6
  401. endif
  402. ifeq ($(FULL_TARGET),i386-watcom)
  403. override TARGET_PROGRAMS+=lesson6
  404. endif
  405. ifeq ($(FULL_TARGET),i386-netwlibc)
  406. override TARGET_PROGRAMS+=lesson6
  407. endif
  408. ifeq ($(FULL_TARGET),i386-wince)
  409. override TARGET_PROGRAMS+=lesson6
  410. endif
  411. ifeq ($(FULL_TARGET),i386-embedded)
  412. override TARGET_PROGRAMS+=lesson6
  413. endif
  414. ifeq ($(FULL_TARGET),i386-symbian)
  415. override TARGET_PROGRAMS+=lesson6
  416. endif
  417. ifeq ($(FULL_TARGET),i386-nativent)
  418. override TARGET_PROGRAMS+=lesson6
  419. endif
  420. ifeq ($(FULL_TARGET),i386-iphonesim)
  421. override TARGET_PROGRAMS+=lesson6
  422. endif
  423. ifeq ($(FULL_TARGET),i386-android)
  424. override TARGET_PROGRAMS+=lesson6
  425. endif
  426. ifeq ($(FULL_TARGET),i386-aros)
  427. override TARGET_PROGRAMS+=lesson6
  428. endif
  429. ifeq ($(FULL_TARGET),m68k-linux)
  430. override TARGET_PROGRAMS+=lesson6
  431. endif
  432. ifeq ($(FULL_TARGET),m68k-netbsd)
  433. override TARGET_PROGRAMS+=lesson6
  434. endif
  435. ifeq ($(FULL_TARGET),m68k-amiga)
  436. override TARGET_PROGRAMS+=lesson6
  437. endif
  438. ifeq ($(FULL_TARGET),m68k-atari)
  439. override TARGET_PROGRAMS+=lesson6
  440. endif
  441. ifeq ($(FULL_TARGET),m68k-palmos)
  442. override TARGET_PROGRAMS+=lesson6
  443. endif
  444. ifeq ($(FULL_TARGET),m68k-macosclassic)
  445. override TARGET_PROGRAMS+=lesson6
  446. endif
  447. ifeq ($(FULL_TARGET),m68k-embedded)
  448. override TARGET_PROGRAMS+=lesson6
  449. endif
  450. ifeq ($(FULL_TARGET),m68k-sinclairql)
  451. override TARGET_PROGRAMS+=lesson6
  452. endif
  453. ifeq ($(FULL_TARGET),powerpc-linux)
  454. override TARGET_PROGRAMS+=lesson6
  455. endif
  456. ifeq ($(FULL_TARGET),powerpc-netbsd)
  457. override TARGET_PROGRAMS+=lesson6
  458. endif
  459. ifeq ($(FULL_TARGET),powerpc-amiga)
  460. override TARGET_PROGRAMS+=lesson6
  461. endif
  462. ifeq ($(FULL_TARGET),powerpc-macosclassic)
  463. override TARGET_PROGRAMS+=lesson6
  464. endif
  465. ifeq ($(FULL_TARGET),powerpc-darwin)
  466. override TARGET_PROGRAMS+=lesson6
  467. endif
  468. ifeq ($(FULL_TARGET),powerpc-morphos)
  469. override TARGET_PROGRAMS+=lesson6
  470. endif
  471. ifeq ($(FULL_TARGET),powerpc-embedded)
  472. override TARGET_PROGRAMS+=lesson6
  473. endif
  474. ifeq ($(FULL_TARGET),powerpc-wii)
  475. override TARGET_PROGRAMS+=lesson6
  476. endif
  477. ifeq ($(FULL_TARGET),powerpc-aix)
  478. override TARGET_PROGRAMS+=lesson6
  479. endif
  480. ifeq ($(FULL_TARGET),sparc-linux)
  481. override TARGET_PROGRAMS+=lesson6
  482. endif
  483. ifeq ($(FULL_TARGET),sparc-netbsd)
  484. override TARGET_PROGRAMS+=lesson6
  485. endif
  486. ifeq ($(FULL_TARGET),sparc-solaris)
  487. override TARGET_PROGRAMS+=lesson6
  488. endif
  489. ifeq ($(FULL_TARGET),sparc-embedded)
  490. override TARGET_PROGRAMS+=lesson6
  491. endif
  492. ifeq ($(FULL_TARGET),x86_64-linux)
  493. override TARGET_PROGRAMS+=lesson6
  494. endif
  495. ifeq ($(FULL_TARGET),x86_64-freebsd)
  496. override TARGET_PROGRAMS+=lesson6
  497. endif
  498. ifeq ($(FULL_TARGET),x86_64-haiku)
  499. override TARGET_PROGRAMS+=lesson6
  500. endif
  501. ifeq ($(FULL_TARGET),x86_64-netbsd)
  502. override TARGET_PROGRAMS+=lesson6
  503. endif
  504. ifeq ($(FULL_TARGET),x86_64-solaris)
  505. override TARGET_PROGRAMS+=lesson6
  506. endif
  507. ifeq ($(FULL_TARGET),x86_64-openbsd)
  508. override TARGET_PROGRAMS+=lesson6
  509. endif
  510. ifeq ($(FULL_TARGET),x86_64-darwin)
  511. override TARGET_PROGRAMS+=lesson6
  512. endif
  513. ifeq ($(FULL_TARGET),x86_64-win64)
  514. override TARGET_PROGRAMS+=lesson6
  515. endif
  516. ifeq ($(FULL_TARGET),x86_64-embedded)
  517. override TARGET_PROGRAMS+=lesson6
  518. endif
  519. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  520. override TARGET_PROGRAMS+=lesson6
  521. endif
  522. ifeq ($(FULL_TARGET),x86_64-android)
  523. override TARGET_PROGRAMS+=lesson6
  524. endif
  525. ifeq ($(FULL_TARGET),x86_64-aros)
  526. override TARGET_PROGRAMS+=lesson6
  527. endif
  528. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  529. override TARGET_PROGRAMS+=lesson6
  530. endif
  531. ifeq ($(FULL_TARGET),arm-linux)
  532. override TARGET_PROGRAMS+=lesson6
  533. endif
  534. ifeq ($(FULL_TARGET),arm-netbsd)
  535. override TARGET_PROGRAMS+=lesson6
  536. endif
  537. ifeq ($(FULL_TARGET),arm-palmos)
  538. override TARGET_PROGRAMS+=lesson6
  539. endif
  540. ifeq ($(FULL_TARGET),arm-wince)
  541. override TARGET_PROGRAMS+=lesson6
  542. endif
  543. ifeq ($(FULL_TARGET),arm-gba)
  544. override TARGET_PROGRAMS+=lesson6
  545. endif
  546. ifeq ($(FULL_TARGET),arm-nds)
  547. override TARGET_PROGRAMS+=lesson6
  548. endif
  549. ifeq ($(FULL_TARGET),arm-embedded)
  550. override TARGET_PROGRAMS+=lesson6
  551. endif
  552. ifeq ($(FULL_TARGET),arm-symbian)
  553. override TARGET_PROGRAMS+=lesson6
  554. endif
  555. ifeq ($(FULL_TARGET),arm-android)
  556. override TARGET_PROGRAMS+=lesson6
  557. endif
  558. ifeq ($(FULL_TARGET),arm-aros)
  559. override TARGET_PROGRAMS+=lesson6
  560. endif
  561. ifeq ($(FULL_TARGET),arm-freertos)
  562. override TARGET_PROGRAMS+=lesson6
  563. endif
  564. ifeq ($(FULL_TARGET),arm-ios)
  565. override TARGET_PROGRAMS+=lesson6
  566. endif
  567. ifeq ($(FULL_TARGET),powerpc64-linux)
  568. override TARGET_PROGRAMS+=lesson6
  569. endif
  570. ifeq ($(FULL_TARGET),powerpc64-darwin)
  571. override TARGET_PROGRAMS+=lesson6
  572. endif
  573. ifeq ($(FULL_TARGET),powerpc64-embedded)
  574. override TARGET_PROGRAMS+=lesson6
  575. endif
  576. ifeq ($(FULL_TARGET),powerpc64-aix)
  577. override TARGET_PROGRAMS+=lesson6
  578. endif
  579. ifeq ($(FULL_TARGET),avr-embedded)
  580. override TARGET_PROGRAMS+=lesson6
  581. endif
  582. ifeq ($(FULL_TARGET),armeb-linux)
  583. override TARGET_PROGRAMS+=lesson6
  584. endif
  585. ifeq ($(FULL_TARGET),armeb-embedded)
  586. override TARGET_PROGRAMS+=lesson6
  587. endif
  588. ifeq ($(FULL_TARGET),mips-linux)
  589. override TARGET_PROGRAMS+=lesson6
  590. endif
  591. ifeq ($(FULL_TARGET),mipsel-linux)
  592. override TARGET_PROGRAMS+=lesson6
  593. endif
  594. ifeq ($(FULL_TARGET),mipsel-embedded)
  595. override TARGET_PROGRAMS+=lesson6
  596. endif
  597. ifeq ($(FULL_TARGET),mipsel-android)
  598. override TARGET_PROGRAMS+=lesson6
  599. endif
  600. ifeq ($(FULL_TARGET),mips64-linux)
  601. override TARGET_PROGRAMS+=lesson6
  602. endif
  603. ifeq ($(FULL_TARGET),mips64el-linux)
  604. override TARGET_PROGRAMS+=lesson6
  605. endif
  606. ifeq ($(FULL_TARGET),jvm-java)
  607. override TARGET_PROGRAMS+=lesson6
  608. endif
  609. ifeq ($(FULL_TARGET),jvm-android)
  610. override TARGET_PROGRAMS+=lesson6
  611. endif
  612. ifeq ($(FULL_TARGET),i8086-embedded)
  613. override TARGET_PROGRAMS+=lesson6
  614. endif
  615. ifeq ($(FULL_TARGET),i8086-msdos)
  616. override TARGET_PROGRAMS+=lesson6
  617. endif
  618. ifeq ($(FULL_TARGET),i8086-win16)
  619. override TARGET_PROGRAMS+=lesson6
  620. endif
  621. ifeq ($(FULL_TARGET),aarch64-linux)
  622. override TARGET_PROGRAMS+=lesson6
  623. endif
  624. ifeq ($(FULL_TARGET),aarch64-freebsd)
  625. override TARGET_PROGRAMS+=lesson6
  626. endif
  627. ifeq ($(FULL_TARGET),aarch64-darwin)
  628. override TARGET_PROGRAMS+=lesson6
  629. endif
  630. ifeq ($(FULL_TARGET),aarch64-win64)
  631. override TARGET_PROGRAMS+=lesson6
  632. endif
  633. ifeq ($(FULL_TARGET),aarch64-embedded)
  634. override TARGET_PROGRAMS+=lesson6
  635. endif
  636. ifeq ($(FULL_TARGET),aarch64-android)
  637. override TARGET_PROGRAMS+=lesson6
  638. endif
  639. ifeq ($(FULL_TARGET),aarch64-ios)
  640. override TARGET_PROGRAMS+=lesson6
  641. endif
  642. ifeq ($(FULL_TARGET),wasm32-embedded)
  643. override TARGET_PROGRAMS+=lesson6
  644. endif
  645. ifeq ($(FULL_TARGET),wasm32-wasi)
  646. override TARGET_PROGRAMS+=lesson6
  647. endif
  648. ifeq ($(FULL_TARGET),sparc64-linux)
  649. override TARGET_PROGRAMS+=lesson6
  650. endif
  651. ifeq ($(FULL_TARGET),riscv32-linux)
  652. override TARGET_PROGRAMS+=lesson6
  653. endif
  654. ifeq ($(FULL_TARGET),riscv32-embedded)
  655. override TARGET_PROGRAMS+=lesson6
  656. endif
  657. ifeq ($(FULL_TARGET),riscv64-linux)
  658. override TARGET_PROGRAMS+=lesson6
  659. endif
  660. ifeq ($(FULL_TARGET),riscv64-embedded)
  661. override TARGET_PROGRAMS+=lesson6
  662. endif
  663. ifeq ($(FULL_TARGET),xtensa-linux)
  664. override TARGET_PROGRAMS+=lesson6
  665. endif
  666. ifeq ($(FULL_TARGET),xtensa-embedded)
  667. override TARGET_PROGRAMS+=lesson6
  668. endif
  669. ifeq ($(FULL_TARGET),xtensa-freertos)
  670. override TARGET_PROGRAMS+=lesson6
  671. endif
  672. ifeq ($(FULL_TARGET),z80-embedded)
  673. override TARGET_PROGRAMS+=lesson6
  674. endif
  675. ifeq ($(FULL_TARGET),z80-zxspectrum)
  676. override TARGET_PROGRAMS+=lesson6
  677. endif
  678. ifeq ($(FULL_TARGET),z80-msxdos)
  679. override TARGET_PROGRAMS+=lesson6
  680. endif
  681. ifeq ($(FULL_TARGET),z80-amstradcpc)
  682. override TARGET_PROGRAMS+=lesson6
  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. CROSSGCCOPT=-m32
  1884. endif
  1885. endif
  1886. endif
  1887. ifneq ($(filter $(CPU_TARGET),mips64 mipsel64),)
  1888. ifeq ($(BINUTILSPREFIX),)
  1889. GCCLIBDIR:=$(shell dirname `gcc -mabi=64 -print-libgcc-file-name`)
  1890. else
  1891. CROSSGCCOPT=-mabi=64
  1892. endif
  1893. endif
  1894. ifneq ($(filter $(CPU_TARGET),mips mipsel),)
  1895. ifeq ($(BINUTILSPREFIX),)
  1896. GCCLIBDIR:=$(shell dirname `gcc -mabi=32 -print-libgcc-file-name`)
  1897. else
  1898. CROSSGCCOPT=-mabi=32
  1899. endif
  1900. endif
  1901. ifeq ($(BINUTILSPREFIX),)
  1902. ifeq ($(GCCLIBDIR),)
  1903. GCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
  1904. endif
  1905. else
  1906. ifeq ($(CROSSGCCOPT),)
  1907. CROSSGCCOPT=-g
  1908. endif
  1909. endif
  1910. endif
  1911. ifdef FPCFPMAKE
  1912. FPCFPMAKE_CPU_TARGET=$(shell $(FPCFPMAKE) -iTP)
  1913. ifeq ($(CPU_TARGET),$(FPCFPMAKE_CPU_TARGET))
  1914. FPCMAKEGCCLIBDIR:=$(GCCLIBDIR)
  1915. else
  1916. ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),aarch64 powerpc64 riscv64 sparc64 x86_64),)
  1917. FPCMAKE_CROSSGCCOPT=-m64
  1918. else
  1919. ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),mips64 mips64el),)
  1920. FPCMAKE_CROSSGCCOPT=-mabi=64
  1921. else
  1922. ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),mips mipsel),)
  1923. FPCMAKE_CROSSGCCOPT=-mabi=32
  1924. else
  1925. ifeq ($(FPCFPMAKE_CPU_TARGET),riscv64)
  1926. FPCMAKE_CROSSGCCOPT=-mabi=lp64
  1927. else
  1928. ifeq ($(FPCFPMAKE_CPU_TARGET),riscv32)
  1929. FPCMAKE_CROSSGCCOPT=-mabi=ilp32
  1930. else
  1931. FPCMAKE_CROSSGCCOPT=-m32
  1932. endif
  1933. endif
  1934. endif
  1935. endif
  1936. endif
  1937. FPCMAKEGCCLIBDIR:=$(shell dirname `gcc $(FPCMAKE_CROSSGCCOPT) -print-libgcc-file-name`)
  1938. endif
  1939. endif
  1940. ifndef FPCMAKEGCCLIBDIR
  1941. FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
  1942. endif
  1943. ifndef GCCLIBDIR
  1944. CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
  1945. ifneq ($(CROSSGCC),)
  1946. GCCLIBDIR:=$(shell dirname `$(CROSSGCC) $(CROSSGCCOPT) -print-libgcc-file-name`)
  1947. endif
  1948. endif
  1949. endif
  1950. ifdef inUnix
  1951. ifeq ($(OS_SOURCE),netbsd)
  1952. OTHERLIBDIR:=/usr/pkg/lib
  1953. endif
  1954. export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
  1955. endif
  1956. BATCHEXT=.bat
  1957. LOADEREXT=.as
  1958. EXEEXT=.exe
  1959. PPLEXT=.ppl
  1960. PPUEXT=.ppu
  1961. OEXT=.o
  1962. LTOEXT=.bc
  1963. ASMEXT=.s
  1964. SMARTEXT=.sl
  1965. STATICLIBEXT=.a
  1966. SHAREDLIBEXT=.so
  1967. SHAREDLIBPREFIX=libfp
  1968. STATICLIBPREFIX=libp
  1969. IMPORTLIBPREFIX=libimp
  1970. RSTEXT=.rst
  1971. EXEDBGEXT=.dbg
  1972. ifeq ($(OS_TARGET),go32v1)
  1973. STATICLIBPREFIX=
  1974. SHORTSUFFIX=v1
  1975. endif
  1976. ifeq ($(OS_TARGET),go32v2)
  1977. STATICLIBPREFIX=
  1978. SHORTSUFFIX=dos
  1979. IMPORTLIBPREFIX=
  1980. endif
  1981. ifeq ($(OS_TARGET),watcom)
  1982. STATICLIBPREFIX=
  1983. OEXT=.obj
  1984. ASMEXT=.asm
  1985. SHAREDLIBEXT=.dll
  1986. SHORTSUFFIX=wat
  1987. IMPORTLIBPREFIX=
  1988. endif
  1989. ifneq ($(CPU_TARGET),jvm)
  1990. ifeq ($(OS_TARGET),android)
  1991. BATCHEXT=.sh
  1992. EXEEXT=
  1993. HASSHAREDLIB=1
  1994. SHORTSUFFIX=lnx
  1995. endif
  1996. endif
  1997. ifeq ($(OS_TARGET),linux)
  1998. BATCHEXT=.sh
  1999. EXEEXT=
  2000. HASSHAREDLIB=1
  2001. SHORTSUFFIX=lnx
  2002. endif
  2003. ifeq ($(OS_TARGET),dragonfly)
  2004. BATCHEXT=.sh
  2005. EXEEXT=
  2006. HASSHAREDLIB=1
  2007. SHORTSUFFIX=df
  2008. endif
  2009. ifeq ($(OS_TARGET),freebsd)
  2010. BATCHEXT=.sh
  2011. EXEEXT=
  2012. HASSHAREDLIB=1
  2013. SHORTSUFFIX=fbs
  2014. endif
  2015. ifeq ($(OS_TARGET),netbsd)
  2016. BATCHEXT=.sh
  2017. EXEEXT=
  2018. HASSHAREDLIB=1
  2019. SHORTSUFFIX=nbs
  2020. endif
  2021. ifeq ($(OS_TARGET),openbsd)
  2022. BATCHEXT=.sh
  2023. EXEEXT=
  2024. HASSHAREDLIB=1
  2025. SHORTSUFFIX=obs
  2026. endif
  2027. ifeq ($(OS_TARGET),win32)
  2028. SHAREDLIBEXT=.dll
  2029. SHORTSUFFIX=w32
  2030. endif
  2031. ifeq ($(OS_TARGET),os2)
  2032. BATCHEXT=.cmd
  2033. AOUTEXT=.out
  2034. STATICLIBPREFIX=
  2035. SHAREDLIBEXT=.dll
  2036. SHORTSUFFIX=os2
  2037. ECHO=echo
  2038. IMPORTLIBPREFIX=
  2039. endif
  2040. ifeq ($(OS_TARGET),emx)
  2041. BATCHEXT=.cmd
  2042. AOUTEXT=.out
  2043. STATICLIBPREFIX=
  2044. SHAREDLIBEXT=.dll
  2045. SHORTSUFFIX=emx
  2046. ECHO=echo
  2047. IMPORTLIBPREFIX=
  2048. endif
  2049. ifeq ($(OS_TARGET),amiga)
  2050. EXEEXT=
  2051. SHAREDLIBEXT=.library
  2052. SHORTSUFFIX=amg
  2053. endif
  2054. ifeq ($(OS_TARGET),aros)
  2055. EXEEXT=
  2056. SHAREDLIBEXT=.library
  2057. SHORTSUFFIX=aros
  2058. endif
  2059. ifeq ($(OS_TARGET),morphos)
  2060. EXEEXT=
  2061. SHAREDLIBEXT=.library
  2062. SHORTSUFFIX=mos
  2063. endif
  2064. ifeq ($(OS_TARGET),atari)
  2065. EXEEXT=.ttp
  2066. SHORTSUFFIX=ata
  2067. endif
  2068. ifeq ($(OS_TARGET),beos)
  2069. BATCHEXT=.sh
  2070. EXEEXT=
  2071. SHORTSUFFIX=be
  2072. endif
  2073. ifeq ($(OS_TARGET),haiku)
  2074. BATCHEXT=.sh
  2075. EXEEXT=
  2076. SHORTSUFFIX=hai
  2077. endif
  2078. ifeq ($(OS_TARGET),solaris)
  2079. BATCHEXT=.sh
  2080. EXEEXT=
  2081. SHORTSUFFIX=sun
  2082. endif
  2083. ifeq ($(OS_TARGET),qnx)
  2084. BATCHEXT=.sh
  2085. EXEEXT=
  2086. SHORTSUFFIX=qnx
  2087. endif
  2088. ifeq ($(OS_TARGET),netware)
  2089. EXEEXT=.nlm
  2090. STATICLIBPREFIX=
  2091. SHORTSUFFIX=nw
  2092. IMPORTLIBPREFIX=imp
  2093. endif
  2094. ifeq ($(OS_TARGET),netwlibc)
  2095. EXEEXT=.nlm
  2096. STATICLIBPREFIX=
  2097. SHORTSUFFIX=nwl
  2098. IMPORTLIBPREFIX=imp
  2099. endif
  2100. ifeq ($(OS_TARGET),macosclassic)
  2101. BATCHEXT=
  2102. EXEEXT=
  2103. DEBUGSYMEXT=.xcoff
  2104. SHORTSUFFIX=mac
  2105. IMPORTLIBPREFIX=imp
  2106. endif
  2107. ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
  2108. BATCHEXT=.sh
  2109. EXEEXT=
  2110. HASSHAREDLIB=1
  2111. SHORTSUFFIX=dwn
  2112. EXEDBGEXT=.dSYM
  2113. endif
  2114. ifeq ($(OS_TARGET),gba)
  2115. EXEEXT=.gba
  2116. SHAREDLIBEXT=.so
  2117. SHORTSUFFIX=gba
  2118. endif
  2119. ifeq ($(OS_TARGET),symbian)
  2120. SHAREDLIBEXT=.dll
  2121. SHORTSUFFIX=symbian
  2122. endif
  2123. ifeq ($(OS_TARGET),NativeNT)
  2124. SHAREDLIBEXT=.dll
  2125. SHORTSUFFIX=nativent
  2126. endif
  2127. ifeq ($(OS_TARGET),wii)
  2128. EXEEXT=.dol
  2129. SHAREDLIBEXT=.so
  2130. SHORTSUFFIX=wii
  2131. endif
  2132. ifeq ($(OS_TARGET),aix)
  2133. BATCHEXT=.sh
  2134. EXEEXT=
  2135. SHAREDLIBEXT=.a
  2136. SHORTSUFFIX=aix
  2137. endif
  2138. ifeq ($(OS_TARGET),java)
  2139. OEXT=.class
  2140. ASMEXT=.j
  2141. SHAREDLIBEXT=.jar
  2142. SHORTSUFFIX=java
  2143. endif
  2144. ifeq ($(CPU_TARGET),jvm)
  2145. ifeq ($(OS_TARGET),android)
  2146. OEXT=.class
  2147. ASMEXT=.j
  2148. SHAREDLIBEXT=.jar
  2149. SHORTSUFFIX=android
  2150. endif
  2151. endif
  2152. ifeq ($(OS_TARGET),msdos)
  2153. STATICLIBPREFIX=
  2154. STATICLIBEXT=.a
  2155. SHORTSUFFIX=d16
  2156. endif
  2157. ifeq ($(OS_TARGET),msxdos)
  2158. STATICLIBPREFIX=
  2159. STATICLIBEXT=.a
  2160. SHORTSUFFIX=msd
  2161. endif
  2162. ifeq ($(OS_TARGET),embedded)
  2163. ifeq ($(CPU_TARGET),i8086)
  2164. STATICLIBPREFIX=
  2165. STATICLIBEXT=.a
  2166. else
  2167. EXEEXT=.bin
  2168. endif
  2169. ifeq ($(CPU_TARGET),z80)
  2170. OEXT=.rel
  2171. endif
  2172. SHORTSUFFIX=emb
  2173. endif
  2174. ifeq ($(OS_TARGET),win16)
  2175. STATICLIBPREFIX=
  2176. STATICLIBEXT=.a
  2177. SHAREDLIBEXT=.dll
  2178. SHORTSUFFIX=w16
  2179. endif
  2180. ifeq ($(OS_TARGET),zxspectrum)
  2181. OEXT=.rel
  2182. endif
  2183. ifeq ($(OS_TARGET),wasi)
  2184. EXEEXT=.wasm
  2185. endif
  2186. ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
  2187. FPCMADE=fpcmade.$(SHORTSUFFIX)
  2188. ZIPSUFFIX=$(SHORTSUFFIX)
  2189. ZIPCROSSPREFIX=
  2190. ZIPSOURCESUFFIX=src
  2191. ZIPEXAMPLESUFFIX=exm
  2192. else
  2193. FPCMADE=fpcmade.$(TARGETSUFFIX)
  2194. ZIPSOURCESUFFIX=.source
  2195. ZIPEXAMPLESUFFIX=.examples
  2196. ifdef CROSSCOMPILE
  2197. ZIPSUFFIX=.$(SOURCESUFFIX)
  2198. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  2199. else
  2200. ZIPSUFFIX=.$(TARGETSUFFIX)
  2201. ZIPCROSSPREFIX=
  2202. endif
  2203. endif
  2204. ifndef ECHO
  2205. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  2206. ifeq ($(ECHO),)
  2207. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  2208. ifeq ($(ECHO),)
  2209. ECHO= __missing_command_ECHO
  2210. else
  2211. ECHO:=$(firstword $(ECHO))
  2212. endif
  2213. else
  2214. ECHO:=$(firstword $(ECHO))
  2215. endif
  2216. endif
  2217. export ECHO
  2218. ifndef DATE
  2219. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  2220. ifeq ($(DATE),)
  2221. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  2222. ifeq ($(DATE),)
  2223. DATE= __missing_command_DATE
  2224. else
  2225. DATE:=$(firstword $(DATE))
  2226. endif
  2227. else
  2228. DATE:=$(firstword $(DATE))
  2229. endif
  2230. endif
  2231. export DATE
  2232. ifndef GINSTALL
  2233. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  2234. ifeq ($(GINSTALL),)
  2235. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  2236. ifeq ($(GINSTALL),)
  2237. GINSTALL= __missing_command_GINSTALL
  2238. else
  2239. GINSTALL:=$(firstword $(GINSTALL))
  2240. endif
  2241. else
  2242. GINSTALL:=$(firstword $(GINSTALL))
  2243. endif
  2244. endif
  2245. export GINSTALL
  2246. ifndef CPPROG
  2247. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  2248. ifeq ($(CPPROG),)
  2249. CPPROG= __missing_command_CPPROG
  2250. else
  2251. CPPROG:=$(firstword $(CPPROG))
  2252. endif
  2253. endif
  2254. export CPPROG
  2255. ifndef RMPROG
  2256. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  2257. ifeq ($(RMPROG),)
  2258. RMPROG= __missing_command_RMPROG
  2259. else
  2260. RMPROG:=$(firstword $(RMPROG))
  2261. endif
  2262. endif
  2263. export RMPROG
  2264. ifndef MVPROG
  2265. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  2266. ifeq ($(MVPROG),)
  2267. MVPROG= __missing_command_MVPROG
  2268. else
  2269. MVPROG:=$(firstword $(MVPROG))
  2270. endif
  2271. endif
  2272. export MVPROG
  2273. ifndef MKDIRPROG
  2274. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2275. ifeq ($(MKDIRPROG),)
  2276. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2277. ifeq ($(MKDIRPROG),)
  2278. MKDIRPROG= __missing_command_MKDIRPROG
  2279. else
  2280. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2281. endif
  2282. else
  2283. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2284. endif
  2285. endif
  2286. export MKDIRPROG
  2287. ifndef ECHOREDIR
  2288. ifndef inUnix
  2289. ECHOREDIR=echo
  2290. else
  2291. ECHOREDIR=$(ECHO)
  2292. endif
  2293. endif
  2294. ifndef COPY
  2295. COPY:=$(CPPROG) -fp
  2296. endif
  2297. ifndef COPYTREE
  2298. COPYTREE:=$(CPPROG) -Rfp
  2299. endif
  2300. ifndef MKDIRTREE
  2301. MKDIRTREE:=$(MKDIRPROG) -p
  2302. endif
  2303. ifndef MOVE
  2304. MOVE:=$(MVPROG) -f
  2305. endif
  2306. ifndef DEL
  2307. DEL:=$(RMPROG) -f
  2308. endif
  2309. ifndef DELTREE
  2310. DELTREE:=$(RMPROG) -rf
  2311. endif
  2312. ifndef INSTALL
  2313. ifdef inUnix
  2314. INSTALL:=$(GINSTALL) -c -m 644
  2315. else
  2316. INSTALL:=$(COPY)
  2317. endif
  2318. endif
  2319. ifndef INSTALLEXE
  2320. ifdef inUnix
  2321. INSTALLEXE:=$(GINSTALL) -c -m 755
  2322. else
  2323. INSTALLEXE:=$(COPY)
  2324. endif
  2325. endif
  2326. ifndef MKDIR
  2327. MKDIR:=$(GINSTALL) -m 755 -d
  2328. endif
  2329. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  2330. ifndef PPUMOVE
  2331. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  2332. ifeq ($(PPUMOVE),)
  2333. PPUMOVE= __missing_command_PPUMOVE
  2334. else
  2335. PPUMOVE:=$(firstword $(PPUMOVE))
  2336. endif
  2337. endif
  2338. export PPUMOVE
  2339. ifndef FPCMAKE
  2340. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  2341. ifeq ($(FPCMAKE),)
  2342. FPCMAKE= __missing_command_FPCMAKE
  2343. else
  2344. FPCMAKE:=$(firstword $(FPCMAKE))
  2345. endif
  2346. endif
  2347. export FPCMAKE
  2348. ifndef ZIPPROG
  2349. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  2350. ifeq ($(ZIPPROG),)
  2351. ZIPPROG= __missing_command_ZIPPROG
  2352. else
  2353. ZIPPROG:=$(firstword $(ZIPPROG))
  2354. endif
  2355. endif
  2356. export ZIPPROG
  2357. ifndef TARPROG
  2358. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  2359. ifeq ($(TARPROG),)
  2360. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  2361. ifeq ($(TARPROG),)
  2362. TARPROG= __missing_command_TARPROG
  2363. else
  2364. TARPROG:=$(firstword $(TARPROG))
  2365. endif
  2366. else
  2367. TARPROG:=$(firstword $(TARPROG))
  2368. endif
  2369. endif
  2370. export TARPROG
  2371. ASNAME=$(BINUTILSPREFIX)as
  2372. LDNAME=$(BINUTILSPREFIX)ld
  2373. ARNAME=$(BINUTILSPREFIX)ar
  2374. RCNAME=$(BINUTILSPREFIX)rc
  2375. NASMNAME=$(BINUTILSPREFIX)nasm
  2376. ifndef ASPROG
  2377. ifdef CROSSBINDIR
  2378. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  2379. else
  2380. ASPROG=$(ASNAME)
  2381. endif
  2382. endif
  2383. ifndef LDPROG
  2384. ifdef CROSSBINDIR
  2385. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  2386. else
  2387. LDPROG=$(LDNAME)
  2388. endif
  2389. endif
  2390. ifndef RCPROG
  2391. ifdef CROSSBINDIR
  2392. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  2393. else
  2394. RCPROG=$(RCNAME)
  2395. endif
  2396. endif
  2397. ifndef ARPROG
  2398. ifdef CROSSBINDIR
  2399. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  2400. else
  2401. ARPROG=$(ARNAME)
  2402. endif
  2403. endif
  2404. ifndef NASMPROG
  2405. ifdef CROSSBINDIR
  2406. NASMPROG=$(CROSSBINDIR)/$(NASMNAME)$(SRCEXEEXT)
  2407. else
  2408. NASMPROG=$(NASMNAME)
  2409. endif
  2410. endif
  2411. AS=$(ASPROG)
  2412. LD=$(LDPROG)
  2413. RC=$(RCPROG)
  2414. AR=$(ARPROG)
  2415. NASM=$(NASMPROG)
  2416. ifdef inUnix
  2417. PPAS=./ppas$(SRCBATCHEXT)
  2418. else
  2419. PPAS=ppas$(SRCBATCHEXT)
  2420. endif
  2421. ifdef inUnix
  2422. LDCONFIG=ldconfig
  2423. else
  2424. LDCONFIG=
  2425. endif
  2426. ifdef DATE
  2427. DATESTR:=$(shell $(DATE) +%Y%m%d)
  2428. else
  2429. DATESTR=
  2430. endif
  2431. ZIPOPT=-9
  2432. ZIPEXT=.zip
  2433. ifeq ($(USETAR),bz2)
  2434. TAROPT=vj
  2435. TAREXT=.tar.bz2
  2436. else
  2437. TAROPT=vz
  2438. TAREXT=.tar.gz
  2439. endif
  2440. override REQUIRE_PACKAGES=libogcfpc
  2441. ifeq ($(FULL_TARGET),i386-linux)
  2442. REQUIRE_PACKAGES_RTL=1
  2443. REQUIRE_PACKAGES_PASZLIB=1
  2444. REQUIRE_PACKAGES_FCL-PROCESS=1
  2445. REQUIRE_PACKAGES_HASH=1
  2446. REQUIRE_PACKAGES_LIBTAR=1
  2447. REQUIRE_PACKAGES_FPMKUNIT=1
  2448. REQUIRE_PACKAGES_LIBOGCFPC=1
  2449. endif
  2450. ifeq ($(FULL_TARGET),i386-go32v2)
  2451. REQUIRE_PACKAGES_RTL=1
  2452. REQUIRE_PACKAGES_PASZLIB=1
  2453. REQUIRE_PACKAGES_FCL-PROCESS=1
  2454. REQUIRE_PACKAGES_HASH=1
  2455. REQUIRE_PACKAGES_LIBTAR=1
  2456. REQUIRE_PACKAGES_FPMKUNIT=1
  2457. REQUIRE_PACKAGES_LIBOGCFPC=1
  2458. endif
  2459. ifeq ($(FULL_TARGET),i386-win32)
  2460. REQUIRE_PACKAGES_RTL=1
  2461. REQUIRE_PACKAGES_PASZLIB=1
  2462. REQUIRE_PACKAGES_FCL-PROCESS=1
  2463. REQUIRE_PACKAGES_HASH=1
  2464. REQUIRE_PACKAGES_LIBTAR=1
  2465. REQUIRE_PACKAGES_FPMKUNIT=1
  2466. REQUIRE_PACKAGES_LIBOGCFPC=1
  2467. endif
  2468. ifeq ($(FULL_TARGET),i386-os2)
  2469. REQUIRE_PACKAGES_RTL=1
  2470. REQUIRE_PACKAGES_PASZLIB=1
  2471. REQUIRE_PACKAGES_FCL-PROCESS=1
  2472. REQUIRE_PACKAGES_HASH=1
  2473. REQUIRE_PACKAGES_LIBTAR=1
  2474. REQUIRE_PACKAGES_FPMKUNIT=1
  2475. REQUIRE_PACKAGES_LIBOGCFPC=1
  2476. endif
  2477. ifeq ($(FULL_TARGET),i386-freebsd)
  2478. REQUIRE_PACKAGES_RTL=1
  2479. REQUIRE_PACKAGES_PASZLIB=1
  2480. REQUIRE_PACKAGES_FCL-PROCESS=1
  2481. REQUIRE_PACKAGES_HASH=1
  2482. REQUIRE_PACKAGES_LIBTAR=1
  2483. REQUIRE_PACKAGES_FPMKUNIT=1
  2484. REQUIRE_PACKAGES_LIBOGCFPC=1
  2485. endif
  2486. ifeq ($(FULL_TARGET),i386-beos)
  2487. REQUIRE_PACKAGES_RTL=1
  2488. REQUIRE_PACKAGES_PASZLIB=1
  2489. REQUIRE_PACKAGES_FCL-PROCESS=1
  2490. REQUIRE_PACKAGES_HASH=1
  2491. REQUIRE_PACKAGES_LIBTAR=1
  2492. REQUIRE_PACKAGES_FPMKUNIT=1
  2493. REQUIRE_PACKAGES_LIBOGCFPC=1
  2494. endif
  2495. ifeq ($(FULL_TARGET),i386-haiku)
  2496. REQUIRE_PACKAGES_RTL=1
  2497. REQUIRE_PACKAGES_PASZLIB=1
  2498. REQUIRE_PACKAGES_FCL-PROCESS=1
  2499. REQUIRE_PACKAGES_HASH=1
  2500. REQUIRE_PACKAGES_LIBTAR=1
  2501. REQUIRE_PACKAGES_FPMKUNIT=1
  2502. REQUIRE_PACKAGES_LIBOGCFPC=1
  2503. endif
  2504. ifeq ($(FULL_TARGET),i386-netbsd)
  2505. REQUIRE_PACKAGES_RTL=1
  2506. REQUIRE_PACKAGES_PASZLIB=1
  2507. REQUIRE_PACKAGES_FCL-PROCESS=1
  2508. REQUIRE_PACKAGES_HASH=1
  2509. REQUIRE_PACKAGES_LIBTAR=1
  2510. REQUIRE_PACKAGES_FPMKUNIT=1
  2511. REQUIRE_PACKAGES_LIBOGCFPC=1
  2512. endif
  2513. ifeq ($(FULL_TARGET),i386-solaris)
  2514. REQUIRE_PACKAGES_RTL=1
  2515. REQUIRE_PACKAGES_PASZLIB=1
  2516. REQUIRE_PACKAGES_FCL-PROCESS=1
  2517. REQUIRE_PACKAGES_HASH=1
  2518. REQUIRE_PACKAGES_LIBTAR=1
  2519. REQUIRE_PACKAGES_FPMKUNIT=1
  2520. REQUIRE_PACKAGES_LIBOGCFPC=1
  2521. endif
  2522. ifeq ($(FULL_TARGET),i386-netware)
  2523. REQUIRE_PACKAGES_RTL=1
  2524. REQUIRE_PACKAGES_PASZLIB=1
  2525. REQUIRE_PACKAGES_FCL-PROCESS=1
  2526. REQUIRE_PACKAGES_HASH=1
  2527. REQUIRE_PACKAGES_LIBTAR=1
  2528. REQUIRE_PACKAGES_FPMKUNIT=1
  2529. REQUIRE_PACKAGES_LIBOGCFPC=1
  2530. endif
  2531. ifeq ($(FULL_TARGET),i386-openbsd)
  2532. REQUIRE_PACKAGES_RTL=1
  2533. REQUIRE_PACKAGES_PASZLIB=1
  2534. REQUIRE_PACKAGES_FCL-PROCESS=1
  2535. REQUIRE_PACKAGES_HASH=1
  2536. REQUIRE_PACKAGES_LIBTAR=1
  2537. REQUIRE_PACKAGES_FPMKUNIT=1
  2538. REQUIRE_PACKAGES_LIBOGCFPC=1
  2539. endif
  2540. ifeq ($(FULL_TARGET),i386-wdosx)
  2541. REQUIRE_PACKAGES_RTL=1
  2542. REQUIRE_PACKAGES_PASZLIB=1
  2543. REQUIRE_PACKAGES_FCL-PROCESS=1
  2544. REQUIRE_PACKAGES_HASH=1
  2545. REQUIRE_PACKAGES_LIBTAR=1
  2546. REQUIRE_PACKAGES_FPMKUNIT=1
  2547. REQUIRE_PACKAGES_LIBOGCFPC=1
  2548. endif
  2549. ifeq ($(FULL_TARGET),i386-darwin)
  2550. REQUIRE_PACKAGES_RTL=1
  2551. REQUIRE_PACKAGES_PASZLIB=1
  2552. REQUIRE_PACKAGES_FCL-PROCESS=1
  2553. REQUIRE_PACKAGES_HASH=1
  2554. REQUIRE_PACKAGES_LIBTAR=1
  2555. REQUIRE_PACKAGES_FPMKUNIT=1
  2556. REQUIRE_PACKAGES_LIBOGCFPC=1
  2557. endif
  2558. ifeq ($(FULL_TARGET),i386-emx)
  2559. REQUIRE_PACKAGES_RTL=1
  2560. REQUIRE_PACKAGES_PASZLIB=1
  2561. REQUIRE_PACKAGES_FCL-PROCESS=1
  2562. REQUIRE_PACKAGES_HASH=1
  2563. REQUIRE_PACKAGES_LIBTAR=1
  2564. REQUIRE_PACKAGES_FPMKUNIT=1
  2565. REQUIRE_PACKAGES_LIBOGCFPC=1
  2566. endif
  2567. ifeq ($(FULL_TARGET),i386-watcom)
  2568. REQUIRE_PACKAGES_RTL=1
  2569. REQUIRE_PACKAGES_PASZLIB=1
  2570. REQUIRE_PACKAGES_FCL-PROCESS=1
  2571. REQUIRE_PACKAGES_HASH=1
  2572. REQUIRE_PACKAGES_LIBTAR=1
  2573. REQUIRE_PACKAGES_FPMKUNIT=1
  2574. REQUIRE_PACKAGES_LIBOGCFPC=1
  2575. endif
  2576. ifeq ($(FULL_TARGET),i386-netwlibc)
  2577. REQUIRE_PACKAGES_RTL=1
  2578. REQUIRE_PACKAGES_PASZLIB=1
  2579. REQUIRE_PACKAGES_FCL-PROCESS=1
  2580. REQUIRE_PACKAGES_HASH=1
  2581. REQUIRE_PACKAGES_LIBTAR=1
  2582. REQUIRE_PACKAGES_FPMKUNIT=1
  2583. REQUIRE_PACKAGES_LIBOGCFPC=1
  2584. endif
  2585. ifeq ($(FULL_TARGET),i386-wince)
  2586. REQUIRE_PACKAGES_RTL=1
  2587. REQUIRE_PACKAGES_PASZLIB=1
  2588. REQUIRE_PACKAGES_FCL-PROCESS=1
  2589. REQUIRE_PACKAGES_HASH=1
  2590. REQUIRE_PACKAGES_LIBTAR=1
  2591. REQUIRE_PACKAGES_FPMKUNIT=1
  2592. REQUIRE_PACKAGES_LIBOGCFPC=1
  2593. endif
  2594. ifeq ($(FULL_TARGET),i386-embedded)
  2595. REQUIRE_PACKAGES_RTL=1
  2596. REQUIRE_PACKAGES_PASZLIB=1
  2597. REQUIRE_PACKAGES_FCL-PROCESS=1
  2598. REQUIRE_PACKAGES_HASH=1
  2599. REQUIRE_PACKAGES_LIBTAR=1
  2600. REQUIRE_PACKAGES_FPMKUNIT=1
  2601. REQUIRE_PACKAGES_LIBOGCFPC=1
  2602. endif
  2603. ifeq ($(FULL_TARGET),i386-symbian)
  2604. REQUIRE_PACKAGES_RTL=1
  2605. REQUIRE_PACKAGES_PASZLIB=1
  2606. REQUIRE_PACKAGES_FCL-PROCESS=1
  2607. REQUIRE_PACKAGES_HASH=1
  2608. REQUIRE_PACKAGES_LIBTAR=1
  2609. REQUIRE_PACKAGES_FPMKUNIT=1
  2610. REQUIRE_PACKAGES_LIBOGCFPC=1
  2611. endif
  2612. ifeq ($(FULL_TARGET),i386-nativent)
  2613. REQUIRE_PACKAGES_RTL=1
  2614. REQUIRE_PACKAGES_PASZLIB=1
  2615. REQUIRE_PACKAGES_FCL-PROCESS=1
  2616. REQUIRE_PACKAGES_HASH=1
  2617. REQUIRE_PACKAGES_LIBTAR=1
  2618. REQUIRE_PACKAGES_FPMKUNIT=1
  2619. REQUIRE_PACKAGES_LIBOGCFPC=1
  2620. endif
  2621. ifeq ($(FULL_TARGET),i386-iphonesim)
  2622. REQUIRE_PACKAGES_RTL=1
  2623. REQUIRE_PACKAGES_PASZLIB=1
  2624. REQUIRE_PACKAGES_FCL-PROCESS=1
  2625. REQUIRE_PACKAGES_HASH=1
  2626. REQUIRE_PACKAGES_LIBTAR=1
  2627. REQUIRE_PACKAGES_FPMKUNIT=1
  2628. REQUIRE_PACKAGES_LIBOGCFPC=1
  2629. endif
  2630. ifeq ($(FULL_TARGET),i386-android)
  2631. REQUIRE_PACKAGES_RTL=1
  2632. REQUIRE_PACKAGES_PASZLIB=1
  2633. REQUIRE_PACKAGES_FCL-PROCESS=1
  2634. REQUIRE_PACKAGES_HASH=1
  2635. REQUIRE_PACKAGES_LIBTAR=1
  2636. REQUIRE_PACKAGES_FPMKUNIT=1
  2637. REQUIRE_PACKAGES_LIBOGCFPC=1
  2638. endif
  2639. ifeq ($(FULL_TARGET),i386-aros)
  2640. REQUIRE_PACKAGES_RTL=1
  2641. REQUIRE_PACKAGES_PASZLIB=1
  2642. REQUIRE_PACKAGES_FCL-PROCESS=1
  2643. REQUIRE_PACKAGES_HASH=1
  2644. REQUIRE_PACKAGES_LIBTAR=1
  2645. REQUIRE_PACKAGES_FPMKUNIT=1
  2646. REQUIRE_PACKAGES_LIBOGCFPC=1
  2647. endif
  2648. ifeq ($(FULL_TARGET),m68k-linux)
  2649. REQUIRE_PACKAGES_RTL=1
  2650. REQUIRE_PACKAGES_PASZLIB=1
  2651. REQUIRE_PACKAGES_FCL-PROCESS=1
  2652. REQUIRE_PACKAGES_HASH=1
  2653. REQUIRE_PACKAGES_LIBTAR=1
  2654. REQUIRE_PACKAGES_FPMKUNIT=1
  2655. REQUIRE_PACKAGES_LIBOGCFPC=1
  2656. endif
  2657. ifeq ($(FULL_TARGET),m68k-netbsd)
  2658. REQUIRE_PACKAGES_RTL=1
  2659. REQUIRE_PACKAGES_PASZLIB=1
  2660. REQUIRE_PACKAGES_FCL-PROCESS=1
  2661. REQUIRE_PACKAGES_HASH=1
  2662. REQUIRE_PACKAGES_LIBTAR=1
  2663. REQUIRE_PACKAGES_FPMKUNIT=1
  2664. REQUIRE_PACKAGES_LIBOGCFPC=1
  2665. endif
  2666. ifeq ($(FULL_TARGET),m68k-amiga)
  2667. REQUIRE_PACKAGES_RTL=1
  2668. REQUIRE_PACKAGES_PASZLIB=1
  2669. REQUIRE_PACKAGES_FCL-PROCESS=1
  2670. REQUIRE_PACKAGES_HASH=1
  2671. REQUIRE_PACKAGES_LIBTAR=1
  2672. REQUIRE_PACKAGES_FPMKUNIT=1
  2673. REQUIRE_PACKAGES_LIBOGCFPC=1
  2674. endif
  2675. ifeq ($(FULL_TARGET),m68k-atari)
  2676. REQUIRE_PACKAGES_RTL=1
  2677. REQUIRE_PACKAGES_PASZLIB=1
  2678. REQUIRE_PACKAGES_FCL-PROCESS=1
  2679. REQUIRE_PACKAGES_HASH=1
  2680. REQUIRE_PACKAGES_LIBTAR=1
  2681. REQUIRE_PACKAGES_FPMKUNIT=1
  2682. REQUIRE_PACKAGES_LIBOGCFPC=1
  2683. endif
  2684. ifeq ($(FULL_TARGET),m68k-palmos)
  2685. REQUIRE_PACKAGES_RTL=1
  2686. REQUIRE_PACKAGES_PASZLIB=1
  2687. REQUIRE_PACKAGES_FCL-PROCESS=1
  2688. REQUIRE_PACKAGES_HASH=1
  2689. REQUIRE_PACKAGES_LIBTAR=1
  2690. REQUIRE_PACKAGES_FPMKUNIT=1
  2691. REQUIRE_PACKAGES_LIBOGCFPC=1
  2692. endif
  2693. ifeq ($(FULL_TARGET),m68k-macosclassic)
  2694. REQUIRE_PACKAGES_RTL=1
  2695. REQUIRE_PACKAGES_PASZLIB=1
  2696. REQUIRE_PACKAGES_FCL-PROCESS=1
  2697. REQUIRE_PACKAGES_HASH=1
  2698. REQUIRE_PACKAGES_LIBTAR=1
  2699. REQUIRE_PACKAGES_FPMKUNIT=1
  2700. REQUIRE_PACKAGES_LIBOGCFPC=1
  2701. endif
  2702. ifeq ($(FULL_TARGET),m68k-embedded)
  2703. REQUIRE_PACKAGES_RTL=1
  2704. REQUIRE_PACKAGES_PASZLIB=1
  2705. REQUIRE_PACKAGES_FCL-PROCESS=1
  2706. REQUIRE_PACKAGES_HASH=1
  2707. REQUIRE_PACKAGES_LIBTAR=1
  2708. REQUIRE_PACKAGES_FPMKUNIT=1
  2709. REQUIRE_PACKAGES_LIBOGCFPC=1
  2710. endif
  2711. ifeq ($(FULL_TARGET),m68k-sinclairql)
  2712. REQUIRE_PACKAGES_RTL=1
  2713. REQUIRE_PACKAGES_PASZLIB=1
  2714. REQUIRE_PACKAGES_FCL-PROCESS=1
  2715. REQUIRE_PACKAGES_HASH=1
  2716. REQUIRE_PACKAGES_LIBTAR=1
  2717. REQUIRE_PACKAGES_FPMKUNIT=1
  2718. REQUIRE_PACKAGES_LIBOGCFPC=1
  2719. endif
  2720. ifeq ($(FULL_TARGET),powerpc-linux)
  2721. REQUIRE_PACKAGES_RTL=1
  2722. REQUIRE_PACKAGES_PASZLIB=1
  2723. REQUIRE_PACKAGES_FCL-PROCESS=1
  2724. REQUIRE_PACKAGES_HASH=1
  2725. REQUIRE_PACKAGES_LIBTAR=1
  2726. REQUIRE_PACKAGES_FPMKUNIT=1
  2727. REQUIRE_PACKAGES_LIBOGCFPC=1
  2728. endif
  2729. ifeq ($(FULL_TARGET),powerpc-netbsd)
  2730. REQUIRE_PACKAGES_RTL=1
  2731. REQUIRE_PACKAGES_PASZLIB=1
  2732. REQUIRE_PACKAGES_FCL-PROCESS=1
  2733. REQUIRE_PACKAGES_HASH=1
  2734. REQUIRE_PACKAGES_LIBTAR=1
  2735. REQUIRE_PACKAGES_FPMKUNIT=1
  2736. REQUIRE_PACKAGES_LIBOGCFPC=1
  2737. endif
  2738. ifeq ($(FULL_TARGET),powerpc-amiga)
  2739. REQUIRE_PACKAGES_RTL=1
  2740. REQUIRE_PACKAGES_PASZLIB=1
  2741. REQUIRE_PACKAGES_FCL-PROCESS=1
  2742. REQUIRE_PACKAGES_HASH=1
  2743. REQUIRE_PACKAGES_LIBTAR=1
  2744. REQUIRE_PACKAGES_FPMKUNIT=1
  2745. REQUIRE_PACKAGES_LIBOGCFPC=1
  2746. endif
  2747. ifeq ($(FULL_TARGET),powerpc-macosclassic)
  2748. REQUIRE_PACKAGES_RTL=1
  2749. REQUIRE_PACKAGES_PASZLIB=1
  2750. REQUIRE_PACKAGES_FCL-PROCESS=1
  2751. REQUIRE_PACKAGES_HASH=1
  2752. REQUIRE_PACKAGES_LIBTAR=1
  2753. REQUIRE_PACKAGES_FPMKUNIT=1
  2754. REQUIRE_PACKAGES_LIBOGCFPC=1
  2755. endif
  2756. ifeq ($(FULL_TARGET),powerpc-darwin)
  2757. REQUIRE_PACKAGES_RTL=1
  2758. REQUIRE_PACKAGES_PASZLIB=1
  2759. REQUIRE_PACKAGES_FCL-PROCESS=1
  2760. REQUIRE_PACKAGES_HASH=1
  2761. REQUIRE_PACKAGES_LIBTAR=1
  2762. REQUIRE_PACKAGES_FPMKUNIT=1
  2763. REQUIRE_PACKAGES_LIBOGCFPC=1
  2764. endif
  2765. ifeq ($(FULL_TARGET),powerpc-morphos)
  2766. REQUIRE_PACKAGES_RTL=1
  2767. REQUIRE_PACKAGES_PASZLIB=1
  2768. REQUIRE_PACKAGES_FCL-PROCESS=1
  2769. REQUIRE_PACKAGES_HASH=1
  2770. REQUIRE_PACKAGES_LIBTAR=1
  2771. REQUIRE_PACKAGES_FPMKUNIT=1
  2772. REQUIRE_PACKAGES_LIBOGCFPC=1
  2773. endif
  2774. ifeq ($(FULL_TARGET),powerpc-embedded)
  2775. REQUIRE_PACKAGES_RTL=1
  2776. REQUIRE_PACKAGES_PASZLIB=1
  2777. REQUIRE_PACKAGES_FCL-PROCESS=1
  2778. REQUIRE_PACKAGES_HASH=1
  2779. REQUIRE_PACKAGES_LIBTAR=1
  2780. REQUIRE_PACKAGES_FPMKUNIT=1
  2781. REQUIRE_PACKAGES_LIBOGCFPC=1
  2782. endif
  2783. ifeq ($(FULL_TARGET),powerpc-wii)
  2784. REQUIRE_PACKAGES_RTL=1
  2785. REQUIRE_PACKAGES_PASZLIB=1
  2786. REQUIRE_PACKAGES_FCL-PROCESS=1
  2787. REQUIRE_PACKAGES_HASH=1
  2788. REQUIRE_PACKAGES_LIBTAR=1
  2789. REQUIRE_PACKAGES_FPMKUNIT=1
  2790. REQUIRE_PACKAGES_LIBOGCFPC=1
  2791. endif
  2792. ifeq ($(FULL_TARGET),powerpc-aix)
  2793. REQUIRE_PACKAGES_RTL=1
  2794. REQUIRE_PACKAGES_PASZLIB=1
  2795. REQUIRE_PACKAGES_FCL-PROCESS=1
  2796. REQUIRE_PACKAGES_HASH=1
  2797. REQUIRE_PACKAGES_LIBTAR=1
  2798. REQUIRE_PACKAGES_FPMKUNIT=1
  2799. REQUIRE_PACKAGES_LIBOGCFPC=1
  2800. endif
  2801. ifeq ($(FULL_TARGET),sparc-linux)
  2802. REQUIRE_PACKAGES_RTL=1
  2803. REQUIRE_PACKAGES_PASZLIB=1
  2804. REQUIRE_PACKAGES_FCL-PROCESS=1
  2805. REQUIRE_PACKAGES_HASH=1
  2806. REQUIRE_PACKAGES_LIBTAR=1
  2807. REQUIRE_PACKAGES_FPMKUNIT=1
  2808. REQUIRE_PACKAGES_LIBOGCFPC=1
  2809. endif
  2810. ifeq ($(FULL_TARGET),sparc-netbsd)
  2811. REQUIRE_PACKAGES_RTL=1
  2812. REQUIRE_PACKAGES_PASZLIB=1
  2813. REQUIRE_PACKAGES_FCL-PROCESS=1
  2814. REQUIRE_PACKAGES_HASH=1
  2815. REQUIRE_PACKAGES_LIBTAR=1
  2816. REQUIRE_PACKAGES_FPMKUNIT=1
  2817. REQUIRE_PACKAGES_LIBOGCFPC=1
  2818. endif
  2819. ifeq ($(FULL_TARGET),sparc-solaris)
  2820. REQUIRE_PACKAGES_RTL=1
  2821. REQUIRE_PACKAGES_PASZLIB=1
  2822. REQUIRE_PACKAGES_FCL-PROCESS=1
  2823. REQUIRE_PACKAGES_HASH=1
  2824. REQUIRE_PACKAGES_LIBTAR=1
  2825. REQUIRE_PACKAGES_FPMKUNIT=1
  2826. REQUIRE_PACKAGES_LIBOGCFPC=1
  2827. endif
  2828. ifeq ($(FULL_TARGET),sparc-embedded)
  2829. REQUIRE_PACKAGES_RTL=1
  2830. REQUIRE_PACKAGES_PASZLIB=1
  2831. REQUIRE_PACKAGES_FCL-PROCESS=1
  2832. REQUIRE_PACKAGES_HASH=1
  2833. REQUIRE_PACKAGES_LIBTAR=1
  2834. REQUIRE_PACKAGES_FPMKUNIT=1
  2835. REQUIRE_PACKAGES_LIBOGCFPC=1
  2836. endif
  2837. ifeq ($(FULL_TARGET),x86_64-linux)
  2838. REQUIRE_PACKAGES_RTL=1
  2839. REQUIRE_PACKAGES_PASZLIB=1
  2840. REQUIRE_PACKAGES_FCL-PROCESS=1
  2841. REQUIRE_PACKAGES_HASH=1
  2842. REQUIRE_PACKAGES_LIBTAR=1
  2843. REQUIRE_PACKAGES_FPMKUNIT=1
  2844. REQUIRE_PACKAGES_LIBOGCFPC=1
  2845. endif
  2846. ifeq ($(FULL_TARGET),x86_64-freebsd)
  2847. REQUIRE_PACKAGES_RTL=1
  2848. REQUIRE_PACKAGES_PASZLIB=1
  2849. REQUIRE_PACKAGES_FCL-PROCESS=1
  2850. REQUIRE_PACKAGES_HASH=1
  2851. REQUIRE_PACKAGES_LIBTAR=1
  2852. REQUIRE_PACKAGES_FPMKUNIT=1
  2853. REQUIRE_PACKAGES_LIBOGCFPC=1
  2854. endif
  2855. ifeq ($(FULL_TARGET),x86_64-haiku)
  2856. REQUIRE_PACKAGES_RTL=1
  2857. REQUIRE_PACKAGES_PASZLIB=1
  2858. REQUIRE_PACKAGES_FCL-PROCESS=1
  2859. REQUIRE_PACKAGES_HASH=1
  2860. REQUIRE_PACKAGES_LIBTAR=1
  2861. REQUIRE_PACKAGES_FPMKUNIT=1
  2862. REQUIRE_PACKAGES_LIBOGCFPC=1
  2863. endif
  2864. ifeq ($(FULL_TARGET),x86_64-netbsd)
  2865. REQUIRE_PACKAGES_RTL=1
  2866. REQUIRE_PACKAGES_PASZLIB=1
  2867. REQUIRE_PACKAGES_FCL-PROCESS=1
  2868. REQUIRE_PACKAGES_HASH=1
  2869. REQUIRE_PACKAGES_LIBTAR=1
  2870. REQUIRE_PACKAGES_FPMKUNIT=1
  2871. REQUIRE_PACKAGES_LIBOGCFPC=1
  2872. endif
  2873. ifeq ($(FULL_TARGET),x86_64-solaris)
  2874. REQUIRE_PACKAGES_RTL=1
  2875. REQUIRE_PACKAGES_PASZLIB=1
  2876. REQUIRE_PACKAGES_FCL-PROCESS=1
  2877. REQUIRE_PACKAGES_HASH=1
  2878. REQUIRE_PACKAGES_LIBTAR=1
  2879. REQUIRE_PACKAGES_FPMKUNIT=1
  2880. REQUIRE_PACKAGES_LIBOGCFPC=1
  2881. endif
  2882. ifeq ($(FULL_TARGET),x86_64-openbsd)
  2883. REQUIRE_PACKAGES_RTL=1
  2884. REQUIRE_PACKAGES_PASZLIB=1
  2885. REQUIRE_PACKAGES_FCL-PROCESS=1
  2886. REQUIRE_PACKAGES_HASH=1
  2887. REQUIRE_PACKAGES_LIBTAR=1
  2888. REQUIRE_PACKAGES_FPMKUNIT=1
  2889. REQUIRE_PACKAGES_LIBOGCFPC=1
  2890. endif
  2891. ifeq ($(FULL_TARGET),x86_64-darwin)
  2892. REQUIRE_PACKAGES_RTL=1
  2893. REQUIRE_PACKAGES_PASZLIB=1
  2894. REQUIRE_PACKAGES_FCL-PROCESS=1
  2895. REQUIRE_PACKAGES_HASH=1
  2896. REQUIRE_PACKAGES_LIBTAR=1
  2897. REQUIRE_PACKAGES_FPMKUNIT=1
  2898. REQUIRE_PACKAGES_LIBOGCFPC=1
  2899. endif
  2900. ifeq ($(FULL_TARGET),x86_64-win64)
  2901. REQUIRE_PACKAGES_RTL=1
  2902. REQUIRE_PACKAGES_PASZLIB=1
  2903. REQUIRE_PACKAGES_FCL-PROCESS=1
  2904. REQUIRE_PACKAGES_HASH=1
  2905. REQUIRE_PACKAGES_LIBTAR=1
  2906. REQUIRE_PACKAGES_FPMKUNIT=1
  2907. REQUIRE_PACKAGES_LIBOGCFPC=1
  2908. endif
  2909. ifeq ($(FULL_TARGET),x86_64-embedded)
  2910. REQUIRE_PACKAGES_RTL=1
  2911. REQUIRE_PACKAGES_PASZLIB=1
  2912. REQUIRE_PACKAGES_FCL-PROCESS=1
  2913. REQUIRE_PACKAGES_HASH=1
  2914. REQUIRE_PACKAGES_LIBTAR=1
  2915. REQUIRE_PACKAGES_FPMKUNIT=1
  2916. REQUIRE_PACKAGES_LIBOGCFPC=1
  2917. endif
  2918. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  2919. REQUIRE_PACKAGES_RTL=1
  2920. REQUIRE_PACKAGES_PASZLIB=1
  2921. REQUIRE_PACKAGES_FCL-PROCESS=1
  2922. REQUIRE_PACKAGES_HASH=1
  2923. REQUIRE_PACKAGES_LIBTAR=1
  2924. REQUIRE_PACKAGES_FPMKUNIT=1
  2925. REQUIRE_PACKAGES_LIBOGCFPC=1
  2926. endif
  2927. ifeq ($(FULL_TARGET),x86_64-android)
  2928. REQUIRE_PACKAGES_RTL=1
  2929. REQUIRE_PACKAGES_PASZLIB=1
  2930. REQUIRE_PACKAGES_FCL-PROCESS=1
  2931. REQUIRE_PACKAGES_HASH=1
  2932. REQUIRE_PACKAGES_LIBTAR=1
  2933. REQUIRE_PACKAGES_FPMKUNIT=1
  2934. REQUIRE_PACKAGES_LIBOGCFPC=1
  2935. endif
  2936. ifeq ($(FULL_TARGET),x86_64-aros)
  2937. REQUIRE_PACKAGES_RTL=1
  2938. REQUIRE_PACKAGES_PASZLIB=1
  2939. REQUIRE_PACKAGES_FCL-PROCESS=1
  2940. REQUIRE_PACKAGES_HASH=1
  2941. REQUIRE_PACKAGES_LIBTAR=1
  2942. REQUIRE_PACKAGES_FPMKUNIT=1
  2943. REQUIRE_PACKAGES_LIBOGCFPC=1
  2944. endif
  2945. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  2946. REQUIRE_PACKAGES_RTL=1
  2947. REQUIRE_PACKAGES_PASZLIB=1
  2948. REQUIRE_PACKAGES_FCL-PROCESS=1
  2949. REQUIRE_PACKAGES_HASH=1
  2950. REQUIRE_PACKAGES_LIBTAR=1
  2951. REQUIRE_PACKAGES_FPMKUNIT=1
  2952. REQUIRE_PACKAGES_LIBOGCFPC=1
  2953. endif
  2954. ifeq ($(FULL_TARGET),arm-linux)
  2955. REQUIRE_PACKAGES_RTL=1
  2956. REQUIRE_PACKAGES_PASZLIB=1
  2957. REQUIRE_PACKAGES_FCL-PROCESS=1
  2958. REQUIRE_PACKAGES_HASH=1
  2959. REQUIRE_PACKAGES_LIBTAR=1
  2960. REQUIRE_PACKAGES_FPMKUNIT=1
  2961. REQUIRE_PACKAGES_LIBOGCFPC=1
  2962. endif
  2963. ifeq ($(FULL_TARGET),arm-netbsd)
  2964. REQUIRE_PACKAGES_RTL=1
  2965. REQUIRE_PACKAGES_PASZLIB=1
  2966. REQUIRE_PACKAGES_FCL-PROCESS=1
  2967. REQUIRE_PACKAGES_HASH=1
  2968. REQUIRE_PACKAGES_LIBTAR=1
  2969. REQUIRE_PACKAGES_FPMKUNIT=1
  2970. REQUIRE_PACKAGES_LIBOGCFPC=1
  2971. endif
  2972. ifeq ($(FULL_TARGET),arm-palmos)
  2973. REQUIRE_PACKAGES_RTL=1
  2974. REQUIRE_PACKAGES_PASZLIB=1
  2975. REQUIRE_PACKAGES_FCL-PROCESS=1
  2976. REQUIRE_PACKAGES_HASH=1
  2977. REQUIRE_PACKAGES_LIBTAR=1
  2978. REQUIRE_PACKAGES_FPMKUNIT=1
  2979. REQUIRE_PACKAGES_LIBOGCFPC=1
  2980. endif
  2981. ifeq ($(FULL_TARGET),arm-wince)
  2982. REQUIRE_PACKAGES_RTL=1
  2983. REQUIRE_PACKAGES_PASZLIB=1
  2984. REQUIRE_PACKAGES_FCL-PROCESS=1
  2985. REQUIRE_PACKAGES_HASH=1
  2986. REQUIRE_PACKAGES_LIBTAR=1
  2987. REQUIRE_PACKAGES_FPMKUNIT=1
  2988. REQUIRE_PACKAGES_LIBOGCFPC=1
  2989. endif
  2990. ifeq ($(FULL_TARGET),arm-gba)
  2991. REQUIRE_PACKAGES_RTL=1
  2992. REQUIRE_PACKAGES_PASZLIB=1
  2993. REQUIRE_PACKAGES_FCL-PROCESS=1
  2994. REQUIRE_PACKAGES_HASH=1
  2995. REQUIRE_PACKAGES_LIBTAR=1
  2996. REQUIRE_PACKAGES_FPMKUNIT=1
  2997. REQUIRE_PACKAGES_LIBOGCFPC=1
  2998. endif
  2999. ifeq ($(FULL_TARGET),arm-nds)
  3000. REQUIRE_PACKAGES_RTL=1
  3001. REQUIRE_PACKAGES_PASZLIB=1
  3002. REQUIRE_PACKAGES_FCL-PROCESS=1
  3003. REQUIRE_PACKAGES_HASH=1
  3004. REQUIRE_PACKAGES_LIBTAR=1
  3005. REQUIRE_PACKAGES_FPMKUNIT=1
  3006. REQUIRE_PACKAGES_LIBOGCFPC=1
  3007. endif
  3008. ifeq ($(FULL_TARGET),arm-embedded)
  3009. REQUIRE_PACKAGES_RTL=1
  3010. REQUIRE_PACKAGES_PASZLIB=1
  3011. REQUIRE_PACKAGES_FCL-PROCESS=1
  3012. REQUIRE_PACKAGES_HASH=1
  3013. REQUIRE_PACKAGES_LIBTAR=1
  3014. REQUIRE_PACKAGES_FPMKUNIT=1
  3015. REQUIRE_PACKAGES_LIBOGCFPC=1
  3016. endif
  3017. ifeq ($(FULL_TARGET),arm-symbian)
  3018. REQUIRE_PACKAGES_RTL=1
  3019. REQUIRE_PACKAGES_PASZLIB=1
  3020. REQUIRE_PACKAGES_FCL-PROCESS=1
  3021. REQUIRE_PACKAGES_HASH=1
  3022. REQUIRE_PACKAGES_LIBTAR=1
  3023. REQUIRE_PACKAGES_FPMKUNIT=1
  3024. REQUIRE_PACKAGES_LIBOGCFPC=1
  3025. endif
  3026. ifeq ($(FULL_TARGET),arm-android)
  3027. REQUIRE_PACKAGES_RTL=1
  3028. REQUIRE_PACKAGES_PASZLIB=1
  3029. REQUIRE_PACKAGES_FCL-PROCESS=1
  3030. REQUIRE_PACKAGES_HASH=1
  3031. REQUIRE_PACKAGES_LIBTAR=1
  3032. REQUIRE_PACKAGES_FPMKUNIT=1
  3033. REQUIRE_PACKAGES_LIBOGCFPC=1
  3034. endif
  3035. ifeq ($(FULL_TARGET),arm-aros)
  3036. REQUIRE_PACKAGES_RTL=1
  3037. REQUIRE_PACKAGES_PASZLIB=1
  3038. REQUIRE_PACKAGES_FCL-PROCESS=1
  3039. REQUIRE_PACKAGES_HASH=1
  3040. REQUIRE_PACKAGES_LIBTAR=1
  3041. REQUIRE_PACKAGES_FPMKUNIT=1
  3042. REQUIRE_PACKAGES_LIBOGCFPC=1
  3043. endif
  3044. ifeq ($(FULL_TARGET),arm-freertos)
  3045. REQUIRE_PACKAGES_RTL=1
  3046. REQUIRE_PACKAGES_PASZLIB=1
  3047. REQUIRE_PACKAGES_FCL-PROCESS=1
  3048. REQUIRE_PACKAGES_HASH=1
  3049. REQUIRE_PACKAGES_LIBTAR=1
  3050. REQUIRE_PACKAGES_FPMKUNIT=1
  3051. REQUIRE_PACKAGES_LIBOGCFPC=1
  3052. endif
  3053. ifeq ($(FULL_TARGET),arm-ios)
  3054. REQUIRE_PACKAGES_RTL=1
  3055. REQUIRE_PACKAGES_PASZLIB=1
  3056. REQUIRE_PACKAGES_FCL-PROCESS=1
  3057. REQUIRE_PACKAGES_HASH=1
  3058. REQUIRE_PACKAGES_LIBTAR=1
  3059. REQUIRE_PACKAGES_FPMKUNIT=1
  3060. REQUIRE_PACKAGES_LIBOGCFPC=1
  3061. endif
  3062. ifeq ($(FULL_TARGET),powerpc64-linux)
  3063. REQUIRE_PACKAGES_RTL=1
  3064. REQUIRE_PACKAGES_PASZLIB=1
  3065. REQUIRE_PACKAGES_FCL-PROCESS=1
  3066. REQUIRE_PACKAGES_HASH=1
  3067. REQUIRE_PACKAGES_LIBTAR=1
  3068. REQUIRE_PACKAGES_FPMKUNIT=1
  3069. REQUIRE_PACKAGES_LIBOGCFPC=1
  3070. endif
  3071. ifeq ($(FULL_TARGET),powerpc64-darwin)
  3072. REQUIRE_PACKAGES_RTL=1
  3073. REQUIRE_PACKAGES_PASZLIB=1
  3074. REQUIRE_PACKAGES_FCL-PROCESS=1
  3075. REQUIRE_PACKAGES_HASH=1
  3076. REQUIRE_PACKAGES_LIBTAR=1
  3077. REQUIRE_PACKAGES_FPMKUNIT=1
  3078. REQUIRE_PACKAGES_LIBOGCFPC=1
  3079. endif
  3080. ifeq ($(FULL_TARGET),powerpc64-embedded)
  3081. REQUIRE_PACKAGES_RTL=1
  3082. REQUIRE_PACKAGES_PASZLIB=1
  3083. REQUIRE_PACKAGES_FCL-PROCESS=1
  3084. REQUIRE_PACKAGES_HASH=1
  3085. REQUIRE_PACKAGES_LIBTAR=1
  3086. REQUIRE_PACKAGES_FPMKUNIT=1
  3087. REQUIRE_PACKAGES_LIBOGCFPC=1
  3088. endif
  3089. ifeq ($(FULL_TARGET),powerpc64-aix)
  3090. REQUIRE_PACKAGES_RTL=1
  3091. REQUIRE_PACKAGES_PASZLIB=1
  3092. REQUIRE_PACKAGES_FCL-PROCESS=1
  3093. REQUIRE_PACKAGES_HASH=1
  3094. REQUIRE_PACKAGES_LIBTAR=1
  3095. REQUIRE_PACKAGES_FPMKUNIT=1
  3096. REQUIRE_PACKAGES_LIBOGCFPC=1
  3097. endif
  3098. ifeq ($(FULL_TARGET),avr-embedded)
  3099. REQUIRE_PACKAGES_RTL=1
  3100. REQUIRE_PACKAGES_PASZLIB=1
  3101. REQUIRE_PACKAGES_FCL-PROCESS=1
  3102. REQUIRE_PACKAGES_HASH=1
  3103. REQUIRE_PACKAGES_LIBTAR=1
  3104. REQUIRE_PACKAGES_FPMKUNIT=1
  3105. REQUIRE_PACKAGES_LIBOGCFPC=1
  3106. endif
  3107. ifeq ($(FULL_TARGET),armeb-linux)
  3108. REQUIRE_PACKAGES_RTL=1
  3109. REQUIRE_PACKAGES_PASZLIB=1
  3110. REQUIRE_PACKAGES_FCL-PROCESS=1
  3111. REQUIRE_PACKAGES_HASH=1
  3112. REQUIRE_PACKAGES_LIBTAR=1
  3113. REQUIRE_PACKAGES_FPMKUNIT=1
  3114. REQUIRE_PACKAGES_LIBOGCFPC=1
  3115. endif
  3116. ifeq ($(FULL_TARGET),armeb-embedded)
  3117. REQUIRE_PACKAGES_RTL=1
  3118. REQUIRE_PACKAGES_PASZLIB=1
  3119. REQUIRE_PACKAGES_FCL-PROCESS=1
  3120. REQUIRE_PACKAGES_HASH=1
  3121. REQUIRE_PACKAGES_LIBTAR=1
  3122. REQUIRE_PACKAGES_FPMKUNIT=1
  3123. REQUIRE_PACKAGES_LIBOGCFPC=1
  3124. endif
  3125. ifeq ($(FULL_TARGET),mips-linux)
  3126. REQUIRE_PACKAGES_RTL=1
  3127. REQUIRE_PACKAGES_PASZLIB=1
  3128. REQUIRE_PACKAGES_FCL-PROCESS=1
  3129. REQUIRE_PACKAGES_HASH=1
  3130. REQUIRE_PACKAGES_LIBTAR=1
  3131. REQUIRE_PACKAGES_FPMKUNIT=1
  3132. REQUIRE_PACKAGES_LIBOGCFPC=1
  3133. endif
  3134. ifeq ($(FULL_TARGET),mipsel-linux)
  3135. REQUIRE_PACKAGES_RTL=1
  3136. REQUIRE_PACKAGES_PASZLIB=1
  3137. REQUIRE_PACKAGES_FCL-PROCESS=1
  3138. REQUIRE_PACKAGES_HASH=1
  3139. REQUIRE_PACKAGES_LIBTAR=1
  3140. REQUIRE_PACKAGES_FPMKUNIT=1
  3141. REQUIRE_PACKAGES_LIBOGCFPC=1
  3142. endif
  3143. ifeq ($(FULL_TARGET),mipsel-embedded)
  3144. REQUIRE_PACKAGES_RTL=1
  3145. REQUIRE_PACKAGES_PASZLIB=1
  3146. REQUIRE_PACKAGES_FCL-PROCESS=1
  3147. REQUIRE_PACKAGES_HASH=1
  3148. REQUIRE_PACKAGES_LIBTAR=1
  3149. REQUIRE_PACKAGES_FPMKUNIT=1
  3150. REQUIRE_PACKAGES_LIBOGCFPC=1
  3151. endif
  3152. ifeq ($(FULL_TARGET),mipsel-android)
  3153. REQUIRE_PACKAGES_RTL=1
  3154. REQUIRE_PACKAGES_PASZLIB=1
  3155. REQUIRE_PACKAGES_FCL-PROCESS=1
  3156. REQUIRE_PACKAGES_HASH=1
  3157. REQUIRE_PACKAGES_LIBTAR=1
  3158. REQUIRE_PACKAGES_FPMKUNIT=1
  3159. REQUIRE_PACKAGES_LIBOGCFPC=1
  3160. endif
  3161. ifeq ($(FULL_TARGET),mips64-linux)
  3162. REQUIRE_PACKAGES_RTL=1
  3163. REQUIRE_PACKAGES_PASZLIB=1
  3164. REQUIRE_PACKAGES_FCL-PROCESS=1
  3165. REQUIRE_PACKAGES_HASH=1
  3166. REQUIRE_PACKAGES_LIBTAR=1
  3167. REQUIRE_PACKAGES_FPMKUNIT=1
  3168. REQUIRE_PACKAGES_LIBOGCFPC=1
  3169. endif
  3170. ifeq ($(FULL_TARGET),mips64el-linux)
  3171. REQUIRE_PACKAGES_RTL=1
  3172. REQUIRE_PACKAGES_PASZLIB=1
  3173. REQUIRE_PACKAGES_FCL-PROCESS=1
  3174. REQUIRE_PACKAGES_HASH=1
  3175. REQUIRE_PACKAGES_LIBTAR=1
  3176. REQUIRE_PACKAGES_FPMKUNIT=1
  3177. REQUIRE_PACKAGES_LIBOGCFPC=1
  3178. endif
  3179. ifeq ($(FULL_TARGET),jvm-java)
  3180. REQUIRE_PACKAGES_RTL=1
  3181. REQUIRE_PACKAGES_PASZLIB=1
  3182. REQUIRE_PACKAGES_FCL-PROCESS=1
  3183. REQUIRE_PACKAGES_HASH=1
  3184. REQUIRE_PACKAGES_LIBTAR=1
  3185. REQUIRE_PACKAGES_FPMKUNIT=1
  3186. REQUIRE_PACKAGES_LIBOGCFPC=1
  3187. endif
  3188. ifeq ($(FULL_TARGET),jvm-android)
  3189. REQUIRE_PACKAGES_RTL=1
  3190. REQUIRE_PACKAGES_PASZLIB=1
  3191. REQUIRE_PACKAGES_FCL-PROCESS=1
  3192. REQUIRE_PACKAGES_HASH=1
  3193. REQUIRE_PACKAGES_LIBTAR=1
  3194. REQUIRE_PACKAGES_FPMKUNIT=1
  3195. REQUIRE_PACKAGES_LIBOGCFPC=1
  3196. endif
  3197. ifeq ($(FULL_TARGET),i8086-embedded)
  3198. REQUIRE_PACKAGES_RTL=1
  3199. REQUIRE_PACKAGES_PASZLIB=1
  3200. REQUIRE_PACKAGES_FCL-PROCESS=1
  3201. REQUIRE_PACKAGES_HASH=1
  3202. REQUIRE_PACKAGES_LIBTAR=1
  3203. REQUIRE_PACKAGES_FPMKUNIT=1
  3204. REQUIRE_PACKAGES_LIBOGCFPC=1
  3205. endif
  3206. ifeq ($(FULL_TARGET),i8086-msdos)
  3207. REQUIRE_PACKAGES_RTL=1
  3208. REQUIRE_PACKAGES_PASZLIB=1
  3209. REQUIRE_PACKAGES_FCL-PROCESS=1
  3210. REQUIRE_PACKAGES_HASH=1
  3211. REQUIRE_PACKAGES_LIBTAR=1
  3212. REQUIRE_PACKAGES_FPMKUNIT=1
  3213. REQUIRE_PACKAGES_LIBOGCFPC=1
  3214. endif
  3215. ifeq ($(FULL_TARGET),i8086-win16)
  3216. REQUIRE_PACKAGES_RTL=1
  3217. REQUIRE_PACKAGES_PASZLIB=1
  3218. REQUIRE_PACKAGES_FCL-PROCESS=1
  3219. REQUIRE_PACKAGES_HASH=1
  3220. REQUIRE_PACKAGES_LIBTAR=1
  3221. REQUIRE_PACKAGES_FPMKUNIT=1
  3222. REQUIRE_PACKAGES_LIBOGCFPC=1
  3223. endif
  3224. ifeq ($(FULL_TARGET),aarch64-linux)
  3225. REQUIRE_PACKAGES_RTL=1
  3226. REQUIRE_PACKAGES_PASZLIB=1
  3227. REQUIRE_PACKAGES_FCL-PROCESS=1
  3228. REQUIRE_PACKAGES_HASH=1
  3229. REQUIRE_PACKAGES_LIBTAR=1
  3230. REQUIRE_PACKAGES_FPMKUNIT=1
  3231. REQUIRE_PACKAGES_LIBOGCFPC=1
  3232. endif
  3233. ifeq ($(FULL_TARGET),aarch64-freebsd)
  3234. REQUIRE_PACKAGES_RTL=1
  3235. REQUIRE_PACKAGES_PASZLIB=1
  3236. REQUIRE_PACKAGES_FCL-PROCESS=1
  3237. REQUIRE_PACKAGES_HASH=1
  3238. REQUIRE_PACKAGES_LIBTAR=1
  3239. REQUIRE_PACKAGES_FPMKUNIT=1
  3240. REQUIRE_PACKAGES_LIBOGCFPC=1
  3241. endif
  3242. ifeq ($(FULL_TARGET),aarch64-darwin)
  3243. REQUIRE_PACKAGES_RTL=1
  3244. REQUIRE_PACKAGES_PASZLIB=1
  3245. REQUIRE_PACKAGES_FCL-PROCESS=1
  3246. REQUIRE_PACKAGES_HASH=1
  3247. REQUIRE_PACKAGES_LIBTAR=1
  3248. REQUIRE_PACKAGES_FPMKUNIT=1
  3249. REQUIRE_PACKAGES_LIBOGCFPC=1
  3250. endif
  3251. ifeq ($(FULL_TARGET),aarch64-win64)
  3252. REQUIRE_PACKAGES_RTL=1
  3253. REQUIRE_PACKAGES_PASZLIB=1
  3254. REQUIRE_PACKAGES_FCL-PROCESS=1
  3255. REQUIRE_PACKAGES_HASH=1
  3256. REQUIRE_PACKAGES_LIBTAR=1
  3257. REQUIRE_PACKAGES_FPMKUNIT=1
  3258. REQUIRE_PACKAGES_LIBOGCFPC=1
  3259. endif
  3260. ifeq ($(FULL_TARGET),aarch64-embedded)
  3261. REQUIRE_PACKAGES_RTL=1
  3262. REQUIRE_PACKAGES_PASZLIB=1
  3263. REQUIRE_PACKAGES_FCL-PROCESS=1
  3264. REQUIRE_PACKAGES_HASH=1
  3265. REQUIRE_PACKAGES_LIBTAR=1
  3266. REQUIRE_PACKAGES_FPMKUNIT=1
  3267. REQUIRE_PACKAGES_LIBOGCFPC=1
  3268. endif
  3269. ifeq ($(FULL_TARGET),aarch64-android)
  3270. REQUIRE_PACKAGES_RTL=1
  3271. REQUIRE_PACKAGES_PASZLIB=1
  3272. REQUIRE_PACKAGES_FCL-PROCESS=1
  3273. REQUIRE_PACKAGES_HASH=1
  3274. REQUIRE_PACKAGES_LIBTAR=1
  3275. REQUIRE_PACKAGES_FPMKUNIT=1
  3276. REQUIRE_PACKAGES_LIBOGCFPC=1
  3277. endif
  3278. ifeq ($(FULL_TARGET),aarch64-ios)
  3279. REQUIRE_PACKAGES_RTL=1
  3280. REQUIRE_PACKAGES_PASZLIB=1
  3281. REQUIRE_PACKAGES_FCL-PROCESS=1
  3282. REQUIRE_PACKAGES_HASH=1
  3283. REQUIRE_PACKAGES_LIBTAR=1
  3284. REQUIRE_PACKAGES_FPMKUNIT=1
  3285. REQUIRE_PACKAGES_LIBOGCFPC=1
  3286. endif
  3287. ifeq ($(FULL_TARGET),wasm32-embedded)
  3288. REQUIRE_PACKAGES_RTL=1
  3289. REQUIRE_PACKAGES_PASZLIB=1
  3290. REQUIRE_PACKAGES_FCL-PROCESS=1
  3291. REQUIRE_PACKAGES_HASH=1
  3292. REQUIRE_PACKAGES_LIBTAR=1
  3293. REQUIRE_PACKAGES_FPMKUNIT=1
  3294. REQUIRE_PACKAGES_LIBOGCFPC=1
  3295. endif
  3296. ifeq ($(FULL_TARGET),wasm32-wasi)
  3297. REQUIRE_PACKAGES_RTL=1
  3298. REQUIRE_PACKAGES_PASZLIB=1
  3299. REQUIRE_PACKAGES_FCL-PROCESS=1
  3300. REQUIRE_PACKAGES_HASH=1
  3301. REQUIRE_PACKAGES_LIBTAR=1
  3302. REQUIRE_PACKAGES_FPMKUNIT=1
  3303. REQUIRE_PACKAGES_LIBOGCFPC=1
  3304. endif
  3305. ifeq ($(FULL_TARGET),sparc64-linux)
  3306. REQUIRE_PACKAGES_RTL=1
  3307. REQUIRE_PACKAGES_PASZLIB=1
  3308. REQUIRE_PACKAGES_FCL-PROCESS=1
  3309. REQUIRE_PACKAGES_HASH=1
  3310. REQUIRE_PACKAGES_LIBTAR=1
  3311. REQUIRE_PACKAGES_FPMKUNIT=1
  3312. REQUIRE_PACKAGES_LIBOGCFPC=1
  3313. endif
  3314. ifeq ($(FULL_TARGET),riscv32-linux)
  3315. REQUIRE_PACKAGES_RTL=1
  3316. REQUIRE_PACKAGES_PASZLIB=1
  3317. REQUIRE_PACKAGES_FCL-PROCESS=1
  3318. REQUIRE_PACKAGES_HASH=1
  3319. REQUIRE_PACKAGES_LIBTAR=1
  3320. REQUIRE_PACKAGES_FPMKUNIT=1
  3321. REQUIRE_PACKAGES_LIBOGCFPC=1
  3322. endif
  3323. ifeq ($(FULL_TARGET),riscv32-embedded)
  3324. REQUIRE_PACKAGES_RTL=1
  3325. REQUIRE_PACKAGES_PASZLIB=1
  3326. REQUIRE_PACKAGES_FCL-PROCESS=1
  3327. REQUIRE_PACKAGES_HASH=1
  3328. REQUIRE_PACKAGES_LIBTAR=1
  3329. REQUIRE_PACKAGES_FPMKUNIT=1
  3330. REQUIRE_PACKAGES_LIBOGCFPC=1
  3331. endif
  3332. ifeq ($(FULL_TARGET),riscv64-linux)
  3333. REQUIRE_PACKAGES_RTL=1
  3334. REQUIRE_PACKAGES_PASZLIB=1
  3335. REQUIRE_PACKAGES_FCL-PROCESS=1
  3336. REQUIRE_PACKAGES_HASH=1
  3337. REQUIRE_PACKAGES_LIBTAR=1
  3338. REQUIRE_PACKAGES_FPMKUNIT=1
  3339. REQUIRE_PACKAGES_LIBOGCFPC=1
  3340. endif
  3341. ifeq ($(FULL_TARGET),riscv64-embedded)
  3342. REQUIRE_PACKAGES_RTL=1
  3343. REQUIRE_PACKAGES_PASZLIB=1
  3344. REQUIRE_PACKAGES_FCL-PROCESS=1
  3345. REQUIRE_PACKAGES_HASH=1
  3346. REQUIRE_PACKAGES_LIBTAR=1
  3347. REQUIRE_PACKAGES_FPMKUNIT=1
  3348. REQUIRE_PACKAGES_LIBOGCFPC=1
  3349. endif
  3350. ifeq ($(FULL_TARGET),xtensa-linux)
  3351. REQUIRE_PACKAGES_RTL=1
  3352. REQUIRE_PACKAGES_PASZLIB=1
  3353. REQUIRE_PACKAGES_FCL-PROCESS=1
  3354. REQUIRE_PACKAGES_HASH=1
  3355. REQUIRE_PACKAGES_LIBTAR=1
  3356. REQUIRE_PACKAGES_FPMKUNIT=1
  3357. REQUIRE_PACKAGES_LIBOGCFPC=1
  3358. endif
  3359. ifeq ($(FULL_TARGET),xtensa-embedded)
  3360. REQUIRE_PACKAGES_RTL=1
  3361. REQUIRE_PACKAGES_PASZLIB=1
  3362. REQUIRE_PACKAGES_FCL-PROCESS=1
  3363. REQUIRE_PACKAGES_HASH=1
  3364. REQUIRE_PACKAGES_LIBTAR=1
  3365. REQUIRE_PACKAGES_FPMKUNIT=1
  3366. REQUIRE_PACKAGES_LIBOGCFPC=1
  3367. endif
  3368. ifeq ($(FULL_TARGET),xtensa-freertos)
  3369. REQUIRE_PACKAGES_RTL=1
  3370. REQUIRE_PACKAGES_PASZLIB=1
  3371. REQUIRE_PACKAGES_FCL-PROCESS=1
  3372. REQUIRE_PACKAGES_HASH=1
  3373. REQUIRE_PACKAGES_LIBTAR=1
  3374. REQUIRE_PACKAGES_FPMKUNIT=1
  3375. REQUIRE_PACKAGES_LIBOGCFPC=1
  3376. endif
  3377. ifeq ($(FULL_TARGET),z80-embedded)
  3378. REQUIRE_PACKAGES_RTL=1
  3379. REQUIRE_PACKAGES_PASZLIB=1
  3380. REQUIRE_PACKAGES_FCL-PROCESS=1
  3381. REQUIRE_PACKAGES_HASH=1
  3382. REQUIRE_PACKAGES_LIBTAR=1
  3383. REQUIRE_PACKAGES_FPMKUNIT=1
  3384. REQUIRE_PACKAGES_LIBOGCFPC=1
  3385. endif
  3386. ifeq ($(FULL_TARGET),z80-zxspectrum)
  3387. REQUIRE_PACKAGES_RTL=1
  3388. REQUIRE_PACKAGES_PASZLIB=1
  3389. REQUIRE_PACKAGES_FCL-PROCESS=1
  3390. REQUIRE_PACKAGES_HASH=1
  3391. REQUIRE_PACKAGES_LIBTAR=1
  3392. REQUIRE_PACKAGES_FPMKUNIT=1
  3393. REQUIRE_PACKAGES_LIBOGCFPC=1
  3394. endif
  3395. ifeq ($(FULL_TARGET),z80-msxdos)
  3396. REQUIRE_PACKAGES_RTL=1
  3397. REQUIRE_PACKAGES_PASZLIB=1
  3398. REQUIRE_PACKAGES_FCL-PROCESS=1
  3399. REQUIRE_PACKAGES_HASH=1
  3400. REQUIRE_PACKAGES_LIBTAR=1
  3401. REQUIRE_PACKAGES_FPMKUNIT=1
  3402. REQUIRE_PACKAGES_LIBOGCFPC=1
  3403. endif
  3404. ifeq ($(FULL_TARGET),z80-amstradcpc)
  3405. REQUIRE_PACKAGES_RTL=1
  3406. REQUIRE_PACKAGES_PASZLIB=1
  3407. REQUIRE_PACKAGES_FCL-PROCESS=1
  3408. REQUIRE_PACKAGES_HASH=1
  3409. REQUIRE_PACKAGES_LIBTAR=1
  3410. REQUIRE_PACKAGES_FPMKUNIT=1
  3411. REQUIRE_PACKAGES_LIBOGCFPC=1
  3412. endif
  3413. ifdef REQUIRE_PACKAGES_RTL
  3414. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  3415. ifneq ($(PACKAGEDIR_RTL),)
  3416. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  3417. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  3418. else
  3419. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  3420. endif
  3421. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)),)
  3422. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)
  3423. else
  3424. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)),)
  3425. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)
  3426. else
  3427. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)
  3428. endif
  3429. endif
  3430. ifdef CHECKDEPEND
  3431. $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
  3432. $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
  3433. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
  3434. endif
  3435. else
  3436. PACKAGEDIR_RTL=
  3437. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  3438. ifneq ($(UNITDIR_RTL),)
  3439. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  3440. else
  3441. UNITDIR_RTL=
  3442. endif
  3443. endif
  3444. ifdef UNITDIR_RTL
  3445. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  3446. endif
  3447. ifdef UNITDIR_FPMAKE_RTL
  3448. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL)
  3449. endif
  3450. endif
  3451. ifdef REQUIRE_PACKAGES_PASZLIB
  3452. PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR))))))
  3453. ifneq ($(PACKAGEDIR_PASZLIB),)
  3454. ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)),)
  3455. UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)
  3456. else
  3457. UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)
  3458. endif
  3459. ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(SOURCESUFFIX)),)
  3460. UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(SOURCESUFFIX)
  3461. else
  3462. ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units_bs/$(SOURCESUFFIX)),)
  3463. UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)/units_bs/$(SOURCESUFFIX)
  3464. else
  3465. UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)
  3466. endif
  3467. endif
  3468. ifdef CHECKDEPEND
  3469. $(PACKAGEDIR_PASZLIB)/$(FPCMADE):
  3470. $(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE)
  3471. override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE)
  3472. endif
  3473. else
  3474. PACKAGEDIR_PASZLIB=
  3475. UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR)))))
  3476. ifneq ($(UNITDIR_PASZLIB),)
  3477. UNITDIR_PASZLIB:=$(firstword $(UNITDIR_PASZLIB))
  3478. else
  3479. UNITDIR_PASZLIB=
  3480. endif
  3481. endif
  3482. ifdef UNITDIR_PASZLIB
  3483. override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
  3484. endif
  3485. ifdef UNITDIR_FPMAKE_PASZLIB
  3486. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_PASZLIB)
  3487. endif
  3488. endif
  3489. ifdef REQUIRE_PACKAGES_FCL-PROCESS
  3490. PACKAGEDIR_FCL-PROCESS:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-process/Makefile.fpc,$(PACKAGESDIR))))))
  3491. ifneq ($(PACKAGEDIR_FCL-PROCESS),)
  3492. ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units/$(TARGETSUFFIX)),)
  3493. UNITDIR_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units/$(TARGETSUFFIX)
  3494. else
  3495. UNITDIR_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)
  3496. endif
  3497. ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units/$(SOURCESUFFIX)),)
  3498. UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units/$(SOURCESUFFIX)
  3499. else
  3500. ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units_bs/$(SOURCESUFFIX)),)
  3501. UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units_bs/$(SOURCESUFFIX)
  3502. else
  3503. UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)
  3504. endif
  3505. endif
  3506. ifdef CHECKDEPEND
  3507. $(PACKAGEDIR_FCL-PROCESS)/$(FPCMADE):
  3508. $(MAKE) -C $(PACKAGEDIR_FCL-PROCESS) $(FPCMADE)
  3509. override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-PROCESS)/$(FPCMADE)
  3510. endif
  3511. else
  3512. PACKAGEDIR_FCL-PROCESS=
  3513. UNITDIR_FCL-PROCESS:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-process/Package.fpc,$(UNITSDIR)))))
  3514. ifneq ($(UNITDIR_FCL-PROCESS),)
  3515. UNITDIR_FCL-PROCESS:=$(firstword $(UNITDIR_FCL-PROCESS))
  3516. else
  3517. UNITDIR_FCL-PROCESS=
  3518. endif
  3519. endif
  3520. ifdef UNITDIR_FCL-PROCESS
  3521. override COMPILER_UNITDIR+=$(UNITDIR_FCL-PROCESS)
  3522. endif
  3523. ifdef UNITDIR_FPMAKE_FCL-PROCESS
  3524. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FCL-PROCESS)
  3525. endif
  3526. endif
  3527. ifdef REQUIRE_PACKAGES_HASH
  3528. PACKAGEDIR_HASH:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /hash/Makefile.fpc,$(PACKAGESDIR))))))
  3529. ifneq ($(PACKAGEDIR_HASH),)
  3530. ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)),)
  3531. UNITDIR_HASH=$(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)
  3532. else
  3533. UNITDIR_HASH=$(PACKAGEDIR_HASH)
  3534. endif
  3535. ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(SOURCESUFFIX)),)
  3536. UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)/units/$(SOURCESUFFIX)
  3537. else
  3538. ifneq ($(wildcard $(PACKAGEDIR_HASH)/units_bs/$(SOURCESUFFIX)),)
  3539. UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)/units_bs/$(SOURCESUFFIX)
  3540. else
  3541. UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)
  3542. endif
  3543. endif
  3544. ifdef CHECKDEPEND
  3545. $(PACKAGEDIR_HASH)/$(FPCMADE):
  3546. $(MAKE) -C $(PACKAGEDIR_HASH) $(FPCMADE)
  3547. override ALLDEPENDENCIES+=$(PACKAGEDIR_HASH)/$(FPCMADE)
  3548. endif
  3549. else
  3550. PACKAGEDIR_HASH=
  3551. UNITDIR_HASH:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /hash/Package.fpc,$(UNITSDIR)))))
  3552. ifneq ($(UNITDIR_HASH),)
  3553. UNITDIR_HASH:=$(firstword $(UNITDIR_HASH))
  3554. else
  3555. UNITDIR_HASH=
  3556. endif
  3557. endif
  3558. ifdef UNITDIR_HASH
  3559. override COMPILER_UNITDIR+=$(UNITDIR_HASH)
  3560. endif
  3561. ifdef UNITDIR_FPMAKE_HASH
  3562. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_HASH)
  3563. endif
  3564. endif
  3565. ifdef REQUIRE_PACKAGES_LIBTAR
  3566. PACKAGEDIR_LIBTAR:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libtar/Makefile.fpc,$(PACKAGESDIR))))))
  3567. ifneq ($(PACKAGEDIR_LIBTAR),)
  3568. ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units/$(TARGETSUFFIX)),)
  3569. UNITDIR_LIBTAR=$(PACKAGEDIR_LIBTAR)/units/$(TARGETSUFFIX)
  3570. else
  3571. UNITDIR_LIBTAR=$(PACKAGEDIR_LIBTAR)
  3572. endif
  3573. ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units/$(SOURCESUFFIX)),)
  3574. UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)/units/$(SOURCESUFFIX)
  3575. else
  3576. ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units_bs/$(SOURCESUFFIX)),)
  3577. UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)/units_bs/$(SOURCESUFFIX)
  3578. else
  3579. UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)
  3580. endif
  3581. endif
  3582. ifdef CHECKDEPEND
  3583. $(PACKAGEDIR_LIBTAR)/$(FPCMADE):
  3584. $(MAKE) -C $(PACKAGEDIR_LIBTAR) $(FPCMADE)
  3585. override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBTAR)/$(FPCMADE)
  3586. endif
  3587. else
  3588. PACKAGEDIR_LIBTAR=
  3589. UNITDIR_LIBTAR:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libtar/Package.fpc,$(UNITSDIR)))))
  3590. ifneq ($(UNITDIR_LIBTAR),)
  3591. UNITDIR_LIBTAR:=$(firstword $(UNITDIR_LIBTAR))
  3592. else
  3593. UNITDIR_LIBTAR=
  3594. endif
  3595. endif
  3596. ifdef UNITDIR_LIBTAR
  3597. override COMPILER_UNITDIR+=$(UNITDIR_LIBTAR)
  3598. endif
  3599. ifdef UNITDIR_FPMAKE_LIBTAR
  3600. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_LIBTAR)
  3601. endif
  3602. endif
  3603. ifdef REQUIRE_PACKAGES_FPMKUNIT
  3604. PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
  3605. ifneq ($(PACKAGEDIR_FPMKUNIT),)
  3606. ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)),)
  3607. UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)
  3608. else
  3609. UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
  3610. endif
  3611. ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)),)
  3612. UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)
  3613. else
  3614. ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)),)
  3615. UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)
  3616. else
  3617. UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
  3618. endif
  3619. endif
  3620. ifdef CHECKDEPEND
  3621. $(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
  3622. $(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
  3623. override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
  3624. endif
  3625. else
  3626. PACKAGEDIR_FPMKUNIT=
  3627. UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
  3628. ifneq ($(UNITDIR_FPMKUNIT),)
  3629. UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
  3630. else
  3631. UNITDIR_FPMKUNIT=
  3632. endif
  3633. endif
  3634. ifdef UNITDIR_FPMKUNIT
  3635. override COMPILER_UNITDIR+=$(UNITDIR_FPMKUNIT)
  3636. endif
  3637. ifdef UNITDIR_FPMAKE_FPMKUNIT
  3638. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FPMKUNIT)
  3639. endif
  3640. endif
  3641. ifdef REQUIRE_PACKAGES_LIBOGCFPC
  3642. PACKAGEDIR_LIBOGCFPC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libogcfpc/Makefile.fpc,$(PACKAGESDIR))))))
  3643. ifneq ($(PACKAGEDIR_LIBOGCFPC),)
  3644. ifneq ($(wildcard $(PACKAGEDIR_LIBOGCFPC)/units/$(TARGETSUFFIX)),)
  3645. UNITDIR_LIBOGCFPC=$(PACKAGEDIR_LIBOGCFPC)/units/$(TARGETSUFFIX)
  3646. else
  3647. UNITDIR_LIBOGCFPC=$(PACKAGEDIR_LIBOGCFPC)
  3648. endif
  3649. ifneq ($(wildcard $(PACKAGEDIR_LIBOGCFPC)/units/$(SOURCESUFFIX)),)
  3650. UNITDIR_FPMAKE_LIBOGCFPC=$(PACKAGEDIR_LIBOGCFPC)/units/$(SOURCESUFFIX)
  3651. else
  3652. ifneq ($(wildcard $(PACKAGEDIR_LIBOGCFPC)/units_bs/$(SOURCESUFFIX)),)
  3653. UNITDIR_FPMAKE_LIBOGCFPC=$(PACKAGEDIR_LIBOGCFPC)/units_bs/$(SOURCESUFFIX)
  3654. else
  3655. UNITDIR_FPMAKE_LIBOGCFPC=$(PACKAGEDIR_LIBOGCFPC)
  3656. endif
  3657. endif
  3658. ifdef CHECKDEPEND
  3659. $(PACKAGEDIR_LIBOGCFPC)/$(FPCMADE):
  3660. $(MAKE) -C $(PACKAGEDIR_LIBOGCFPC) $(FPCMADE)
  3661. override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBOGCFPC)/$(FPCMADE)
  3662. endif
  3663. else
  3664. PACKAGEDIR_LIBOGCFPC=
  3665. UNITDIR_LIBOGCFPC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libogcfpc/Package.fpc,$(UNITSDIR)))))
  3666. ifneq ($(UNITDIR_LIBOGCFPC),)
  3667. UNITDIR_LIBOGCFPC:=$(firstword $(UNITDIR_LIBOGCFPC))
  3668. else
  3669. UNITDIR_LIBOGCFPC=
  3670. endif
  3671. endif
  3672. ifdef UNITDIR_LIBOGCFPC
  3673. override COMPILER_UNITDIR+=$(UNITDIR_LIBOGCFPC)
  3674. endif
  3675. ifdef UNITDIR_FPMAKE_LIBOGCFPC
  3676. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_LIBOGCFPC)
  3677. endif
  3678. endif
  3679. ifndef NOCPUDEF
  3680. override FPCOPTDEF=$(ARCH)
  3681. endif
  3682. ifneq ($(OS_TARGET),$(OS_SOURCE))
  3683. override FPCOPT+=-T$(OS_TARGET)
  3684. endif
  3685. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  3686. override FPCOPT+=-P$(ARCH)
  3687. endif
  3688. ifeq ($(OS_SOURCE),openbsd)
  3689. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  3690. override FPCMAKEOPT+=-FD$(NEW_BINUTILS_PATH)
  3691. override FPMAKE_BUILD_OPT+=-FD$(NEW_BINUTILS_PATH)
  3692. endif
  3693. ifndef CROSSBOOTSTRAP
  3694. ifneq ($(BINUTILSPREFIX),)
  3695. override FPCOPT+=-XP$(BINUTILSPREFIX)
  3696. ifneq ($(RLINKPATH),)
  3697. override FPCOPT+=-Xr$(RLINKPATH)
  3698. endif
  3699. endif
  3700. endif
  3701. ifndef CROSSCOMPILE
  3702. ifneq ($(BINUTILSPREFIX),)
  3703. override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
  3704. override FPMAKE_BUILD_OPT+=-XP$(BINUTILSPREFIX)
  3705. endif
  3706. endif
  3707. ifdef UNITDIR
  3708. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  3709. endif
  3710. ifdef LIBDIR
  3711. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  3712. endif
  3713. ifdef OBJDIR
  3714. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  3715. endif
  3716. ifdef INCDIR
  3717. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  3718. endif
  3719. ifdef LINKSMART
  3720. override FPCOPT+=-XX
  3721. endif
  3722. ifdef CREATESMART
  3723. override FPCOPT+=-CX
  3724. endif
  3725. ifdef DEBUG
  3726. override FPCOPT+=-gl
  3727. override FPCOPTDEF+=DEBUG
  3728. endif
  3729. ifdef RELEASE
  3730. FPCCPUOPT:=-O2
  3731. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  3732. override FPCOPTDEF+=RELEASE
  3733. endif
  3734. ifdef STRIP
  3735. override FPCOPT+=-Xs
  3736. endif
  3737. ifdef OPTIMIZE
  3738. override FPCOPT+=-O2
  3739. endif
  3740. ifdef VERBOSE
  3741. override FPCOPT+=-vwni
  3742. endif
  3743. ifdef COMPILER_OPTIONS
  3744. override FPCOPT+=$(COMPILER_OPTIONS)
  3745. endif
  3746. ifdef COMPILER_UNITDIR
  3747. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  3748. endif
  3749. ifdef COMPILER_LIBRARYDIR
  3750. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  3751. endif
  3752. ifdef COMPILER_OBJECTDIR
  3753. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  3754. endif
  3755. ifdef COMPILER_INCLUDEDIR
  3756. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  3757. endif
  3758. ifdef CROSSBINDIR
  3759. override FPCOPT+=-FD$(CROSSBINDIR)
  3760. endif
  3761. ifdef COMPILER_TARGETDIR
  3762. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  3763. ifeq ($(COMPILER_TARGETDIR),.)
  3764. override TARGETDIRPREFIX=
  3765. else
  3766. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  3767. endif
  3768. endif
  3769. ifdef COMPILER_UNITTARGETDIR
  3770. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  3771. ifeq ($(COMPILER_UNITTARGETDIR),.)
  3772. override UNITTARGETDIRPREFIX=
  3773. else
  3774. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  3775. endif
  3776. else
  3777. ifdef COMPILER_TARGETDIR
  3778. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  3779. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  3780. endif
  3781. endif
  3782. ifdef SYSROOTPATH
  3783. override FPCOPT+=-XR$(SYSROOTPATH)
  3784. else
  3785. ifeq ($(OS_TARGET),$(OS_SOURCE))
  3786. ifeq ($(OS_TARGET),darwin)
  3787. ifeq ($(CPU_TARGET),aarch64)
  3788. ifneq ($(wildcard /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk),)
  3789. override FPCOPT+=-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
  3790. endif
  3791. endif
  3792. endif
  3793. endif
  3794. endif
  3795. ifdef CREATESHARED
  3796. override FPCOPT+=-Cg
  3797. endif
  3798. ifneq ($(filter $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
  3799. ifneq ($(filter $(CPU_TARGET),x86_64 mips mipsel mips64 mips64el riscv64 powerpc64),)
  3800. override FPCOPT+=-Cg
  3801. endif
  3802. endif
  3803. ifneq ($(filter $(CPU_TARGET),z80),)
  3804. override FPCOPT+=-CX -XX
  3805. endif
  3806. ifdef LINKSHARED
  3807. endif
  3808. ifdef GCCLIBDIR
  3809. override FPCOPT+=-Fl$(GCCLIBDIR)
  3810. ifdef FPCMAKEGCCLIBDIR
  3811. override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
  3812. else
  3813. override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
  3814. endif
  3815. endif
  3816. ifdef OTHERLIBDIR
  3817. override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
  3818. endif
  3819. ifdef OPT
  3820. override FPCOPT+=$(OPT)
  3821. endif
  3822. ifdef FPMAKEBUILDOPT
  3823. override FPMAKE_BUILD_OPT+=$(FPMAKEBUILDOPT)
  3824. endif
  3825. ifdef FPCOPTDEF
  3826. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  3827. endif
  3828. ifdef CFGFILE
  3829. override FPCOPT+=@$(CFGFILE)
  3830. endif
  3831. ifdef USEENV
  3832. override FPCEXTCMD:=$(FPCOPT)
  3833. override FPCOPT:=!FPCEXTCMD
  3834. export FPCEXTCMD
  3835. endif
  3836. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  3837. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  3838. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  3839. override ACROSSCOMPILE=1
  3840. endif
  3841. ifdef ACROSSCOMPILE
  3842. override FPCOPT+=$(CROSSOPT)
  3843. endif
  3844. override COMPILER:=$(strip $(FPC) $(FPCOPT))
  3845. ifneq (,$(filter -sh,$(COMPILER)))
  3846. UseEXECPPAS=1
  3847. endif
  3848. ifneq (,$(filter -s,$(COMPILER)))
  3849. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  3850. UseEXECPPAS=1
  3851. endif
  3852. endif
  3853. ifneq ($(UseEXECPPAS),1)
  3854. EXECPPAS=
  3855. else
  3856. ifdef RUNBATCH
  3857. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  3858. else
  3859. EXECPPAS:=@$(PPAS)
  3860. endif
  3861. endif
  3862. .PHONY: fpc_exes
  3863. ifndef CROSSINSTALL
  3864. ifneq ($(TARGET_PROGRAMS),)
  3865. override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
  3866. override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addsuffix $(LTOEXT),$(TARGET_PROGRAMS))$(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
  3867. override EXEDBGFILES:=$(addsuffix $(EXEDBGEXT),$(TARGET_PROGRAMS))
  3868. override ALLTARGET+=fpc_exes
  3869. override INSTALLEXEFILES+=$(EXEFILES)
  3870. override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
  3871. override CLEANEXEDBGFILES+=$(EXEDBGFILES)
  3872. ifeq ($(OS_TARGET),os2)
  3873. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  3874. endif
  3875. ifeq ($(OS_TARGET),emx)
  3876. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  3877. endif
  3878. endif
  3879. endif
  3880. fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
  3881. ifdef TARGET_RSTS
  3882. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  3883. override CLEANRSTFILES+=$(RSTFILES)
  3884. endif
  3885. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  3886. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  3887. @$(ECHOREDIR) Compiled > $(FPCMADE)
  3888. fpc_all: $(FPCMADE)
  3889. fpc_smart:
  3890. $(MAKE) all LINKSMART=1 CREATESMART=1
  3891. fpc_debug:
  3892. $(MAKE) all DEBUG=1
  3893. fpc_release:
  3894. $(MAKE) all RELEASE=1
  3895. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) $(LTOEXT) .pas .lpr .dpr .pp .rc .res
  3896. $(COMPILER_UNITTARGETDIR):
  3897. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  3898. $(COMPILER_TARGETDIR):
  3899. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  3900. %$(PPUEXT): %.pp
  3901. $(COMPILER) $<
  3902. $(EXECPPAS)
  3903. %$(PPUEXT): %.pas
  3904. $(COMPILER) $<
  3905. $(EXECPPAS)
  3906. %$(EXEEXT): %.pp
  3907. $(COMPILER) $<
  3908. $(EXECPPAS)
  3909. %$(EXEEXT): %.pas
  3910. $(COMPILER) $<
  3911. $(EXECPPAS)
  3912. %$(EXEEXT): %.lpr
  3913. $(COMPILER) $<
  3914. $(EXECPPAS)
  3915. %$(EXEEXT): %.dpr
  3916. $(COMPILER) $<
  3917. $(EXECPPAS)
  3918. %.res: %.rc
  3919. windres -i $< -o $@
  3920. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3921. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3922. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3923. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3924. vpath %.inc $(COMPILER_INCLUDEDIR)
  3925. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  3926. vpath %$(LTOEXT) $(COMPILER_UNITTARGETDIR)
  3927. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  3928. .PHONY: fpc_shared
  3929. override INSTALLTARGET+=fpc_shared_install
  3930. ifndef SHARED_LIBVERSION
  3931. SHARED_LIBVERSION=$(FPC_VERSION)
  3932. endif
  3933. ifndef SHARED_LIBNAME
  3934. SHARED_LIBNAME=$(PACKAGE_NAME)
  3935. endif
  3936. ifndef SHARED_FULLNAME
  3937. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  3938. endif
  3939. ifndef SHARED_LIBUNITS
  3940. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  3941. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  3942. endif
  3943. fpc_shared:
  3944. ifdef HASSHAREDLIB
  3945. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  3946. ifneq ($(SHARED_BUILD),n)
  3947. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR) -P$(BINUTILSPREFIX)
  3948. endif
  3949. else
  3950. @$(ECHO) Shared Libraries not supported
  3951. endif
  3952. fpc_shared_install:
  3953. ifneq ($(SHARED_BUILD),n)
  3954. ifneq ($(SHARED_LIBUNITS),)
  3955. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  3956. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  3957. endif
  3958. endif
  3959. endif
  3960. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  3961. ifdef INSTALL_UNITS
  3962. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  3963. endif
  3964. ifdef INSTALL_BUILDUNIT
  3965. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  3966. endif
  3967. ifdef INSTALLPPUFILES
  3968. ifneq ($(IMPORTLIBPREFIX)-$(STATICLIBEXT),$(STATICLIBPREFIX)-$(STATICLIBEXT))
  3969. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  3970. else
  3971. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  3972. endif
  3973. ifneq ($(UNITTARGETDIRPREFIX),)
  3974. override INSTALLPPUFILENAMES:=$(notdir $(INSTALLPPUFILES))
  3975. override INSTALLPPULINKFILENAMES:=$(notdir $(INSTALLPPULINKFILES))
  3976. override INSTALLPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILENAMES))
  3977. override INSTALLPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILENAMES)))
  3978. endif
  3979. override INSTALL_CREATEPACKAGEFPC=1
  3980. endif
  3981. ifdef INSTALLEXEFILES
  3982. ifneq ($(TARGETDIRPREFIX),)
  3983. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  3984. endif
  3985. endif
  3986. fpc_install: all $(INSTALLTARGET)
  3987. ifdef INSTALLEXEFILES
  3988. $(MKDIR) $(INSTALL_BINDIR)
  3989. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  3990. endif
  3991. ifdef INSTALL_CREATEPACKAGEFPC
  3992. ifdef FPCMAKE
  3993. ifdef PACKAGE_VERSION
  3994. ifneq ($(wildcard Makefile.fpc),)
  3995. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  3996. $(MKDIR) $(INSTALL_UNITDIR)
  3997. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  3998. endif
  3999. endif
  4000. endif
  4001. endif
  4002. ifdef INSTALLPPUFILES
  4003. $(MKDIR) $(INSTALL_UNITDIR)
  4004. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  4005. ifneq ($(INSTALLPPULINKFILES),)
  4006. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  4007. endif
  4008. ifneq ($(wildcard $(LIB_FULLNAME)),)
  4009. $(MKDIR) $(INSTALL_LIBDIR)
  4010. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  4011. ifdef inUnix
  4012. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  4013. endif
  4014. endif
  4015. endif
  4016. ifdef INSTALL_FILES
  4017. $(MKDIR) $(INSTALL_DATADIR)
  4018. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  4019. endif
  4020. fpc_sourceinstall: distclean
  4021. $(MKDIR) $(INSTALL_SOURCEDIR)
  4022. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  4023. fpc_exampleinstall: $(EXAMPLEINSTALLTARGET) $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  4024. ifdef HASEXAMPLES
  4025. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  4026. endif
  4027. ifdef EXAMPLESOURCEFILES
  4028. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  4029. endif
  4030. ifdef TARGET_EXAMPLEDIRS
  4031. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  4032. endif
  4033. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  4034. ifdef EXEFILES
  4035. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  4036. override CLEANEXEDBGFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEDBGFILES))
  4037. endif
  4038. ifdef CLEAN_PROGRAMS
  4039. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  4040. override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
  4041. endif
  4042. ifdef CLEAN_UNITS
  4043. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  4044. endif
  4045. ifdef CLEANPPUFILES
  4046. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  4047. ifdef DEBUGSYMEXT
  4048. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  4049. endif
  4050. override CLEANPPUFILENAMES:=$(CLEANPPUFILES)
  4051. override CLEANPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILENAMES))
  4052. override CLEANPPULINKFILENAMES:=$(CLEANPPULINKFILES)
  4053. override CLEANPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILENAMES)))
  4054. endif
  4055. fpc_clean: $(CLEANTARGET)
  4056. ifdef CLEANEXEFILES
  4057. -$(DEL) $(CLEANEXEFILES)
  4058. endif
  4059. ifdef CLEANEXEDBGFILES
  4060. -$(DELTREE) $(CLEANEXEDBGFILES)
  4061. endif
  4062. ifdef CLEANPPUFILES
  4063. -$(DEL) $(CLEANPPUFILES)
  4064. endif
  4065. ifneq ($(CLEANPPULINKFILES),)
  4066. -$(DEL) $(CLEANPPULINKFILES)
  4067. endif
  4068. ifdef CLEANRSTFILES
  4069. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  4070. endif
  4071. ifdef CLEAN_FILES
  4072. -$(DEL) $(CLEAN_FILES)
  4073. endif
  4074. ifdef LIB_NAME
  4075. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  4076. endif
  4077. -$(DEL) $(FPCMADE) *$(FULL_TARGET).fpm Package.fpc *$(ASMEXT)
  4078. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
  4079. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  4080. fpc_cleanall: $(CLEANTARGET)
  4081. ifdef CLEANEXEFILES
  4082. -$(DEL) $(CLEANEXEFILES)
  4083. endif
  4084. ifdef COMPILER_UNITTARGETDIR
  4085. ifdef CLEANPPUFILES
  4086. -$(DEL) $(CLEANPPUFILES)
  4087. endif
  4088. ifneq ($(CLEANPPULINKFILES),)
  4089. -$(DEL) $(CLEANPPULINKFILES)
  4090. endif
  4091. ifdef CLEANRSTFILES
  4092. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  4093. endif
  4094. endif
  4095. ifdef CLEAN_FILES
  4096. -$(DEL) $(CLEAN_FILES)
  4097. endif
  4098. -$(DELTREE) units
  4099. -$(DELTREE) bin
  4100. -$(DEL) *$(OEXT) *$(LTOEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  4101. ifneq ($(PPUEXT),.ppu)
  4102. -$(DEL) *.o *.ppu *.a
  4103. endif
  4104. -$(DELTREE) *$(SMARTEXT)
  4105. -$(DEL) fpcmade.* Package.fpc *.fpm
  4106. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
  4107. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  4108. ifdef AOUTEXT
  4109. -$(DEL) *$(AOUTEXT)
  4110. endif
  4111. ifdef DEBUGSYMEXT
  4112. -$(DEL) *$(DEBUGSYMEXT)
  4113. endif
  4114. ifdef LOCALFPMAKEBIN
  4115. -$(DEL) $(LOCALFPMAKEBIN)
  4116. -$(DEL) $(FPMAKEBINOBJ)
  4117. endif
  4118. fpc_distclean: cleanall
  4119. .PHONY: fpc_baseinfo
  4120. override INFORULES+=fpc_baseinfo
  4121. fpc_baseinfo:
  4122. @$(ECHO)
  4123. @$(ECHO) == Package info ==
  4124. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  4125. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  4126. @$(ECHO)
  4127. @$(ECHO) == Configuration info ==
  4128. @$(ECHO)
  4129. @$(ECHO) FPC.......... $(FPC)
  4130. @$(ECHO) FPC Version.. $(FPC_VERSION)
  4131. @$(ECHO) Source CPU... $(CPU_SOURCE)
  4132. @$(ECHO) Target CPU... $(CPU_TARGET)
  4133. @$(ECHO) Source OS.... $(OS_SOURCE)
  4134. @$(ECHO) Target OS.... $(OS_TARGET)
  4135. @$(ECHO) Full Source.. $(FULL_SOURCE)
  4136. @$(ECHO) Full Target.. $(FULL_TARGET)
  4137. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  4138. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  4139. @$(ECHO) FPC fpmake... $(FPCFPMAKE)
  4140. @$(ECHO)
  4141. @$(ECHO) == Directory info ==
  4142. @$(ECHO)
  4143. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  4144. @$(ECHO)
  4145. @$(ECHO) Basedir......... $(BASEDIR)
  4146. @$(ECHO) FPCDir.......... $(FPCDIR)
  4147. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  4148. @$(ECHO) UnitsDir........ $(UNITSDIR)
  4149. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  4150. @$(ECHO)
  4151. @$(ECHO) GCC library..... $(GCCLIBDIR)
  4152. @$(ECHO) Other library... $(OTHERLIBDIR)
  4153. @$(ECHO)
  4154. @$(ECHO) == Tools info ==
  4155. @$(ECHO)
  4156. @$(ECHO) As........ $(AS)
  4157. @$(ECHO) Ld........ $(LD)
  4158. @$(ECHO) Ar........ $(AR)
  4159. @$(ECHO) Rc........ $(RC)
  4160. @$(ECHO)
  4161. @$(ECHO) Mv........ $(MVPROG)
  4162. @$(ECHO) Cp........ $(CPPROG)
  4163. @$(ECHO) Rm........ $(RMPROG)
  4164. @$(ECHO) GInstall.. $(GINSTALL)
  4165. @$(ECHO) Echo...... $(ECHO)
  4166. @$(ECHO) Shell..... $(SHELL)
  4167. @$(ECHO) Date...... $(DATE)
  4168. @$(ECHO) FPCMake... $(FPCMAKE)
  4169. @$(ECHO) PPUMove... $(PPUMOVE)
  4170. @$(ECHO) Zip....... $(ZIPPROG)
  4171. @$(ECHO)
  4172. @$(ECHO) == Object info ==
  4173. @$(ECHO)
  4174. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  4175. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  4176. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  4177. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  4178. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  4179. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  4180. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  4181. @$(ECHO)
  4182. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  4183. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  4184. @$(ECHO)
  4185. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  4186. @$(ECHO) Install Files....... $(INSTALL_FILES)
  4187. @$(ECHO)
  4188. @$(ECHO) == Install info ==
  4189. @$(ECHO)
  4190. @$(ECHO) DateStr.............. $(DATESTR)
  4191. @$(ECHO) ZipName.............. $(ZIPNAME)
  4192. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  4193. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  4194. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  4195. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  4196. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  4197. @$(ECHO)
  4198. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  4199. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  4200. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  4201. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  4202. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  4203. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  4204. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  4205. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  4206. @$(ECHO)
  4207. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  4208. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  4209. @$(ECHO)
  4210. .PHONY: fpc_info
  4211. fpc_info: $(INFORULES)
  4212. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  4213. fpc_makefile_dirs
  4214. fpc_makefile:
  4215. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  4216. fpc_makefile_sub1:
  4217. ifdef TARGET_DIRS
  4218. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  4219. endif
  4220. ifdef TARGET_EXAMPLEDIRS
  4221. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  4222. endif
  4223. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  4224. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  4225. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  4226. ifndef BIN2S
  4227. BIN2S:=$(strip $(wildcard $(addsuffix /bin2s$(SRCEXEEXT),$(SEARCHPATH))))
  4228. ifeq ($(BIN2S),)
  4229. BIN2S= __missing_command_BIN2S
  4230. else
  4231. BIN2S:=$(firstword $(BIN2S))
  4232. endif
  4233. endif
  4234. export BIN2S
  4235. ifndef RMDIR
  4236. RMDIR:=$(strip $(wildcard $(addsuffix /rmdir$(SRCEXEEXT),$(SEARCHPATH))))
  4237. ifeq ($(RMDIR),)
  4238. RMDIR= __missing_command_RMDIR
  4239. else
  4240. RMDIR:=$(firstword $(RMDIR))
  4241. endif
  4242. endif
  4243. export RMDIR
  4244. ifndef GXTEXCONV
  4245. GXTEXCONV:=$(strip $(wildcard $(addsuffix /gxtexconv$(SRCEXEEXT),$(SEARCHPATH))))
  4246. ifeq ($(GXTEXCONV),)
  4247. GXTEXCONV= __missing_command_GXTEXCONV
  4248. else
  4249. GXTEXCONV:=$(firstword $(GXTEXCONV))
  4250. endif
  4251. endif
  4252. export GXTEXCONV
  4253. debug: fpc_debug
  4254. smart: fpc_smart
  4255. release: fpc_release
  4256. units: fpc_units
  4257. examples:
  4258. shared: fpc_shared
  4259. install: fpc_install
  4260. sourceinstall: fpc_sourceinstall
  4261. exampleinstall: fpc_exampleinstall
  4262. distinstall:
  4263. zipinstall:
  4264. zipsourceinstall:
  4265. zipexampleinstall:
  4266. zipdistinstall:
  4267. distclean: fpc_distclean
  4268. cleanall: fpc_cleanall
  4269. info: fpc_info
  4270. makefiles: fpc_makefiles
  4271. .PHONY: debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
  4272. ifneq ($(wildcard fpcmake.loc),)
  4273. include fpcmake.loc
  4274. endif
  4275. .NOTPARALLEL:
  4276. .PHONY: clean all
  4277. clean: dir_delete fpc_clean fpc_cleanall
  4278. all: dir_make $(TPL_FILES) fpc_all
  4279. dir_delete:
  4280. @$(DELTREE) $(CURDIR)/$(BUILD)
  4281. @$(DELTREE) $(CURDIR)/$(DATA)
  4282. @$(DELTREE) $(CURDIR)/$(INC)
  4283. dir_make:
  4284. ifneq ($(BUILD), $(CURDIR))
  4285. @$(MKDIR) $(BUILD)
  4286. endif
  4287. ifneq ($(INC), $(CURDIR))
  4288. @$(MKDIR) $(INC)
  4289. endif
  4290. ifneq ($(DATA), $(CURDIR))
  4291. @$(MKDIR) $(DATA)
  4292. endif
  4293. $(TPL_FILES):
  4294. @echo 'Creating tpl file...'
  4295. $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
  4296. @echo $(DATA)/$(TPL_FILES)
  4297. @$(bin2o)
  4298. define bin2o
  4299. @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
  4300. @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
  4301. @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
  4302. @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
  4303. @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
  4304. @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
  4305. endef