Makefile 102 KB

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