Makefile 108 KB

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