Makefile 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782
  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-macos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-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-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-darwin aarch64-android wasm-wasm sparc64-linux riscv32-linux riscv32-embedded riscv64-linux riscv64-embedded
  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=msdos
  104. override CPU_TARGET_DEFAULT=i8086
  105. override DEFAULT_FPCDIR=../..
  106. ifndef FPC
  107. ifdef PP
  108. FPC=$(PP)
  109. endif
  110. endif
  111. ifndef FPC
  112. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  113. ifneq ($(FPCPROG),)
  114. FPCPROG:=$(firstword $(FPCPROG))
  115. ifneq ($(CPU_TARGET),)
  116. FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
  117. else
  118. FPC:=$(shell $(FPCPROG) -PB)
  119. endif
  120. ifneq ($(findstring Error,$(FPC)),)
  121. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  122. else
  123. ifeq ($(strip $(wildcard $(FPC))),)
  124. FPC:=$(firstword $(FPCPROG))
  125. endif
  126. endif
  127. else
  128. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  129. endif
  130. endif
  131. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  132. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  133. FOUNDFPC:=$(strip $(wildcard $(FPC)))
  134. ifeq ($(FOUNDFPC),)
  135. FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
  136. ifeq ($(FOUNDFPC),)
  137. $(error Compiler $(FPC) not found)
  138. endif
  139. endif
  140. ifndef FPC_COMPILERINFO
  141. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  142. endif
  143. ifndef FPC_VERSION
  144. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  145. endif
  146. export FPC FPC_VERSION FPC_COMPILERINFO
  147. unexport CHECKDEPEND ALLDEPENDENCIES
  148. ifndef CPU_TARGET
  149. ifdef CPU_TARGET_DEFAULT
  150. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  151. endif
  152. endif
  153. ifndef OS_TARGET
  154. ifdef OS_TARGET_DEFAULT
  155. OS_TARGET=$(OS_TARGET_DEFAULT)
  156. endif
  157. endif
  158. ifndef CPU_SOURCE
  159. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  160. endif
  161. ifndef CPU_TARGET
  162. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  163. endif
  164. ifndef OS_SOURCE
  165. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  166. endif
  167. ifndef OS_TARGET
  168. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  169. endif
  170. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  171. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  172. ifeq ($(CPU_TARGET),armeb)
  173. ARCH=arm
  174. override FPCOPT+=-Cb
  175. else
  176. ifeq ($(CPU_TARGET),armel)
  177. ARCH=arm
  178. override FPCOPT+=-CaEABI
  179. else
  180. ARCH=$(CPU_TARGET)
  181. endif
  182. endif
  183. ifeq ($(FULL_TARGET),arm-embedded)
  184. ifeq ($(SUBARCH),)
  185. $(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
  186. endif
  187. override FPCOPT+=-Cp$(SUBARCH)
  188. endif
  189. ifeq ($(FULL_TARGET),avr-embedded)
  190. ifeq ($(SUBARCH),)
  191. $(error When compiling for avr-embedded, a sub-architecture (e.g. SUBARCH=avr25 or SUBARCH=avr35) must be defined)
  192. endif
  193. override FPCOPT+=-Cp$(SUBARCH)
  194. endif
  195. ifeq ($(FULL_TARGET),mipsel-embedded)
  196. ifeq ($(SUBARCH),)
  197. $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic32mx) must be defined)
  198. endif
  199. override FPCOPT+=-Cp$(SUBARCH)
  200. endif
  201. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  202. TARGETSUFFIX=$(OS_TARGET)
  203. SOURCESUFFIX=$(OS_SOURCE)
  204. else
  205. ifneq ($(findstring $(OS_TARGET),$(LIMIT83fs)),)
  206. TARGETSUFFIX=$(OS_TARGET)
  207. else
  208. TARGETSUFFIX=$(FULL_TARGET)
  209. endif
  210. SOURCESUFFIX=$(FULL_SOURCE)
  211. endif
  212. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  213. CROSSCOMPILE=1
  214. endif
  215. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  216. ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
  217. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  218. endif
  219. endif
  220. ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
  221. BSDhier=1
  222. endif
  223. ifeq ($(OS_TARGET),linux)
  224. linuxHier=1
  225. endif
  226. ifndef CROSSCOMPILE
  227. BUILDFULLNATIVE=1
  228. export BUILDFULLNATIVE
  229. endif
  230. ifdef BUILDFULLNATIVE
  231. BUILDNATIVE=1
  232. export BUILDNATIVE
  233. endif
  234. export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
  235. ifdef FPCDIR
  236. override FPCDIR:=$(subst \,/,$(FPCDIR))
  237. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  238. override FPCDIR=wrong
  239. endif
  240. else
  241. override FPCDIR=wrong
  242. endif
  243. ifdef DEFAULT_FPCDIR
  244. ifeq ($(FPCDIR),wrong)
  245. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  246. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  247. override FPCDIR=wrong
  248. endif
  249. endif
  250. endif
  251. ifeq ($(FPCDIR),wrong)
  252. ifdef inUnix
  253. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  254. ifeq ($(wildcard $(FPCDIR)/units),)
  255. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  256. endif
  257. else
  258. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  259. override FPCDIR:=$(FPCDIR)/..
  260. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  261. override FPCDIR:=$(FPCDIR)/..
  262. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  263. override FPCDIR:=$(BASEDIR)
  264. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  265. override FPCDIR=c:/pp
  266. endif
  267. endif
  268. endif
  269. endif
  270. endif
  271. ifndef CROSSBINDIR
  272. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  273. endif
  274. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  275. ifeq ($(OS_SOURCE),darwin)
  276. DARWIN2DARWIN=1
  277. endif
  278. endif
  279. ifndef BINUTILSPREFIX
  280. ifndef CROSSBINDIR
  281. ifdef CROSSCOMPILE
  282. ifneq ($(OS_TARGET),msdos)
  283. ifndef DARWIN2DARWIN
  284. ifneq ($(CPU_TARGET),jvm)
  285. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  286. ifeq ($(OS_TARGET),android)
  287. ifeq ($(CPU_TARGET),arm)
  288. BINUTILSPREFIX=arm-linux-androideabi-
  289. else
  290. ifeq ($(CPU_TARGET),i386)
  291. BINUTILSPREFIX=i686-linux-android-
  292. else
  293. BINUTILSPREFIX=$(CPU_TARGET)-linux-android-
  294. endif
  295. endif
  296. endif
  297. endif
  298. endif
  299. else
  300. BINUTILSPREFIX=$(OS_TARGET)-
  301. endif
  302. endif
  303. endif
  304. endif
  305. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  306. ifeq ($(UNITSDIR),)
  307. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  308. endif
  309. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
  310. ifndef FPCFPMAKE
  311. ifdef CROSSCOMPILE
  312. ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
  313. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  314. ifneq ($(FPCPROG),)
  315. FPCPROG:=$(firstword $(FPCPROG))
  316. FPCFPMAKE:=$(shell $(FPCPROG) -PB)
  317. ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
  318. FPCFPMAKE:=$(firstword $(FPCPROG))
  319. endif
  320. else
  321. override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  322. endif
  323. else
  324. FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
  325. FPMAKE_SKIP_CONFIG=-n
  326. export FPCFPMAKE
  327. export FPMAKE_SKIP_CONFIG
  328. endif
  329. else
  330. FPMAKE_SKIP_CONFIG=-n
  331. FPCFPMAKE=$(FPC)
  332. endif
  333. endif
  334. override PACKAGE_NAME=rtl
  335. PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  336. RTL=..
  337. INC=../inc
  338. COMMON=$(RTL)/common
  339. PROCINC=../$(CPU_TARGET)
  340. UNITPREFIX=rtl
  341. SYSTEMUNIT=system
  342. OBJPASDIR=$(RTL)/objpas
  343. ifdef EXCEPTIONS_IN_SYSTEM
  344. override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
  345. endif
  346. ifdef NO_EXCEPTIONS_IN_SYSTEM
  347. override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
  348. endif
  349. ifeq ($(FULL_TARGET),i386-linux)
  350. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  351. endif
  352. ifeq ($(FULL_TARGET),i386-go32v2)
  353. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  354. endif
  355. ifeq ($(FULL_TARGET),i386-win32)
  356. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  357. endif
  358. ifeq ($(FULL_TARGET),i386-os2)
  359. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  360. endif
  361. ifeq ($(FULL_TARGET),i386-freebsd)
  362. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  363. endif
  364. ifeq ($(FULL_TARGET),i386-beos)
  365. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  366. endif
  367. ifeq ($(FULL_TARGET),i386-haiku)
  368. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  369. endif
  370. ifeq ($(FULL_TARGET),i386-netbsd)
  371. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  372. endif
  373. ifeq ($(FULL_TARGET),i386-solaris)
  374. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  375. endif
  376. ifeq ($(FULL_TARGET),i386-netware)
  377. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  378. endif
  379. ifeq ($(FULL_TARGET),i386-openbsd)
  380. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  381. endif
  382. ifeq ($(FULL_TARGET),i386-wdosx)
  383. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  384. endif
  385. ifeq ($(FULL_TARGET),i386-darwin)
  386. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  387. endif
  388. ifeq ($(FULL_TARGET),i386-emx)
  389. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  390. endif
  391. ifeq ($(FULL_TARGET),i386-watcom)
  392. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  393. endif
  394. ifeq ($(FULL_TARGET),i386-netwlibc)
  395. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  396. endif
  397. ifeq ($(FULL_TARGET),i386-wince)
  398. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  399. endif
  400. ifeq ($(FULL_TARGET),i386-embedded)
  401. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  402. endif
  403. ifeq ($(FULL_TARGET),i386-symbian)
  404. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  405. endif
  406. ifeq ($(FULL_TARGET),i386-nativent)
  407. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  408. endif
  409. ifeq ($(FULL_TARGET),i386-iphonesim)
  410. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  411. endif
  412. ifeq ($(FULL_TARGET),i386-android)
  413. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  414. endif
  415. ifeq ($(FULL_TARGET),i386-aros)
  416. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  417. endif
  418. ifeq ($(FULL_TARGET),m68k-linux)
  419. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  420. endif
  421. ifeq ($(FULL_TARGET),m68k-netbsd)
  422. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  423. endif
  424. ifeq ($(FULL_TARGET),m68k-amiga)
  425. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  426. endif
  427. ifeq ($(FULL_TARGET),m68k-atari)
  428. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  429. endif
  430. ifeq ($(FULL_TARGET),m68k-palmos)
  431. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  432. endif
  433. ifeq ($(FULL_TARGET),m68k-macos)
  434. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  435. endif
  436. ifeq ($(FULL_TARGET),m68k-embedded)
  437. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  438. endif
  439. ifeq ($(FULL_TARGET),powerpc-linux)
  440. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  441. endif
  442. ifeq ($(FULL_TARGET),powerpc-netbsd)
  443. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  444. endif
  445. ifeq ($(FULL_TARGET),powerpc-amiga)
  446. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  447. endif
  448. ifeq ($(FULL_TARGET),powerpc-macos)
  449. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  450. endif
  451. ifeq ($(FULL_TARGET),powerpc-darwin)
  452. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  453. endif
  454. ifeq ($(FULL_TARGET),powerpc-morphos)
  455. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  456. endif
  457. ifeq ($(FULL_TARGET),powerpc-embedded)
  458. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  459. endif
  460. ifeq ($(FULL_TARGET),powerpc-wii)
  461. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  462. endif
  463. ifeq ($(FULL_TARGET),powerpc-aix)
  464. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  465. endif
  466. ifeq ($(FULL_TARGET),sparc-linux)
  467. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  468. endif
  469. ifeq ($(FULL_TARGET),sparc-netbsd)
  470. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  471. endif
  472. ifeq ($(FULL_TARGET),sparc-solaris)
  473. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  474. endif
  475. ifeq ($(FULL_TARGET),sparc-embedded)
  476. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  477. endif
  478. ifeq ($(FULL_TARGET),x86_64-linux)
  479. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  480. endif
  481. ifeq ($(FULL_TARGET),x86_64-freebsd)
  482. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  483. endif
  484. ifeq ($(FULL_TARGET),x86_64-haiku)
  485. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  486. endif
  487. ifeq ($(FULL_TARGET),x86_64-netbsd)
  488. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  489. endif
  490. ifeq ($(FULL_TARGET),x86_64-solaris)
  491. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  492. endif
  493. ifeq ($(FULL_TARGET),x86_64-openbsd)
  494. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  495. endif
  496. ifeq ($(FULL_TARGET),x86_64-darwin)
  497. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  498. endif
  499. ifeq ($(FULL_TARGET),x86_64-win64)
  500. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  501. endif
  502. ifeq ($(FULL_TARGET),x86_64-embedded)
  503. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  504. endif
  505. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  506. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  507. endif
  508. ifeq ($(FULL_TARGET),x86_64-android)
  509. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  510. endif
  511. ifeq ($(FULL_TARGET),x86_64-aros)
  512. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  513. endif
  514. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  515. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  516. endif
  517. ifeq ($(FULL_TARGET),arm-linux)
  518. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  519. endif
  520. ifeq ($(FULL_TARGET),arm-netbsd)
  521. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  522. endif
  523. ifeq ($(FULL_TARGET),arm-palmos)
  524. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  525. endif
  526. ifeq ($(FULL_TARGET),arm-darwin)
  527. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  528. endif
  529. ifeq ($(FULL_TARGET),arm-wince)
  530. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  531. endif
  532. ifeq ($(FULL_TARGET),arm-gba)
  533. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  534. endif
  535. ifeq ($(FULL_TARGET),arm-nds)
  536. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  537. endif
  538. ifeq ($(FULL_TARGET),arm-embedded)
  539. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  540. endif
  541. ifeq ($(FULL_TARGET),arm-symbian)
  542. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  543. endif
  544. ifeq ($(FULL_TARGET),arm-android)
  545. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  546. endif
  547. ifeq ($(FULL_TARGET),arm-aros)
  548. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  549. endif
  550. ifeq ($(FULL_TARGET),powerpc64-linux)
  551. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  552. endif
  553. ifeq ($(FULL_TARGET),powerpc64-darwin)
  554. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  555. endif
  556. ifeq ($(FULL_TARGET),powerpc64-embedded)
  557. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  558. endif
  559. ifeq ($(FULL_TARGET),powerpc64-aix)
  560. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  561. endif
  562. ifeq ($(FULL_TARGET),avr-embedded)
  563. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  564. endif
  565. ifeq ($(FULL_TARGET),armeb-linux)
  566. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  567. endif
  568. ifeq ($(FULL_TARGET),armeb-embedded)
  569. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  570. endif
  571. ifeq ($(FULL_TARGET),mips-linux)
  572. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  573. endif
  574. ifeq ($(FULL_TARGET),mipsel-linux)
  575. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  576. endif
  577. ifeq ($(FULL_TARGET),mipsel-embedded)
  578. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  579. endif
  580. ifeq ($(FULL_TARGET),mipsel-android)
  581. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  582. endif
  583. ifeq ($(FULL_TARGET),jvm-java)
  584. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  585. endif
  586. ifeq ($(FULL_TARGET),jvm-android)
  587. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  588. endif
  589. ifeq ($(FULL_TARGET),i8086-embedded)
  590. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  591. endif
  592. ifeq ($(FULL_TARGET),i8086-msdos)
  593. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  594. endif
  595. ifeq ($(FULL_TARGET),i8086-win16)
  596. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  597. endif
  598. ifeq ($(FULL_TARGET),aarch64-linux)
  599. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  600. endif
  601. ifeq ($(FULL_TARGET),aarch64-darwin)
  602. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  603. endif
  604. ifeq ($(FULL_TARGET),aarch64-android)
  605. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  606. endif
  607. ifeq ($(FULL_TARGET),wasm-wasm)
  608. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  609. endif
  610. ifeq ($(FULL_TARGET),sparc64-linux)
  611. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  612. endif
  613. ifeq ($(FULL_TARGET),riscv32-linux)
  614. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  615. endif
  616. ifeq ($(FULL_TARGET),riscv32-embedded)
  617. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  618. endif
  619. ifeq ($(FULL_TARGET),riscv64-linux)
  620. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  621. endif
  622. ifeq ($(FULL_TARGET),riscv64-embedded)
  623. override TARGET_UNITS+=system uuchar objpas strings iso7185 extpas dos wintypes winprocs win31 ports dynlibs sortbase sysconst rtlconst sysutils math types typinfo fgl classes
  624. endif
  625. ifeq ($(FULL_TARGET),i386-linux)
  626. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  627. endif
  628. ifeq ($(FULL_TARGET),i386-go32v2)
  629. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  630. endif
  631. ifeq ($(FULL_TARGET),i386-win32)
  632. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  633. endif
  634. ifeq ($(FULL_TARGET),i386-os2)
  635. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  636. endif
  637. ifeq ($(FULL_TARGET),i386-freebsd)
  638. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  639. endif
  640. ifeq ($(FULL_TARGET),i386-beos)
  641. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  642. endif
  643. ifeq ($(FULL_TARGET),i386-haiku)
  644. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  645. endif
  646. ifeq ($(FULL_TARGET),i386-netbsd)
  647. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  648. endif
  649. ifeq ($(FULL_TARGET),i386-solaris)
  650. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  651. endif
  652. ifeq ($(FULL_TARGET),i386-netware)
  653. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  654. endif
  655. ifeq ($(FULL_TARGET),i386-openbsd)
  656. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  657. endif
  658. ifeq ($(FULL_TARGET),i386-wdosx)
  659. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  660. endif
  661. ifeq ($(FULL_TARGET),i386-darwin)
  662. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  663. endif
  664. ifeq ($(FULL_TARGET),i386-emx)
  665. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  666. endif
  667. ifeq ($(FULL_TARGET),i386-watcom)
  668. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  669. endif
  670. ifeq ($(FULL_TARGET),i386-netwlibc)
  671. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  672. endif
  673. ifeq ($(FULL_TARGET),i386-wince)
  674. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  675. endif
  676. ifeq ($(FULL_TARGET),i386-embedded)
  677. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  678. endif
  679. ifeq ($(FULL_TARGET),i386-symbian)
  680. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  681. endif
  682. ifeq ($(FULL_TARGET),i386-nativent)
  683. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  684. endif
  685. ifeq ($(FULL_TARGET),i386-iphonesim)
  686. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  687. endif
  688. ifeq ($(FULL_TARGET),i386-android)
  689. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  690. endif
  691. ifeq ($(FULL_TARGET),i386-aros)
  692. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  693. endif
  694. ifeq ($(FULL_TARGET),m68k-linux)
  695. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  696. endif
  697. ifeq ($(FULL_TARGET),m68k-netbsd)
  698. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  699. endif
  700. ifeq ($(FULL_TARGET),m68k-amiga)
  701. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  702. endif
  703. ifeq ($(FULL_TARGET),m68k-atari)
  704. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  705. endif
  706. ifeq ($(FULL_TARGET),m68k-palmos)
  707. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  708. endif
  709. ifeq ($(FULL_TARGET),m68k-macos)
  710. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  711. endif
  712. ifeq ($(FULL_TARGET),m68k-embedded)
  713. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  714. endif
  715. ifeq ($(FULL_TARGET),powerpc-linux)
  716. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  717. endif
  718. ifeq ($(FULL_TARGET),powerpc-netbsd)
  719. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  720. endif
  721. ifeq ($(FULL_TARGET),powerpc-amiga)
  722. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  723. endif
  724. ifeq ($(FULL_TARGET),powerpc-macos)
  725. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  726. endif
  727. ifeq ($(FULL_TARGET),powerpc-darwin)
  728. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  729. endif
  730. ifeq ($(FULL_TARGET),powerpc-morphos)
  731. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  732. endif
  733. ifeq ($(FULL_TARGET),powerpc-embedded)
  734. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  735. endif
  736. ifeq ($(FULL_TARGET),powerpc-wii)
  737. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  738. endif
  739. ifeq ($(FULL_TARGET),powerpc-aix)
  740. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  741. endif
  742. ifeq ($(FULL_TARGET),sparc-linux)
  743. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  744. endif
  745. ifeq ($(FULL_TARGET),sparc-netbsd)
  746. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  747. endif
  748. ifeq ($(FULL_TARGET),sparc-solaris)
  749. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  750. endif
  751. ifeq ($(FULL_TARGET),sparc-embedded)
  752. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  753. endif
  754. ifeq ($(FULL_TARGET),x86_64-linux)
  755. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  756. endif
  757. ifeq ($(FULL_TARGET),x86_64-freebsd)
  758. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  759. endif
  760. ifeq ($(FULL_TARGET),x86_64-haiku)
  761. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  762. endif
  763. ifeq ($(FULL_TARGET),x86_64-netbsd)
  764. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  765. endif
  766. ifeq ($(FULL_TARGET),x86_64-solaris)
  767. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  768. endif
  769. ifeq ($(FULL_TARGET),x86_64-openbsd)
  770. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  771. endif
  772. ifeq ($(FULL_TARGET),x86_64-darwin)
  773. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  774. endif
  775. ifeq ($(FULL_TARGET),x86_64-win64)
  776. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  777. endif
  778. ifeq ($(FULL_TARGET),x86_64-embedded)
  779. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  780. endif
  781. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  782. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  783. endif
  784. ifeq ($(FULL_TARGET),x86_64-android)
  785. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  786. endif
  787. ifeq ($(FULL_TARGET),x86_64-aros)
  788. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  789. endif
  790. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  791. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  792. endif
  793. ifeq ($(FULL_TARGET),arm-linux)
  794. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  795. endif
  796. ifeq ($(FULL_TARGET),arm-netbsd)
  797. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  798. endif
  799. ifeq ($(FULL_TARGET),arm-palmos)
  800. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  801. endif
  802. ifeq ($(FULL_TARGET),arm-darwin)
  803. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  804. endif
  805. ifeq ($(FULL_TARGET),arm-wince)
  806. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  807. endif
  808. ifeq ($(FULL_TARGET),arm-gba)
  809. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  810. endif
  811. ifeq ($(FULL_TARGET),arm-nds)
  812. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  813. endif
  814. ifeq ($(FULL_TARGET),arm-embedded)
  815. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  816. endif
  817. ifeq ($(FULL_TARGET),arm-symbian)
  818. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  819. endif
  820. ifeq ($(FULL_TARGET),arm-android)
  821. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  822. endif
  823. ifeq ($(FULL_TARGET),arm-aros)
  824. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  825. endif
  826. ifeq ($(FULL_TARGET),powerpc64-linux)
  827. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  828. endif
  829. ifeq ($(FULL_TARGET),powerpc64-darwin)
  830. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  831. endif
  832. ifeq ($(FULL_TARGET),powerpc64-embedded)
  833. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  834. endif
  835. ifeq ($(FULL_TARGET),powerpc64-aix)
  836. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  837. endif
  838. ifeq ($(FULL_TARGET),avr-embedded)
  839. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  840. endif
  841. ifeq ($(FULL_TARGET),armeb-linux)
  842. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  843. endif
  844. ifeq ($(FULL_TARGET),armeb-embedded)
  845. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  846. endif
  847. ifeq ($(FULL_TARGET),mips-linux)
  848. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  849. endif
  850. ifeq ($(FULL_TARGET),mipsel-linux)
  851. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  852. endif
  853. ifeq ($(FULL_TARGET),mipsel-embedded)
  854. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  855. endif
  856. ifeq ($(FULL_TARGET),mipsel-android)
  857. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  858. endif
  859. ifeq ($(FULL_TARGET),jvm-java)
  860. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  861. endif
  862. ifeq ($(FULL_TARGET),jvm-android)
  863. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  864. endif
  865. ifeq ($(FULL_TARGET),i8086-embedded)
  866. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  867. endif
  868. ifeq ($(FULL_TARGET),i8086-msdos)
  869. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  870. endif
  871. ifeq ($(FULL_TARGET),i8086-win16)
  872. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  873. endif
  874. ifeq ($(FULL_TARGET),aarch64-linux)
  875. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  876. endif
  877. ifeq ($(FULL_TARGET),aarch64-darwin)
  878. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  879. endif
  880. ifeq ($(FULL_TARGET),aarch64-android)
  881. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  882. endif
  883. ifeq ($(FULL_TARGET),wasm-wasm)
  884. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  885. endif
  886. ifeq ($(FULL_TARGET),sparc64-linux)
  887. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  888. endif
  889. ifeq ($(FULL_TARGET),riscv32-linux)
  890. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  891. endif
  892. ifeq ($(FULL_TARGET),riscv32-embedded)
  893. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  894. endif
  895. ifeq ($(FULL_TARGET),riscv64-linux)
  896. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  897. endif
  898. ifeq ($(FULL_TARGET),riscv64-embedded)
  899. override TARGET_LOADERS+=prt0s prt0m prt0c prt0l prt0h
  900. endif
  901. override INSTALL_FPCPACKAGE=y
  902. ifeq ($(FULL_TARGET),i386-linux)
  903. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  904. endif
  905. ifeq ($(FULL_TARGET),i386-go32v2)
  906. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  907. endif
  908. ifeq ($(FULL_TARGET),i386-win32)
  909. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  910. endif
  911. ifeq ($(FULL_TARGET),i386-os2)
  912. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  913. endif
  914. ifeq ($(FULL_TARGET),i386-freebsd)
  915. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  916. endif
  917. ifeq ($(FULL_TARGET),i386-beos)
  918. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  919. endif
  920. ifeq ($(FULL_TARGET),i386-haiku)
  921. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  922. endif
  923. ifeq ($(FULL_TARGET),i386-netbsd)
  924. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  925. endif
  926. ifeq ($(FULL_TARGET),i386-solaris)
  927. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  928. endif
  929. ifeq ($(FULL_TARGET),i386-netware)
  930. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  931. endif
  932. ifeq ($(FULL_TARGET),i386-openbsd)
  933. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  934. endif
  935. ifeq ($(FULL_TARGET),i386-wdosx)
  936. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  937. endif
  938. ifeq ($(FULL_TARGET),i386-darwin)
  939. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  940. endif
  941. ifeq ($(FULL_TARGET),i386-emx)
  942. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  943. endif
  944. ifeq ($(FULL_TARGET),i386-watcom)
  945. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  946. endif
  947. ifeq ($(FULL_TARGET),i386-netwlibc)
  948. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  949. endif
  950. ifeq ($(FULL_TARGET),i386-wince)
  951. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  952. endif
  953. ifeq ($(FULL_TARGET),i386-embedded)
  954. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  955. endif
  956. ifeq ($(FULL_TARGET),i386-symbian)
  957. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  958. endif
  959. ifeq ($(FULL_TARGET),i386-nativent)
  960. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  961. endif
  962. ifeq ($(FULL_TARGET),i386-iphonesim)
  963. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  964. endif
  965. ifeq ($(FULL_TARGET),i386-android)
  966. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  967. endif
  968. ifeq ($(FULL_TARGET),i386-aros)
  969. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  970. endif
  971. ifeq ($(FULL_TARGET),m68k-linux)
  972. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  973. endif
  974. ifeq ($(FULL_TARGET),m68k-netbsd)
  975. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  976. endif
  977. ifeq ($(FULL_TARGET),m68k-amiga)
  978. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  979. endif
  980. ifeq ($(FULL_TARGET),m68k-atari)
  981. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  982. endif
  983. ifeq ($(FULL_TARGET),m68k-palmos)
  984. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  985. endif
  986. ifeq ($(FULL_TARGET),m68k-macos)
  987. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  988. endif
  989. ifeq ($(FULL_TARGET),m68k-embedded)
  990. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  991. endif
  992. ifeq ($(FULL_TARGET),powerpc-linux)
  993. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  994. endif
  995. ifeq ($(FULL_TARGET),powerpc-netbsd)
  996. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  997. endif
  998. ifeq ($(FULL_TARGET),powerpc-amiga)
  999. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1000. endif
  1001. ifeq ($(FULL_TARGET),powerpc-macos)
  1002. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1003. endif
  1004. ifeq ($(FULL_TARGET),powerpc-darwin)
  1005. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1006. endif
  1007. ifeq ($(FULL_TARGET),powerpc-morphos)
  1008. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1009. endif
  1010. ifeq ($(FULL_TARGET),powerpc-embedded)
  1011. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1012. endif
  1013. ifeq ($(FULL_TARGET),powerpc-wii)
  1014. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1015. endif
  1016. ifeq ($(FULL_TARGET),powerpc-aix)
  1017. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1018. endif
  1019. ifeq ($(FULL_TARGET),sparc-linux)
  1020. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1021. endif
  1022. ifeq ($(FULL_TARGET),sparc-netbsd)
  1023. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1024. endif
  1025. ifeq ($(FULL_TARGET),sparc-solaris)
  1026. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1027. endif
  1028. ifeq ($(FULL_TARGET),sparc-embedded)
  1029. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1030. endif
  1031. ifeq ($(FULL_TARGET),x86_64-linux)
  1032. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1033. endif
  1034. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1035. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1036. endif
  1037. ifeq ($(FULL_TARGET),x86_64-haiku)
  1038. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1039. endif
  1040. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1041. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1042. endif
  1043. ifeq ($(FULL_TARGET),x86_64-solaris)
  1044. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1045. endif
  1046. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1047. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1048. endif
  1049. ifeq ($(FULL_TARGET),x86_64-darwin)
  1050. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1051. endif
  1052. ifeq ($(FULL_TARGET),x86_64-win64)
  1053. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1054. endif
  1055. ifeq ($(FULL_TARGET),x86_64-embedded)
  1056. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1057. endif
  1058. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1059. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1060. endif
  1061. ifeq ($(FULL_TARGET),x86_64-android)
  1062. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1063. endif
  1064. ifeq ($(FULL_TARGET),x86_64-aros)
  1065. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1066. endif
  1067. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1068. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1069. endif
  1070. ifeq ($(FULL_TARGET),arm-linux)
  1071. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1072. endif
  1073. ifeq ($(FULL_TARGET),arm-netbsd)
  1074. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1075. endif
  1076. ifeq ($(FULL_TARGET),arm-palmos)
  1077. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1078. endif
  1079. ifeq ($(FULL_TARGET),arm-darwin)
  1080. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1081. endif
  1082. ifeq ($(FULL_TARGET),arm-wince)
  1083. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1084. endif
  1085. ifeq ($(FULL_TARGET),arm-gba)
  1086. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1087. endif
  1088. ifeq ($(FULL_TARGET),arm-nds)
  1089. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1090. endif
  1091. ifeq ($(FULL_TARGET),arm-embedded)
  1092. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1093. endif
  1094. ifeq ($(FULL_TARGET),arm-symbian)
  1095. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1096. endif
  1097. ifeq ($(FULL_TARGET),arm-android)
  1098. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1099. endif
  1100. ifeq ($(FULL_TARGET),arm-aros)
  1101. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1102. endif
  1103. ifeq ($(FULL_TARGET),powerpc64-linux)
  1104. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1105. endif
  1106. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1107. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1108. endif
  1109. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1110. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1111. endif
  1112. ifeq ($(FULL_TARGET),powerpc64-aix)
  1113. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1114. endif
  1115. ifeq ($(FULL_TARGET),avr-embedded)
  1116. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1117. endif
  1118. ifeq ($(FULL_TARGET),armeb-linux)
  1119. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1120. endif
  1121. ifeq ($(FULL_TARGET),armeb-embedded)
  1122. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1123. endif
  1124. ifeq ($(FULL_TARGET),mips-linux)
  1125. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1126. endif
  1127. ifeq ($(FULL_TARGET),mipsel-linux)
  1128. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1129. endif
  1130. ifeq ($(FULL_TARGET),mipsel-embedded)
  1131. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1132. endif
  1133. ifeq ($(FULL_TARGET),mipsel-android)
  1134. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1135. endif
  1136. ifeq ($(FULL_TARGET),jvm-java)
  1137. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1138. endif
  1139. ifeq ($(FULL_TARGET),jvm-android)
  1140. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1141. endif
  1142. ifeq ($(FULL_TARGET),i8086-embedded)
  1143. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1144. endif
  1145. ifeq ($(FULL_TARGET),i8086-msdos)
  1146. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1147. endif
  1148. ifeq ($(FULL_TARGET),i8086-win16)
  1149. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1150. endif
  1151. ifeq ($(FULL_TARGET),aarch64-linux)
  1152. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1153. endif
  1154. ifeq ($(FULL_TARGET),aarch64-darwin)
  1155. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1156. endif
  1157. ifeq ($(FULL_TARGET),aarch64-android)
  1158. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1159. endif
  1160. ifeq ($(FULL_TARGET),wasm-wasm)
  1161. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1162. endif
  1163. ifeq ($(FULL_TARGET),sparc64-linux)
  1164. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1165. endif
  1166. ifeq ($(FULL_TARGET),riscv32-linux)
  1167. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1168. endif
  1169. ifeq ($(FULL_TARGET),riscv32-embedded)
  1170. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1171. endif
  1172. ifeq ($(FULL_TARGET),riscv64-linux)
  1173. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1174. endif
  1175. ifeq ($(FULL_TARGET),riscv64-embedded)
  1176. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  1177. endif
  1178. ifeq ($(FULL_TARGET),i386-linux)
  1179. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1180. endif
  1181. ifeq ($(FULL_TARGET),i386-go32v2)
  1182. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1183. endif
  1184. ifeq ($(FULL_TARGET),i386-win32)
  1185. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1186. endif
  1187. ifeq ($(FULL_TARGET),i386-os2)
  1188. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1189. endif
  1190. ifeq ($(FULL_TARGET),i386-freebsd)
  1191. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1192. endif
  1193. ifeq ($(FULL_TARGET),i386-beos)
  1194. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1195. endif
  1196. ifeq ($(FULL_TARGET),i386-haiku)
  1197. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1198. endif
  1199. ifeq ($(FULL_TARGET),i386-netbsd)
  1200. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1201. endif
  1202. ifeq ($(FULL_TARGET),i386-solaris)
  1203. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1204. endif
  1205. ifeq ($(FULL_TARGET),i386-netware)
  1206. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1207. endif
  1208. ifeq ($(FULL_TARGET),i386-openbsd)
  1209. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1210. endif
  1211. ifeq ($(FULL_TARGET),i386-wdosx)
  1212. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1213. endif
  1214. ifeq ($(FULL_TARGET),i386-darwin)
  1215. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1216. endif
  1217. ifeq ($(FULL_TARGET),i386-emx)
  1218. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1219. endif
  1220. ifeq ($(FULL_TARGET),i386-watcom)
  1221. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1222. endif
  1223. ifeq ($(FULL_TARGET),i386-netwlibc)
  1224. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1225. endif
  1226. ifeq ($(FULL_TARGET),i386-wince)
  1227. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1228. endif
  1229. ifeq ($(FULL_TARGET),i386-embedded)
  1230. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1231. endif
  1232. ifeq ($(FULL_TARGET),i386-symbian)
  1233. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1234. endif
  1235. ifeq ($(FULL_TARGET),i386-nativent)
  1236. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1237. endif
  1238. ifeq ($(FULL_TARGET),i386-iphonesim)
  1239. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1240. endif
  1241. ifeq ($(FULL_TARGET),i386-android)
  1242. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1243. endif
  1244. ifeq ($(FULL_TARGET),i386-aros)
  1245. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1246. endif
  1247. ifeq ($(FULL_TARGET),m68k-linux)
  1248. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1249. endif
  1250. ifeq ($(FULL_TARGET),m68k-netbsd)
  1251. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1252. endif
  1253. ifeq ($(FULL_TARGET),m68k-amiga)
  1254. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1255. endif
  1256. ifeq ($(FULL_TARGET),m68k-atari)
  1257. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1258. endif
  1259. ifeq ($(FULL_TARGET),m68k-palmos)
  1260. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1261. endif
  1262. ifeq ($(FULL_TARGET),m68k-macos)
  1263. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1264. endif
  1265. ifeq ($(FULL_TARGET),m68k-embedded)
  1266. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1267. endif
  1268. ifeq ($(FULL_TARGET),powerpc-linux)
  1269. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1270. endif
  1271. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1272. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1273. endif
  1274. ifeq ($(FULL_TARGET),powerpc-amiga)
  1275. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1276. endif
  1277. ifeq ($(FULL_TARGET),powerpc-macos)
  1278. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1279. endif
  1280. ifeq ($(FULL_TARGET),powerpc-darwin)
  1281. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1282. endif
  1283. ifeq ($(FULL_TARGET),powerpc-morphos)
  1284. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1285. endif
  1286. ifeq ($(FULL_TARGET),powerpc-embedded)
  1287. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1288. endif
  1289. ifeq ($(FULL_TARGET),powerpc-wii)
  1290. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1291. endif
  1292. ifeq ($(FULL_TARGET),powerpc-aix)
  1293. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1294. endif
  1295. ifeq ($(FULL_TARGET),sparc-linux)
  1296. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1297. endif
  1298. ifeq ($(FULL_TARGET),sparc-netbsd)
  1299. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1300. endif
  1301. ifeq ($(FULL_TARGET),sparc-solaris)
  1302. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1303. endif
  1304. ifeq ($(FULL_TARGET),sparc-embedded)
  1305. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1306. endif
  1307. ifeq ($(FULL_TARGET),x86_64-linux)
  1308. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1309. endif
  1310. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1311. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1312. endif
  1313. ifeq ($(FULL_TARGET),x86_64-haiku)
  1314. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1315. endif
  1316. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1317. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1318. endif
  1319. ifeq ($(FULL_TARGET),x86_64-solaris)
  1320. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1321. endif
  1322. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1323. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1324. endif
  1325. ifeq ($(FULL_TARGET),x86_64-darwin)
  1326. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1327. endif
  1328. ifeq ($(FULL_TARGET),x86_64-win64)
  1329. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1330. endif
  1331. ifeq ($(FULL_TARGET),x86_64-embedded)
  1332. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1333. endif
  1334. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1335. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1336. endif
  1337. ifeq ($(FULL_TARGET),x86_64-android)
  1338. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1339. endif
  1340. ifeq ($(FULL_TARGET),x86_64-aros)
  1341. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1342. endif
  1343. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1344. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1345. endif
  1346. ifeq ($(FULL_TARGET),arm-linux)
  1347. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1348. endif
  1349. ifeq ($(FULL_TARGET),arm-netbsd)
  1350. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1351. endif
  1352. ifeq ($(FULL_TARGET),arm-palmos)
  1353. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1354. endif
  1355. ifeq ($(FULL_TARGET),arm-darwin)
  1356. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1357. endif
  1358. ifeq ($(FULL_TARGET),arm-wince)
  1359. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1360. endif
  1361. ifeq ($(FULL_TARGET),arm-gba)
  1362. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1363. endif
  1364. ifeq ($(FULL_TARGET),arm-nds)
  1365. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1366. endif
  1367. ifeq ($(FULL_TARGET),arm-embedded)
  1368. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1369. endif
  1370. ifeq ($(FULL_TARGET),arm-symbian)
  1371. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1372. endif
  1373. ifeq ($(FULL_TARGET),arm-android)
  1374. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1375. endif
  1376. ifeq ($(FULL_TARGET),arm-aros)
  1377. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1378. endif
  1379. ifeq ($(FULL_TARGET),powerpc64-linux)
  1380. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1381. endif
  1382. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1383. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1384. endif
  1385. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1386. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1387. endif
  1388. ifeq ($(FULL_TARGET),powerpc64-aix)
  1389. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1390. endif
  1391. ifeq ($(FULL_TARGET),avr-embedded)
  1392. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1393. endif
  1394. ifeq ($(FULL_TARGET),armeb-linux)
  1395. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1396. endif
  1397. ifeq ($(FULL_TARGET),armeb-embedded)
  1398. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1399. endif
  1400. ifeq ($(FULL_TARGET),mips-linux)
  1401. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1402. endif
  1403. ifeq ($(FULL_TARGET),mipsel-linux)
  1404. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1405. endif
  1406. ifeq ($(FULL_TARGET),mipsel-embedded)
  1407. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1408. endif
  1409. ifeq ($(FULL_TARGET),mipsel-android)
  1410. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1411. endif
  1412. ifeq ($(FULL_TARGET),jvm-java)
  1413. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1414. endif
  1415. ifeq ($(FULL_TARGET),jvm-android)
  1416. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1417. endif
  1418. ifeq ($(FULL_TARGET),i8086-embedded)
  1419. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1420. endif
  1421. ifeq ($(FULL_TARGET),i8086-msdos)
  1422. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1423. endif
  1424. ifeq ($(FULL_TARGET),i8086-win16)
  1425. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1426. endif
  1427. ifeq ($(FULL_TARGET),aarch64-linux)
  1428. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1429. endif
  1430. ifeq ($(FULL_TARGET),aarch64-darwin)
  1431. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1432. endif
  1433. ifeq ($(FULL_TARGET),aarch64-android)
  1434. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1435. endif
  1436. ifeq ($(FULL_TARGET),wasm-wasm)
  1437. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1438. endif
  1439. ifeq ($(FULL_TARGET),sparc64-linux)
  1440. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1441. endif
  1442. ifeq ($(FULL_TARGET),riscv32-linux)
  1443. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1444. endif
  1445. ifeq ($(FULL_TARGET),riscv32-embedded)
  1446. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1447. endif
  1448. ifeq ($(FULL_TARGET),riscv64-linux)
  1449. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1450. endif
  1451. ifeq ($(FULL_TARGET),riscv64-embedded)
  1452. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  1453. endif
  1454. ifdef REQUIRE_UNITSDIR
  1455. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  1456. endif
  1457. ifdef REQUIRE_PACKAGESDIR
  1458. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  1459. endif
  1460. ifdef ZIPINSTALL
  1461. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  1462. UNIXHier=1
  1463. endif
  1464. else
  1465. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  1466. UNIXHier=1
  1467. endif
  1468. endif
  1469. ifndef INSTALL_PREFIX
  1470. ifdef PREFIX
  1471. INSTALL_PREFIX=$(PREFIX)
  1472. endif
  1473. endif
  1474. ifndef INSTALL_PREFIX
  1475. ifdef UNIXHier
  1476. INSTALL_PREFIX=/usr/local
  1477. else
  1478. ifdef INSTALL_FPCPACKAGE
  1479. INSTALL_BASEDIR:=/pp
  1480. else
  1481. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  1482. endif
  1483. endif
  1484. endif
  1485. export INSTALL_PREFIX
  1486. ifdef INSTALL_FPCSUBDIR
  1487. export INSTALL_FPCSUBDIR
  1488. endif
  1489. ifndef DIST_DESTDIR
  1490. DIST_DESTDIR:=$(BASEDIR)
  1491. endif
  1492. export DIST_DESTDIR
  1493. ifndef COMPILER_UNITTARGETDIR
  1494. ifdef PACKAGEDIR_MAIN
  1495. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  1496. else
  1497. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  1498. endif
  1499. endif
  1500. ifndef COMPILER_TARGETDIR
  1501. COMPILER_TARGETDIR=.
  1502. endif
  1503. ifndef INSTALL_BASEDIR
  1504. ifdef UNIXHier
  1505. ifdef INSTALL_FPCPACKAGE
  1506. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  1507. else
  1508. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  1509. endif
  1510. else
  1511. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  1512. endif
  1513. endif
  1514. ifndef INSTALL_BINDIR
  1515. ifdef UNIXHier
  1516. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  1517. else
  1518. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  1519. ifdef INSTALL_FPCPACKAGE
  1520. ifdef CROSSCOMPILE
  1521. ifdef CROSSINSTALL
  1522. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  1523. else
  1524. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  1525. endif
  1526. else
  1527. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  1528. endif
  1529. endif
  1530. endif
  1531. endif
  1532. ifndef INSTALL_UNITDIR
  1533. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  1534. ifdef INSTALL_FPCPACKAGE
  1535. ifdef PACKAGE_NAME
  1536. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  1537. endif
  1538. endif
  1539. endif
  1540. ifndef INSTALL_LIBDIR
  1541. ifdef UNIXHier
  1542. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  1543. else
  1544. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  1545. endif
  1546. endif
  1547. ifndef INSTALL_SOURCEDIR
  1548. ifdef UNIXHier
  1549. ifdef BSDhier
  1550. SRCPREFIXDIR=share/src
  1551. else
  1552. ifdef linuxHier
  1553. SRCPREFIXDIR=share/src
  1554. else
  1555. SRCPREFIXDIR=src
  1556. endif
  1557. endif
  1558. ifdef INSTALL_FPCPACKAGE
  1559. ifdef INSTALL_FPCSUBDIR
  1560. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  1561. else
  1562. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1563. endif
  1564. else
  1565. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1566. endif
  1567. else
  1568. ifdef INSTALL_FPCPACKAGE
  1569. ifdef INSTALL_FPCSUBDIR
  1570. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  1571. else
  1572. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  1573. endif
  1574. else
  1575. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  1576. endif
  1577. endif
  1578. endif
  1579. ifndef INSTALL_DOCDIR
  1580. ifdef UNIXHier
  1581. ifdef BSDhier
  1582. DOCPREFIXDIR=share/doc
  1583. else
  1584. ifdef linuxHier
  1585. DOCPREFIXDIR=share/doc
  1586. else
  1587. DOCPREFIXDIR=doc
  1588. endif
  1589. endif
  1590. ifdef INSTALL_FPCPACKAGE
  1591. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1592. else
  1593. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1594. endif
  1595. else
  1596. ifdef INSTALL_FPCPACKAGE
  1597. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  1598. else
  1599. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  1600. endif
  1601. endif
  1602. endif
  1603. ifndef INSTALL_EXAMPLEDIR
  1604. ifdef UNIXHier
  1605. ifdef INSTALL_FPCPACKAGE
  1606. ifdef BSDhier
  1607. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1608. else
  1609. ifdef linuxHier
  1610. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  1611. else
  1612. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  1613. endif
  1614. endif
  1615. else
  1616. ifdef BSDhier
  1617. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1618. else
  1619. ifdef linuxHier
  1620. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1621. else
  1622. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1623. endif
  1624. endif
  1625. endif
  1626. else
  1627. ifdef INSTALL_FPCPACKAGE
  1628. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  1629. else
  1630. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  1631. endif
  1632. endif
  1633. endif
  1634. ifndef INSTALL_DATADIR
  1635. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  1636. endif
  1637. ifndef INSTALL_SHAREDDIR
  1638. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  1639. endif
  1640. ifdef CROSSCOMPILE
  1641. ifndef CROSSBINDIR
  1642. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  1643. ifeq ($(CROSSBINDIR),)
  1644. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  1645. endif
  1646. endif
  1647. else
  1648. CROSSBINDIR=
  1649. endif
  1650. BATCHEXT=.bat
  1651. LOADEREXT=.as
  1652. EXEEXT=.exe
  1653. PPLEXT=.ppl
  1654. PPUEXT=.ppu
  1655. OEXT=.o
  1656. LTOEXT=.bc
  1657. ASMEXT=.s
  1658. SMARTEXT=.sl
  1659. STATICLIBEXT=.a
  1660. SHAREDLIBEXT=.so
  1661. SHAREDLIBPREFIX=libfp
  1662. STATICLIBPREFIX=libp
  1663. IMPORTLIBPREFIX=libimp
  1664. RSTEXT=.rst
  1665. EXEDBGEXT=.dbg
  1666. ifeq ($(OS_TARGET),go32v1)
  1667. STATICLIBPREFIX=
  1668. SHORTSUFFIX=v1
  1669. endif
  1670. ifeq ($(OS_TARGET),go32v2)
  1671. STATICLIBPREFIX=
  1672. SHORTSUFFIX=dos
  1673. IMPORTLIBPREFIX=
  1674. endif
  1675. ifeq ($(OS_TARGET),watcom)
  1676. STATICLIBPREFIX=
  1677. OEXT=.obj
  1678. ASMEXT=.asm
  1679. SHAREDLIBEXT=.dll
  1680. SHORTSUFFIX=wat
  1681. IMPORTLIBPREFIX=
  1682. endif
  1683. ifneq ($(CPU_TARGET),jvm)
  1684. ifeq ($(OS_TARGET),android)
  1685. BATCHEXT=.sh
  1686. EXEEXT=
  1687. HASSHAREDLIB=1
  1688. SHORTSUFFIX=lnx
  1689. endif
  1690. endif
  1691. ifeq ($(OS_TARGET),linux)
  1692. BATCHEXT=.sh
  1693. EXEEXT=
  1694. HASSHAREDLIB=1
  1695. SHORTSUFFIX=lnx
  1696. endif
  1697. ifeq ($(OS_TARGET),dragonfly)
  1698. BATCHEXT=.sh
  1699. EXEEXT=
  1700. HASSHAREDLIB=1
  1701. SHORTSUFFIX=df
  1702. endif
  1703. ifeq ($(OS_TARGET),freebsd)
  1704. BATCHEXT=.sh
  1705. EXEEXT=
  1706. HASSHAREDLIB=1
  1707. SHORTSUFFIX=fbs
  1708. endif
  1709. ifeq ($(OS_TARGET),netbsd)
  1710. BATCHEXT=.sh
  1711. EXEEXT=
  1712. HASSHAREDLIB=1
  1713. SHORTSUFFIX=nbs
  1714. endif
  1715. ifeq ($(OS_TARGET),openbsd)
  1716. BATCHEXT=.sh
  1717. EXEEXT=
  1718. HASSHAREDLIB=1
  1719. SHORTSUFFIX=obs
  1720. endif
  1721. ifeq ($(OS_TARGET),win32)
  1722. SHAREDLIBEXT=.dll
  1723. SHORTSUFFIX=w32
  1724. endif
  1725. ifeq ($(OS_TARGET),os2)
  1726. BATCHEXT=.cmd
  1727. AOUTEXT=.out
  1728. STATICLIBPREFIX=
  1729. SHAREDLIBEXT=.dll
  1730. SHORTSUFFIX=os2
  1731. ECHO=echo
  1732. IMPORTLIBPREFIX=
  1733. endif
  1734. ifeq ($(OS_TARGET),emx)
  1735. BATCHEXT=.cmd
  1736. AOUTEXT=.out
  1737. STATICLIBPREFIX=
  1738. SHAREDLIBEXT=.dll
  1739. SHORTSUFFIX=emx
  1740. ECHO=echo
  1741. IMPORTLIBPREFIX=
  1742. endif
  1743. ifeq ($(OS_TARGET),amiga)
  1744. EXEEXT=
  1745. SHAREDLIBEXT=.library
  1746. SHORTSUFFIX=amg
  1747. endif
  1748. ifeq ($(OS_TARGET),aros)
  1749. EXEEXT=
  1750. SHAREDLIBEXT=.library
  1751. SHORTSUFFIX=aros
  1752. endif
  1753. ifeq ($(OS_TARGET),morphos)
  1754. EXEEXT=
  1755. SHAREDLIBEXT=.library
  1756. SHORTSUFFIX=mos
  1757. endif
  1758. ifeq ($(OS_TARGET),atari)
  1759. EXEEXT=.ttp
  1760. SHORTSUFFIX=ata
  1761. endif
  1762. ifeq ($(OS_TARGET),beos)
  1763. BATCHEXT=.sh
  1764. EXEEXT=
  1765. SHORTSUFFIX=be
  1766. endif
  1767. ifeq ($(OS_TARGET),haiku)
  1768. BATCHEXT=.sh
  1769. EXEEXT=
  1770. SHORTSUFFIX=hai
  1771. endif
  1772. ifeq ($(OS_TARGET),solaris)
  1773. BATCHEXT=.sh
  1774. EXEEXT=
  1775. SHORTSUFFIX=sun
  1776. endif
  1777. ifeq ($(OS_TARGET),qnx)
  1778. BATCHEXT=.sh
  1779. EXEEXT=
  1780. SHORTSUFFIX=qnx
  1781. endif
  1782. ifeq ($(OS_TARGET),netware)
  1783. EXEEXT=.nlm
  1784. STATICLIBPREFIX=
  1785. SHORTSUFFIX=nw
  1786. IMPORTLIBPREFIX=imp
  1787. endif
  1788. ifeq ($(OS_TARGET),netwlibc)
  1789. EXEEXT=.nlm
  1790. STATICLIBPREFIX=
  1791. SHORTSUFFIX=nwl
  1792. IMPORTLIBPREFIX=imp
  1793. endif
  1794. ifeq ($(OS_TARGET),macos)
  1795. BATCHEXT=
  1796. EXEEXT=
  1797. DEBUGSYMEXT=.xcoff
  1798. SHORTSUFFIX=mac
  1799. IMPORTLIBPREFIX=imp
  1800. endif
  1801. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  1802. BATCHEXT=.sh
  1803. EXEEXT=
  1804. HASSHAREDLIB=1
  1805. SHORTSUFFIX=dwn
  1806. EXEDBGEXT=.dSYM
  1807. endif
  1808. ifeq ($(OS_TARGET),gba)
  1809. EXEEXT=.gba
  1810. SHAREDLIBEXT=.so
  1811. SHORTSUFFIX=gba
  1812. endif
  1813. ifeq ($(OS_TARGET),symbian)
  1814. SHAREDLIBEXT=.dll
  1815. SHORTSUFFIX=symbian
  1816. endif
  1817. ifeq ($(OS_TARGET),NativeNT)
  1818. SHAREDLIBEXT=.dll
  1819. SHORTSUFFIX=nativent
  1820. endif
  1821. ifeq ($(OS_TARGET),wii)
  1822. EXEEXT=.dol
  1823. SHAREDLIBEXT=.so
  1824. SHORTSUFFIX=wii
  1825. endif
  1826. ifeq ($(OS_TARGET),aix)
  1827. BATCHEXT=.sh
  1828. EXEEXT=
  1829. SHAREDLIBEXT=.a
  1830. SHORTSUFFIX=aix
  1831. endif
  1832. ifeq ($(OS_TARGET),java)
  1833. OEXT=.class
  1834. ASMEXT=.j
  1835. SHAREDLIBEXT=.jar
  1836. SHORTSUFFIX=java
  1837. endif
  1838. ifeq ($(CPU_TARGET),jvm)
  1839. ifeq ($(OS_TARGET),android)
  1840. OEXT=.class
  1841. ASMEXT=.j
  1842. SHAREDLIBEXT=.jar
  1843. SHORTSUFFIX=android
  1844. endif
  1845. endif
  1846. ifeq ($(OS_TARGET),msdos)
  1847. STATICLIBPREFIX=
  1848. STATICLIBEXT=.a
  1849. SHORTSUFFIX=d16
  1850. endif
  1851. ifeq ($(OS_TARGET),embedded)
  1852. ifeq ($(CPU_TARGET),i8086)
  1853. STATICLIBPREFIX=
  1854. STATICLIBEXT=.a
  1855. else
  1856. EXEEXT=.bin
  1857. endif
  1858. SHORTSUFFIX=emb
  1859. endif
  1860. ifeq ($(OS_TARGET),win16)
  1861. STATICLIBPREFIX=
  1862. STATICLIBEXT=.a
  1863. SHAREDLIBEXT=.dll
  1864. SHORTSUFFIX=w16
  1865. endif
  1866. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  1867. FPCMADE=fpcmade.$(SHORTSUFFIX)
  1868. ZIPSUFFIX=$(SHORTSUFFIX)
  1869. ZIPCROSSPREFIX=
  1870. ZIPSOURCESUFFIX=src
  1871. ZIPEXAMPLESUFFIX=exm
  1872. else
  1873. FPCMADE=fpcmade.$(TARGETSUFFIX)
  1874. ZIPSOURCESUFFIX=.source
  1875. ZIPEXAMPLESUFFIX=.examples
  1876. ifdef CROSSCOMPILE
  1877. ZIPSUFFIX=.$(SOURCESUFFIX)
  1878. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  1879. else
  1880. ZIPSUFFIX=.$(TARGETSUFFIX)
  1881. ZIPCROSSPREFIX=
  1882. endif
  1883. endif
  1884. ifndef ECHO
  1885. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  1886. ifeq ($(ECHO),)
  1887. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  1888. ifeq ($(ECHO),)
  1889. ECHO= __missing_command_ECHO
  1890. else
  1891. ECHO:=$(firstword $(ECHO))
  1892. endif
  1893. else
  1894. ECHO:=$(firstword $(ECHO))
  1895. endif
  1896. endif
  1897. export ECHO
  1898. ifndef DATE
  1899. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  1900. ifeq ($(DATE),)
  1901. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  1902. ifeq ($(DATE),)
  1903. DATE= __missing_command_DATE
  1904. else
  1905. DATE:=$(firstword $(DATE))
  1906. endif
  1907. else
  1908. DATE:=$(firstword $(DATE))
  1909. endif
  1910. endif
  1911. export DATE
  1912. ifndef GINSTALL
  1913. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  1914. ifeq ($(GINSTALL),)
  1915. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  1916. ifeq ($(GINSTALL),)
  1917. GINSTALL= __missing_command_GINSTALL
  1918. else
  1919. GINSTALL:=$(firstword $(GINSTALL))
  1920. endif
  1921. else
  1922. GINSTALL:=$(firstword $(GINSTALL))
  1923. endif
  1924. endif
  1925. export GINSTALL
  1926. ifndef CPPROG
  1927. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  1928. ifeq ($(CPPROG),)
  1929. CPPROG= __missing_command_CPPROG
  1930. else
  1931. CPPROG:=$(firstword $(CPPROG))
  1932. endif
  1933. endif
  1934. export CPPROG
  1935. ifndef RMPROG
  1936. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  1937. ifeq ($(RMPROG),)
  1938. RMPROG= __missing_command_RMPROG
  1939. else
  1940. RMPROG:=$(firstword $(RMPROG))
  1941. endif
  1942. endif
  1943. export RMPROG
  1944. ifndef MVPROG
  1945. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  1946. ifeq ($(MVPROG),)
  1947. MVPROG= __missing_command_MVPROG
  1948. else
  1949. MVPROG:=$(firstword $(MVPROG))
  1950. endif
  1951. endif
  1952. export MVPROG
  1953. ifndef MKDIRPROG
  1954. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1955. ifeq ($(MKDIRPROG),)
  1956. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1957. ifeq ($(MKDIRPROG),)
  1958. MKDIRPROG= __missing_command_MKDIRPROG
  1959. else
  1960. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1961. endif
  1962. else
  1963. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1964. endif
  1965. endif
  1966. export MKDIRPROG
  1967. ifndef ECHOREDIR
  1968. ifndef inUnix
  1969. ECHOREDIR=echo
  1970. else
  1971. ECHOREDIR=$(ECHO)
  1972. endif
  1973. endif
  1974. ifndef COPY
  1975. COPY:=$(CPPROG) -fp
  1976. endif
  1977. ifndef COPYTREE
  1978. COPYTREE:=$(CPPROG) -Rfp
  1979. endif
  1980. ifndef MKDIRTREE
  1981. MKDIRTREE:=$(MKDIRPROG) -p
  1982. endif
  1983. ifndef MOVE
  1984. MOVE:=$(MVPROG) -f
  1985. endif
  1986. ifndef DEL
  1987. DEL:=$(RMPROG) -f
  1988. endif
  1989. ifndef DELTREE
  1990. DELTREE:=$(RMPROG) -rf
  1991. endif
  1992. ifndef INSTALL
  1993. ifdef inUnix
  1994. INSTALL:=$(GINSTALL) -c -m 644
  1995. else
  1996. INSTALL:=$(COPY)
  1997. endif
  1998. endif
  1999. ifndef INSTALLEXE
  2000. ifdef inUnix
  2001. INSTALLEXE:=$(GINSTALL) -c -m 755
  2002. else
  2003. INSTALLEXE:=$(COPY)
  2004. endif
  2005. endif
  2006. ifndef MKDIR
  2007. MKDIR:=$(GINSTALL) -m 755 -d
  2008. endif
  2009. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  2010. ifndef PPUMOVE
  2011. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  2012. ifeq ($(PPUMOVE),)
  2013. PPUMOVE= __missing_command_PPUMOVE
  2014. else
  2015. PPUMOVE:=$(firstword $(PPUMOVE))
  2016. endif
  2017. endif
  2018. export PPUMOVE
  2019. ifndef FPCMAKE
  2020. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  2021. ifeq ($(FPCMAKE),)
  2022. FPCMAKE= __missing_command_FPCMAKE
  2023. else
  2024. FPCMAKE:=$(firstword $(FPCMAKE))
  2025. endif
  2026. endif
  2027. export FPCMAKE
  2028. ifndef ZIPPROG
  2029. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  2030. ifeq ($(ZIPPROG),)
  2031. ZIPPROG= __missing_command_ZIPPROG
  2032. else
  2033. ZIPPROG:=$(firstword $(ZIPPROG))
  2034. endif
  2035. endif
  2036. export ZIPPROG
  2037. ifndef TARPROG
  2038. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  2039. ifeq ($(TARPROG),)
  2040. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  2041. ifeq ($(TARPROG),)
  2042. TARPROG= __missing_command_TARPROG
  2043. else
  2044. TARPROG:=$(firstword $(TARPROG))
  2045. endif
  2046. else
  2047. TARPROG:=$(firstword $(TARPROG))
  2048. endif
  2049. endif
  2050. export TARPROG
  2051. ASNAME=$(BINUTILSPREFIX)as
  2052. LDNAME=$(BINUTILSPREFIX)ld
  2053. ARNAME=$(BINUTILSPREFIX)ar
  2054. RCNAME=$(BINUTILSPREFIX)rc
  2055. NASMNAME=$(BINUTILSPREFIX)nasm
  2056. ifndef ASPROG
  2057. ifdef CROSSBINDIR
  2058. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  2059. else
  2060. ASPROG=$(ASNAME)
  2061. endif
  2062. endif
  2063. ifndef LDPROG
  2064. ifdef CROSSBINDIR
  2065. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  2066. else
  2067. LDPROG=$(LDNAME)
  2068. endif
  2069. endif
  2070. ifndef RCPROG
  2071. ifdef CROSSBINDIR
  2072. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  2073. else
  2074. RCPROG=$(RCNAME)
  2075. endif
  2076. endif
  2077. ifndef ARPROG
  2078. ifdef CROSSBINDIR
  2079. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  2080. else
  2081. ARPROG=$(ARNAME)
  2082. endif
  2083. endif
  2084. ifndef NASMPROG
  2085. ifdef CROSSBINDIR
  2086. NASMPROG=$(CROSSBINDIR)/$(NASMNAME)$(SRCEXEEXT)
  2087. else
  2088. NASMPROG=$(NASMNAME)
  2089. endif
  2090. endif
  2091. AS=$(ASPROG)
  2092. LD=$(LDPROG)
  2093. RC=$(RCPROG)
  2094. AR=$(ARPROG)
  2095. NASM=$(NASMPROG)
  2096. ifdef inUnix
  2097. PPAS=./ppas$(SRCBATCHEXT)
  2098. else
  2099. PPAS=ppas$(SRCBATCHEXT)
  2100. endif
  2101. ifdef inUnix
  2102. LDCONFIG=ldconfig
  2103. else
  2104. LDCONFIG=
  2105. endif
  2106. ifdef DATE
  2107. DATESTR:=$(shell $(DATE) +%Y%m%d)
  2108. else
  2109. DATESTR=
  2110. endif
  2111. ZIPOPT=-9
  2112. ZIPEXT=.zip
  2113. ifeq ($(USETAR),bz2)
  2114. TAROPT=vj
  2115. TAREXT=.tar.bz2
  2116. else
  2117. TAROPT=vz
  2118. TAREXT=.tar.gz
  2119. endif
  2120. ifndef NOCPUDEF
  2121. override FPCOPTDEF=$(ARCH)
  2122. endif
  2123. ifneq ($(OS_TARGET),$(OS_SOURCE))
  2124. override FPCOPT+=-T$(OS_TARGET)
  2125. endif
  2126. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  2127. override FPCOPT+=-P$(ARCH)
  2128. endif
  2129. ifeq ($(OS_SOURCE),openbsd)
  2130. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  2131. override FPCMAKEOPT+=-FD$(NEW_BINUTILS_PATH)
  2132. override FPMAKE_BUILD_OPT+=-FD$(NEW_BINUTILS_PATH)
  2133. endif
  2134. ifndef CROSSBOOTSTRAP
  2135. ifneq ($(BINUTILSPREFIX),)
  2136. override FPCOPT+=-XP$(BINUTILSPREFIX)
  2137. endif
  2138. ifneq ($(BINUTILSPREFIX),)
  2139. override FPCOPT+=-Xr$(RLINKPATH)
  2140. endif
  2141. endif
  2142. ifndef CROSSCOMPILE
  2143. ifneq ($(BINUTILSPREFIX),)
  2144. override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
  2145. override FPMAKE_BUILD_OPT+=-XP$(BINUTILSPREFIX)
  2146. endif
  2147. endif
  2148. ifdef UNITDIR
  2149. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  2150. endif
  2151. ifdef LIBDIR
  2152. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  2153. endif
  2154. ifdef OBJDIR
  2155. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  2156. endif
  2157. ifdef INCDIR
  2158. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  2159. endif
  2160. ifdef LINKSMART
  2161. override FPCOPT+=-XX
  2162. endif
  2163. ifdef CREATESMART
  2164. override FPCOPT+=-CX
  2165. endif
  2166. ifdef DEBUG
  2167. override FPCOPT+=-gl
  2168. override FPCOPTDEF+=DEBUG
  2169. endif
  2170. ifdef RELEASE
  2171. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  2172. ifeq ($(CPU_TARGET),i386)
  2173. FPCCPUOPT:=-OG2p3
  2174. endif
  2175. ifeq ($(CPU_TARGET),powerpc)
  2176. FPCCPUOPT:=-O1r
  2177. endif
  2178. else
  2179. FPCCPUOPT:=-O2
  2180. endif
  2181. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  2182. override FPCOPTDEF+=RELEASE
  2183. endif
  2184. ifdef STRIP
  2185. override FPCOPT+=-Xs
  2186. endif
  2187. ifdef OPTIMIZE
  2188. override FPCOPT+=-O2
  2189. endif
  2190. ifdef VERBOSE
  2191. override FPCOPT+=-vwni
  2192. endif
  2193. ifdef COMPILER_OPTIONS
  2194. override FPCOPT+=$(COMPILER_OPTIONS)
  2195. endif
  2196. ifdef COMPILER_UNITDIR
  2197. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  2198. endif
  2199. ifdef COMPILER_LIBRARYDIR
  2200. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  2201. endif
  2202. ifdef COMPILER_OBJECTDIR
  2203. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  2204. endif
  2205. ifdef COMPILER_INCLUDEDIR
  2206. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  2207. endif
  2208. ifdef CROSSBINDIR
  2209. override FPCOPT+=-FD$(CROSSBINDIR)
  2210. endif
  2211. ifdef COMPILER_TARGETDIR
  2212. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  2213. ifeq ($(COMPILER_TARGETDIR),.)
  2214. override TARGETDIRPREFIX=
  2215. else
  2216. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  2217. endif
  2218. endif
  2219. ifdef COMPILER_UNITTARGETDIR
  2220. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  2221. ifeq ($(COMPILER_UNITTARGETDIR),.)
  2222. override UNITTARGETDIRPREFIX=
  2223. else
  2224. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  2225. endif
  2226. else
  2227. ifdef COMPILER_TARGETDIR
  2228. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  2229. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  2230. endif
  2231. endif
  2232. ifdef CREATESHARED
  2233. override FPCOPT+=-Cg
  2234. endif
  2235. ifneq ($(findstring $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
  2236. ifneq ($(findstring $(CPU_TARGET),x86_64 mips mipsel),)
  2237. override FPCOPT+=-Cg
  2238. endif
  2239. endif
  2240. ifdef LINKSHARED
  2241. endif
  2242. ifdef OPT
  2243. override FPCOPT+=$(OPT)
  2244. endif
  2245. ifdef FPMAKEBUILDOPT
  2246. override FPMAKE_BUILD_OPT+=$(FPMAKEBUILDOPT)
  2247. endif
  2248. ifdef FPCOPTDEF
  2249. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  2250. endif
  2251. ifdef CFGFILE
  2252. override FPCOPT+=@$(CFGFILE)
  2253. endif
  2254. ifdef USEENV
  2255. override FPCEXTCMD:=$(FPCOPT)
  2256. override FPCOPT:=!FPCEXTCMD
  2257. export FPCEXTCMD
  2258. endif
  2259. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  2260. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  2261. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  2262. override ACROSSCOMPILE=1
  2263. endif
  2264. ifdef ACROSSCOMPILE
  2265. override FPCOPT+=$(CROSSOPT)
  2266. endif
  2267. override COMPILER:=$(strip $(FPC) $(FPCOPT))
  2268. ifneq (,$(findstring -sh ,$(COMPILER)))
  2269. UseEXECPPAS=1
  2270. endif
  2271. ifneq (,$(findstring -s ,$(COMPILER)))
  2272. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  2273. UseEXECPPAS=1
  2274. endif
  2275. endif
  2276. ifneq ($(UseEXECPPAS),1)
  2277. EXECPPAS=
  2278. else
  2279. ifdef RUNBATCH
  2280. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  2281. else
  2282. EXECPPAS:=@$(PPAS)
  2283. endif
  2284. endif
  2285. .PHONY: fpc_loaders
  2286. ifneq ($(TARGET_LOADERS),)
  2287. override ALLTARGET+=fpc_loaders
  2288. override CLEANTARGET+=fpc_loaders_clean
  2289. override INSTALLTARGET+=fpc_loaders_install
  2290. override LOADEROFILES:=$(addsuffix $(OEXT),$(TARGET_LOADERS))
  2291. endif
  2292. %$(OEXT): %$(LOADEREXT)
  2293. ifdef COMPILER_UNITTARGETDIR
  2294. $(AS) -o $(COMPILER_UNITTARGETDIR)/$*$(OEXT) $<
  2295. else
  2296. $(AS) -o $*$(OEXT) $<
  2297. endif
  2298. fpc_loaders: $(COMPILER_UNITTARGETDIR) $(LOADEROFILES)
  2299. fpc_loaders_clean:
  2300. ifdef COMPILER_UNITTARGETDIR
  2301. -$(DEL) $(addprefix $(COMPILER_UNITTARGETDIR)/,$(LOADEROFILES))
  2302. else
  2303. -$(DEL) $(LOADEROFILES)
  2304. endif
  2305. fpc_loaders_install:
  2306. $(MKDIR) $(INSTALL_UNITDIR)
  2307. ifdef COMPILER_UNITTARGETDIR
  2308. $(INSTALL) $(addprefix $(COMPILER_UNITTARGETDIR)/,$(LOADEROFILES)) $(INSTALL_UNITDIR)
  2309. else
  2310. $(INSTALL) $(LOADEROFILES) $(INSTALL_UNITDIR)
  2311. endif
  2312. .PHONY: fpc_units
  2313. ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
  2314. override ALLTARGET+=fpc_units
  2315. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  2316. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  2317. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  2318. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  2319. endif
  2320. fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
  2321. ifdef TARGET_RSTS
  2322. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  2323. override CLEANRSTFILES+=$(RSTFILES)
  2324. endif
  2325. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  2326. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  2327. @$(ECHOREDIR) Compiled > $(FPCMADE)
  2328. fpc_all: $(FPCMADE)
  2329. fpc_smart:
  2330. $(MAKE) all LINKSMART=1 CREATESMART=1
  2331. fpc_debug:
  2332. $(MAKE) all DEBUG=1
  2333. fpc_release:
  2334. $(MAKE) all RELEASE=1
  2335. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) $(LTOEXT) .pas .lpr .dpr .pp .rc .res
  2336. $(COMPILER_UNITTARGETDIR):
  2337. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  2338. $(COMPILER_TARGETDIR):
  2339. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  2340. %$(PPUEXT): %.pp
  2341. $(COMPILER) $<
  2342. $(EXECPPAS)
  2343. %$(PPUEXT): %.pas
  2344. $(COMPILER) $<
  2345. $(EXECPPAS)
  2346. %$(EXEEXT): %.pp
  2347. $(COMPILER) $<
  2348. $(EXECPPAS)
  2349. %$(EXEEXT): %.pas
  2350. $(COMPILER) $<
  2351. $(EXECPPAS)
  2352. %$(EXEEXT): %.lpr
  2353. $(COMPILER) $<
  2354. $(EXECPPAS)
  2355. %$(EXEEXT): %.dpr
  2356. $(COMPILER) $<
  2357. $(EXECPPAS)
  2358. %.res: %.rc
  2359. windres -i $< -o $@
  2360. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2361. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2362. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2363. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2364. vpath %.inc $(COMPILER_INCLUDEDIR)
  2365. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  2366. vpath %$(LTOEXT) $(COMPILER_UNITTARGETDIR)
  2367. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  2368. .PHONY: fpc_shared
  2369. override INSTALLTARGET+=fpc_shared_install
  2370. ifndef SHARED_LIBVERSION
  2371. SHARED_LIBVERSION=$(FPC_VERSION)
  2372. endif
  2373. ifndef SHARED_LIBNAME
  2374. SHARED_LIBNAME=$(PACKAGE_NAME)
  2375. endif
  2376. ifndef SHARED_FULLNAME
  2377. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  2378. endif
  2379. ifndef SHARED_LIBUNITS
  2380. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  2381. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  2382. endif
  2383. fpc_shared:
  2384. ifdef HASSHAREDLIB
  2385. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  2386. ifneq ($(SHARED_BUILD),n)
  2387. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  2388. endif
  2389. else
  2390. @$(ECHO) Shared Libraries not supported
  2391. endif
  2392. fpc_shared_install:
  2393. ifneq ($(SHARED_BUILD),n)
  2394. ifneq ($(SHARED_LIBUNITS),)
  2395. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  2396. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  2397. endif
  2398. endif
  2399. endif
  2400. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  2401. ifdef INSTALL_UNITS
  2402. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  2403. endif
  2404. ifdef INSTALL_BUILDUNIT
  2405. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  2406. endif
  2407. ifdef INSTALLPPUFILES
  2408. ifneq ($(IMPORTLIBPREFIX)-$(STATICLIBEXT),$(STATICLIBPREFIX)-$(STATICLIBEXT))
  2409. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  2410. else
  2411. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  2412. endif
  2413. ifneq ($(UNITTARGETDIRPREFIX),)
  2414. override INSTALLPPUFILENAMES:=$(notdir $(INSTALLPPUFILES))
  2415. override INSTALLPPULINKFILENAMES:=$(notdir $(INSTALLPPULINKFILES))
  2416. override INSTALLPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILENAMES))
  2417. override INSTALLPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILENAMES)))
  2418. endif
  2419. override INSTALL_CREATEPACKAGEFPC=1
  2420. endif
  2421. ifdef INSTALLEXEFILES
  2422. ifneq ($(TARGETDIRPREFIX),)
  2423. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  2424. endif
  2425. endif
  2426. fpc_install: all $(INSTALLTARGET)
  2427. ifdef INSTALLEXEFILES
  2428. $(MKDIR) $(INSTALL_BINDIR)
  2429. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  2430. endif
  2431. ifdef INSTALL_CREATEPACKAGEFPC
  2432. ifdef FPCMAKE
  2433. ifdef PACKAGE_VERSION
  2434. ifneq ($(wildcard Makefile.fpc),)
  2435. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  2436. $(MKDIR) $(INSTALL_UNITDIR)
  2437. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  2438. endif
  2439. endif
  2440. endif
  2441. endif
  2442. ifdef INSTALLPPUFILES
  2443. $(MKDIR) $(INSTALL_UNITDIR)
  2444. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  2445. ifneq ($(INSTALLPPULINKFILES),)
  2446. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  2447. endif
  2448. ifneq ($(wildcard $(LIB_FULLNAME)),)
  2449. $(MKDIR) $(INSTALL_LIBDIR)
  2450. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  2451. ifdef inUnix
  2452. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  2453. endif
  2454. endif
  2455. endif
  2456. ifdef INSTALL_FILES
  2457. $(MKDIR) $(INSTALL_DATADIR)
  2458. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  2459. endif
  2460. fpc_sourceinstall: distclean
  2461. $(MKDIR) $(INSTALL_SOURCEDIR)
  2462. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  2463. fpc_exampleinstall: $(EXAMPLEINSTALLTARGET) $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  2464. ifdef HASEXAMPLES
  2465. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  2466. endif
  2467. ifdef EXAMPLESOURCEFILES
  2468. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  2469. endif
  2470. ifdef TARGET_EXAMPLEDIRS
  2471. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  2472. endif
  2473. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  2474. ifdef EXEFILES
  2475. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  2476. override CLEANEXEDBGFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEDBGFILES))
  2477. endif
  2478. ifdef CLEAN_PROGRAMS
  2479. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  2480. override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
  2481. endif
  2482. ifdef CLEAN_UNITS
  2483. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  2484. endif
  2485. ifdef CLEANPPUFILES
  2486. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  2487. ifdef DEBUGSYMEXT
  2488. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  2489. endif
  2490. override CLEANPPUFILENAMES:=$(CLEANPPUFILES)
  2491. override CLEANPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILENAMES))
  2492. override CLEANPPULINKFILENAMES:=$(CLEANPPULINKFILES)
  2493. override CLEANPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILENAMES)))
  2494. endif
  2495. fpc_clean: $(CLEANTARGET)
  2496. ifdef CLEANEXEFILES
  2497. -$(DEL) $(CLEANEXEFILES)
  2498. endif
  2499. ifdef CLEANEXEDBGFILES
  2500. -$(DELTREE) $(CLEANEXEDBGFILES)
  2501. endif
  2502. ifdef CLEANPPUFILES
  2503. -$(DEL) $(CLEANPPUFILES)
  2504. endif
  2505. ifneq ($(CLEANPPULINKFILES),)
  2506. -$(DEL) $(CLEANPPULINKFILES)
  2507. endif
  2508. ifdef CLEANRSTFILES
  2509. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  2510. endif
  2511. ifdef CLEAN_FILES
  2512. -$(DEL) $(CLEAN_FILES)
  2513. endif
  2514. ifdef LIB_NAME
  2515. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  2516. endif
  2517. -$(DEL) $(FPCMADE) *$(FULL_TARGET).fpm Package.fpc *$(ASMEXT)
  2518. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
  2519. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  2520. fpc_cleanall: $(CLEANTARGET)
  2521. ifdef CLEANEXEFILES
  2522. -$(DEL) $(CLEANEXEFILES)
  2523. endif
  2524. ifdef COMPILER_UNITTARGETDIR
  2525. ifdef CLEANPPUFILES
  2526. -$(DEL) $(CLEANPPUFILES)
  2527. endif
  2528. ifneq ($(CLEANPPULINKFILES),)
  2529. -$(DEL) $(CLEANPPULINKFILES)
  2530. endif
  2531. ifdef CLEANRSTFILES
  2532. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  2533. endif
  2534. endif
  2535. ifdef CLEAN_FILES
  2536. -$(DEL) $(CLEAN_FILES)
  2537. endif
  2538. -$(DELTREE) units
  2539. -$(DELTREE) bin
  2540. -$(DEL) *$(OEXT) *$(LTOEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  2541. ifneq ($(PPUEXT),.ppu)
  2542. -$(DEL) *.o *.ppu *.a
  2543. endif
  2544. -$(DELTREE) *$(SMARTEXT)
  2545. -$(DEL) fpcmade.* Package.fpc *.fpm
  2546. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
  2547. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  2548. ifdef AOUTEXT
  2549. -$(DEL) *$(AOUTEXT)
  2550. endif
  2551. ifdef DEBUGSYMEXT
  2552. -$(DEL) *$(DEBUGSYMEXT)
  2553. endif
  2554. ifdef LOCALFPMAKEBIN
  2555. -$(DEL) $(LOCALFPMAKEBIN)
  2556. -$(DEL) $(FPMAKEBINOBJ)
  2557. endif
  2558. fpc_distclean: cleanall
  2559. .PHONY: fpc_baseinfo
  2560. override INFORULES+=fpc_baseinfo
  2561. fpc_baseinfo:
  2562. @$(ECHO)
  2563. @$(ECHO) == Package info ==
  2564. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  2565. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  2566. @$(ECHO)
  2567. @$(ECHO) == Configuration info ==
  2568. @$(ECHO)
  2569. @$(ECHO) FPC.......... $(FPC)
  2570. @$(ECHO) FPC Version.. $(FPC_VERSION)
  2571. @$(ECHO) Source CPU... $(CPU_SOURCE)
  2572. @$(ECHO) Target CPU... $(CPU_TARGET)
  2573. @$(ECHO) Source OS.... $(OS_SOURCE)
  2574. @$(ECHO) Target OS.... $(OS_TARGET)
  2575. @$(ECHO) Full Source.. $(FULL_SOURCE)
  2576. @$(ECHO) Full Target.. $(FULL_TARGET)
  2577. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  2578. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  2579. @$(ECHO) FPC fpmake... $(FPCFPMAKE)
  2580. @$(ECHO)
  2581. @$(ECHO) == Directory info ==
  2582. @$(ECHO)
  2583. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  2584. @$(ECHO)
  2585. @$(ECHO) Basedir......... $(BASEDIR)
  2586. @$(ECHO) FPCDir.......... $(FPCDIR)
  2587. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  2588. @$(ECHO) UnitsDir........ $(UNITSDIR)
  2589. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  2590. @$(ECHO)
  2591. @$(ECHO) GCC library..... $(GCCLIBDIR)
  2592. @$(ECHO) Other library... $(OTHERLIBDIR)
  2593. @$(ECHO)
  2594. @$(ECHO) == Tools info ==
  2595. @$(ECHO)
  2596. @$(ECHO) As........ $(AS)
  2597. @$(ECHO) Ld........ $(LD)
  2598. @$(ECHO) Ar........ $(AR)
  2599. @$(ECHO) Rc........ $(RC)
  2600. @$(ECHO)
  2601. @$(ECHO) Mv........ $(MVPROG)
  2602. @$(ECHO) Cp........ $(CPPROG)
  2603. @$(ECHO) Rm........ $(RMPROG)
  2604. @$(ECHO) GInstall.. $(GINSTALL)
  2605. @$(ECHO) Echo...... $(ECHO)
  2606. @$(ECHO) Shell..... $(SHELL)
  2607. @$(ECHO) Date...... $(DATE)
  2608. @$(ECHO) FPCMake... $(FPCMAKE)
  2609. @$(ECHO) PPUMove... $(PPUMOVE)
  2610. @$(ECHO) Zip....... $(ZIPPROG)
  2611. @$(ECHO)
  2612. @$(ECHO) == Object info ==
  2613. @$(ECHO)
  2614. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  2615. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  2616. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  2617. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  2618. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  2619. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  2620. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  2621. @$(ECHO)
  2622. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  2623. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  2624. @$(ECHO)
  2625. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  2626. @$(ECHO) Install Files....... $(INSTALL_FILES)
  2627. @$(ECHO)
  2628. @$(ECHO) == Install info ==
  2629. @$(ECHO)
  2630. @$(ECHO) DateStr.............. $(DATESTR)
  2631. @$(ECHO) ZipName.............. $(ZIPNAME)
  2632. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  2633. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  2634. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  2635. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  2636. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  2637. @$(ECHO)
  2638. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  2639. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  2640. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  2641. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  2642. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  2643. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  2644. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  2645. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  2646. @$(ECHO)
  2647. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  2648. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  2649. @$(ECHO)
  2650. .PHONY: fpc_info
  2651. fpc_info: $(INFORULES)
  2652. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  2653. fpc_makefile_dirs
  2654. fpc_makefile:
  2655. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  2656. fpc_makefile_sub1:
  2657. ifdef TARGET_DIRS
  2658. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  2659. endif
  2660. ifdef TARGET_EXAMPLEDIRS
  2661. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  2662. endif
  2663. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  2664. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  2665. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  2666. all: fpc_all
  2667. debug: fpc_debug
  2668. smart: fpc_smart
  2669. release: fpc_release
  2670. units: fpc_units
  2671. examples:
  2672. shared: fpc_shared
  2673. install: fpc_install
  2674. sourceinstall: fpc_sourceinstall
  2675. exampleinstall: fpc_exampleinstall
  2676. distinstall:
  2677. zipinstall:
  2678. zipsourceinstall:
  2679. zipexampleinstall:
  2680. zipdistinstall:
  2681. clean: fpc_clean
  2682. distclean: fpc_distclean
  2683. cleanall: fpc_cleanall
  2684. info: fpc_info
  2685. makefiles: fpc_makefiles
  2686. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  2687. ifneq ($(wildcard fpcmake.loc),)
  2688. include fpcmake.loc
  2689. endif
  2690. include $(INC)/makefile.inc
  2691. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  2692. include $(PROCINC)/makefile.cpu
  2693. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  2694. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  2695. prt0s$(OEXT) : prt0s.asm prt0comn.asm
  2696. $(MAKE) $(COMPILER_UNITTARGETDIR)
  2697. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0s$(OEXT) prt0s.asm
  2698. prt0m$(OEXT) : prt0m.asm prt0comn.asm
  2699. $(MAKE) $(COMPILER_UNITTARGETDIR)
  2700. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0m$(OEXT) prt0m.asm
  2701. prt0c$(OEXT) : prt0c.asm prt0comn.asm
  2702. $(MAKE) $(COMPILER_UNITTARGETDIR)
  2703. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0c$(OEXT) prt0c.asm
  2704. prt0l$(OEXT) : prt0l.asm prt0comn.asm
  2705. $(MAKE) $(COMPILER_UNITTARGETDIR)
  2706. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0l$(OEXT) prt0l.asm
  2707. prt0h$(OEXT) : prt0h.asm prt0comn.asm
  2708. $(MAKE) $(COMPILER_UNITTARGETDIR)
  2709. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0h$(OEXT) prt0h.asm
  2710. system$(PPUEXT) : system.pp $(SYSDEPS) wintypes.inc winprocsh.inc winprocs.inc \
  2711. glbheap.inc glbheaph.inc locheap.inc locheaph.inc \
  2712. sysdl.inc sysdlh.inc
  2713. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg system.pp
  2714. $(EXECPPAS)
  2715. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  2716. $(COMPILER) $(INC)/uuchar.pp
  2717. $(EXECPPAS)
  2718. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  2719. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  2720. $(EXECPPAS)
  2721. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  2722. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  2723. $(INC)/genstr.inc $(INC)/genstrs.inc \
  2724. system$(PPUEXT)
  2725. $(COMPILER) $(INC)/strings.pp
  2726. $(EXECPPAS)
  2727. iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
  2728. $(COMPILER) $(INC)/iso7185.pp
  2729. $(EXECPPAS)
  2730. extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  2731. $(COMPILER) $(INC)/extpas.pp
  2732. $(EXECPPAS)
  2733. wintypes$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) wintypes.pp wintypes.inc
  2734. $(COMPILER) wintypes.pp
  2735. $(EXECPPAS)
  2736. winprocs$(PPUEXT) : wintypes$(PPUEXT) winprocs.pp winprocsh.inc winprocs.inc
  2737. $(COMPILER) winprocs.pp
  2738. $(EXECPPAS)
  2739. win31$(PPUEXT) : wintypes$(PPUEXT) win31.pp
  2740. $(COMPILER) win31.pp
  2741. $(EXECPPAS)
  2742. ports$(PPUEXT) : ports.pp system$(PPUEXT)
  2743. $(COMPILER) ports.pp
  2744. $(EXECPPAS)
  2745. dynlibs$(PPUEXT) : $(INC)/dynlibs.pas dynlibs.inc objpas$(PPUEXT)
  2746. $(COMPILER) $(INC)/dynlibs.pas
  2747. dos$(PPUEXT) : dos.pp registers.inc \
  2748. $(INC)/dosh.inc $(INC)/dos.inc $(INC)/fexpand.inc \
  2749. strings$(PPUEXT) wintypes$(PPUEXT) winprocs$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  2750. $(COMPILER) dos.pp
  2751. $(EXECPPAS)
  2752. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  2753. objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT) \
  2754. wintypes$(PPUEXT) winprocs$(PPUEXT)
  2755. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  2756. $(EXECPPAS)
  2757. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  2758. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) \
  2759. types$(PPUEXT) fgl$(PPUEXT) objpas$(PPUEXT) \
  2760. winprocs$(PPUEXT) wintypes$(PPUEXT) sortbase$(PPUEXT)
  2761. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  2762. $(EXECPPAS)
  2763. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp types$(PPUEXT) sysutils$(PPUEXT) rtlconst$(PPUEXT) objpas$(PPUEXT) sortbase$(PPUEXT)
  2764. $(COMPILER) $(OBJPASDIR)/fgl.pp
  2765. $(EXECPPAS)
  2766. math$(PPUEXT): $(OBJPASDIR)/math.pp $(PROCINC)/mathu.inc objpas$(PPUEXT) sysutils$(PPUEXT) system$(PPUEXT)
  2767. $(COMPILER) $(OBJPASDIR)/math.pp
  2768. $(EXECPPAS)
  2769. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp sysutils$(PPUEXT) objpas$(PPUEXT) rtlconst$(PPUEXT)
  2770. $(COMPILER) -Sg -Fi$(OBJPASDIR) $(OBJPASDIR)/typinfo.pp
  2771. $(EXECPPAS)
  2772. types$(PPUEXT) : $(OBJPASDIR)/types.pp math$(PPUEXT) wintypes$(PPUEXT) objpas$(PPUEXT)
  2773. $(COMPILER) $(OBJPASDIR)/types.pp
  2774. $(EXECPPAS)
  2775. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT)
  2776. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  2777. $(EXECPPAS)
  2778. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp $(OBJPASDIR)/rtlconst.inc objpas$(PPUEXT)
  2779. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/rtlconst.pp
  2780. $(EXECPPAS)
  2781. sortbase$(PPUEXT) : $(INC)/sortbase.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  2782. $(COMPILER) $<