Makefile 102 KB

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