Makefile 93 KB

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