Makefile 104 KB

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