Makefile 67 KB

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