Makefile 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/08/02]
  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 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 sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd 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 powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
  6. BSDs = freebsd netbsd openbsd darwin
  7. UNIXs = linux $(BSDs) solaris qnx
  8. LIMIT83fs = go32v2 os2 emx watcom
  9. OSNeedsComspecToRunBatch = go32v2 watcom
  10. FORCE:
  11. .PHONY: FORCE
  12. override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
  13. ifneq ($(findstring darwin,$(OSTYPE)),)
  14. inUnix=1 #darwin
  15. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  16. else
  17. ifeq ($(findstring ;,$(PATH)),)
  18. inUnix=1
  19. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  20. else
  21. SEARCHPATH:=$(subst ;, ,$(PATH))
  22. endif
  23. endif
  24. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  25. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  26. ifeq ($(PWD),)
  27. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  28. ifeq ($(PWD),)
  29. $(error You need the GNU utils package to use this Makefile)
  30. else
  31. PWD:=$(firstword $(PWD))
  32. SRCEXEEXT=
  33. endif
  34. else
  35. PWD:=$(firstword $(PWD))
  36. SRCEXEEXT=.exe
  37. endif
  38. ifndef inUnix
  39. ifeq ($(OS),Windows_NT)
  40. inWinNT=1
  41. else
  42. ifdef OS2_SHELL
  43. inOS2=1
  44. endif
  45. endif
  46. else
  47. ifneq ($(findstring cygdrive,$(PATH)),)
  48. inCygWin=1
  49. endif
  50. endif
  51. ifdef inUnix
  52. SRCBATCHEXT=.sh
  53. else
  54. ifdef inOS2
  55. SRCBATCHEXT=.cmd
  56. else
  57. SRCBATCHEXT=.bat
  58. endif
  59. endif
  60. ifdef COMSPEC
  61. ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
  62. ifndef RUNBATCH
  63. RUNBATCH=$(COMSPEC) /C
  64. endif
  65. endif
  66. endif
  67. ifdef inUnix
  68. PATHSEP=/
  69. else
  70. PATHSEP:=$(subst /,\,/)
  71. ifdef inCygWin
  72. PATHSEP=/
  73. endif
  74. endif
  75. ifdef PWD
  76. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  77. ifdef inCygWin
  78. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  79. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  80. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  81. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  82. endif
  83. endif
  84. else
  85. BASEDIR=.
  86. endif
  87. ifdef inOS2
  88. ifndef ECHO
  89. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  90. ifeq ($(ECHO),)
  91. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  92. ifeq ($(ECHO),)
  93. ECHO=echo
  94. else
  95. ECHO:=$(firstword $(ECHO))
  96. endif
  97. else
  98. ECHO:=$(firstword $(ECHO))
  99. endif
  100. endif
  101. export ECHO
  102. endif
  103. override OS_TARGET_DEFAULT=embedded
  104. override DEFAULT_FPCDIR=../..
  105. ifndef FPC
  106. ifdef PP
  107. FPC=$(PP)
  108. endif
  109. endif
  110. ifndef FPC
  111. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  112. ifneq ($(FPCPROG),)
  113. FPCPROG:=$(firstword $(FPCPROG))
  114. ifneq ($(CPU_TARGET),)
  115. FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
  116. else
  117. FPC:=$(shell $(FPCPROG) -PB)
  118. endif
  119. ifneq ($(findstring Error,$(FPC)),)
  120. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  121. else
  122. ifeq ($(strip $(wildcard $(FPC))),)
  123. FPC:=$(firstword $(FPCPROG))
  124. endif
  125. endif
  126. else
  127. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  128. endif
  129. endif
  130. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  131. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  132. FOUNDFPC:=$(strip $(wildcard $(FPC)))
  133. ifeq ($(FOUNDFPC),)
  134. FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
  135. ifeq ($(FOUNDFPC),)
  136. $(error Compiler $(FPC) not found)
  137. endif
  138. endif
  139. ifndef FPC_COMPILERINFO
  140. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  141. endif
  142. ifndef FPC_VERSION
  143. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  144. endif
  145. export FPC FPC_VERSION FPC_COMPILERINFO
  146. unexport CHECKDEPEND ALLDEPENDENCIES
  147. ifndef CPU_TARGET
  148. ifdef CPU_TARGET_DEFAULT
  149. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  150. endif
  151. endif
  152. ifndef OS_TARGET
  153. ifdef OS_TARGET_DEFAULT
  154. OS_TARGET=$(OS_TARGET_DEFAULT)
  155. endif
  156. endif
  157. ifneq ($(words $(FPC_COMPILERINFO)),5)
  158. FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
  159. FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
  160. FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
  161. FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
  162. endif
  163. ifndef CPU_SOURCE
  164. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  165. endif
  166. ifndef CPU_TARGET
  167. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  168. endif
  169. ifndef OS_SOURCE
  170. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  171. endif
  172. ifndef OS_TARGET
  173. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  174. endif
  175. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  176. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  177. ifeq ($(CPU_TARGET),armeb)
  178. ARCH=arm
  179. override FPCOPT+=-Cb
  180. else
  181. ifeq ($(CPU_TARGET),armel)
  182. ARCH=arm
  183. override FPCOPT+=-CaEABI
  184. else
  185. ARCH=$(CPU_TARGET)
  186. endif
  187. endif
  188. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  189. TARGETSUFFIX=$(OS_TARGET)
  190. SOURCESUFFIX=$(OS_SOURCE)
  191. else
  192. TARGETSUFFIX=$(FULL_TARGET)
  193. SOURCESUFFIX=$(FULL_SOURCE)
  194. endif
  195. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  196. CROSSCOMPILE=1
  197. endif
  198. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  199. ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
  200. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  201. endif
  202. endif
  203. ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
  204. BSDhier=1
  205. endif
  206. ifeq ($(OS_TARGET),linux)
  207. linuxHier=1
  208. endif
  209. export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
  210. ifdef FPCDIR
  211. override FPCDIR:=$(subst \,/,$(FPCDIR))
  212. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  213. override FPCDIR=wrong
  214. endif
  215. else
  216. override FPCDIR=wrong
  217. endif
  218. ifdef DEFAULT_FPCDIR
  219. ifeq ($(FPCDIR),wrong)
  220. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  221. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  222. override FPCDIR=wrong
  223. endif
  224. endif
  225. endif
  226. ifeq ($(FPCDIR),wrong)
  227. ifdef inUnix
  228. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  229. ifeq ($(wildcard $(FPCDIR)/units),)
  230. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  231. endif
  232. else
  233. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  234. override FPCDIR:=$(FPCDIR)/..
  235. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  236. override FPCDIR:=$(FPCDIR)/..
  237. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  238. override FPCDIR:=$(BASEDIR)
  239. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  240. override FPCDIR=c:/pp
  241. endif
  242. endif
  243. endif
  244. endif
  245. endif
  246. ifndef CROSSBINDIR
  247. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  248. endif
  249. ifeq ($(OS_TARGET),darwin)
  250. ifeq ($(OS_SOURCE),darwin)
  251. DARWIN2DARWIN=1
  252. endif
  253. endif
  254. ifndef BINUTILSPREFIX
  255. ifndef CROSSBINDIR
  256. ifdef CROSSCOMPILE
  257. ifndef DARWIN2DARWIN
  258. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  259. endif
  260. endif
  261. endif
  262. endif
  263. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  264. ifeq ($(UNITSDIR),)
  265. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  266. endif
  267. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
  268. override PACKAGE_NAME=rtl
  269. PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  270. RTL=..
  271. INC=$(RTL)/inc
  272. COMMON=$(RTL)/common
  273. PROCINC=$(RTL)/$(CPU_TARGET)
  274. UNITPREFIX=rtl
  275. SYSTEMUNIT=system
  276. override [email protected]
  277. ifdef RELEASE
  278. override FPCOPT+=-Ur
  279. endif
  280. CPU_UNITS=
  281. SYSINIT_UNITS=
  282. ifeq ($(ARCH),arm)
  283. CPU_UNITS=lpc21x4 at91sam7x256
  284. endif
  285. OBJPASDIR=$(RTL)/objpas
  286. GRAPHDIR=$(INC)/graph
  287. ifeq ($(FULL_TARGET),i386-linux)
  288. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  289. endif
  290. ifeq ($(FULL_TARGET),i386-go32v2)
  291. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  292. endif
  293. ifeq ($(FULL_TARGET),i386-win32)
  294. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  295. endif
  296. ifeq ($(FULL_TARGET),i386-os2)
  297. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  298. endif
  299. ifeq ($(FULL_TARGET),i386-freebsd)
  300. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  301. endif
  302. ifeq ($(FULL_TARGET),i386-beos)
  303. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  304. endif
  305. ifeq ($(FULL_TARGET),i386-haiku)
  306. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  307. endif
  308. ifeq ($(FULL_TARGET),i386-netbsd)
  309. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  310. endif
  311. ifeq ($(FULL_TARGET),i386-solaris)
  312. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  313. endif
  314. ifeq ($(FULL_TARGET),i386-qnx)
  315. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  316. endif
  317. ifeq ($(FULL_TARGET),i386-netware)
  318. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  319. endif
  320. ifeq ($(FULL_TARGET),i386-openbsd)
  321. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  322. endif
  323. ifeq ($(FULL_TARGET),i386-wdosx)
  324. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  325. endif
  326. ifeq ($(FULL_TARGET),i386-darwin)
  327. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  328. endif
  329. ifeq ($(FULL_TARGET),i386-emx)
  330. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  331. endif
  332. ifeq ($(FULL_TARGET),i386-watcom)
  333. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  334. endif
  335. ifeq ($(FULL_TARGET),i386-netwlibc)
  336. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  337. endif
  338. ifeq ($(FULL_TARGET),i386-wince)
  339. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  340. endif
  341. ifeq ($(FULL_TARGET),i386-embedded)
  342. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  343. endif
  344. ifeq ($(FULL_TARGET),i386-symbian)
  345. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  346. endif
  347. ifeq ($(FULL_TARGET),m68k-linux)
  348. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  349. endif
  350. ifeq ($(FULL_TARGET),m68k-freebsd)
  351. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  352. endif
  353. ifeq ($(FULL_TARGET),m68k-netbsd)
  354. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  355. endif
  356. ifeq ($(FULL_TARGET),m68k-amiga)
  357. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  358. endif
  359. ifeq ($(FULL_TARGET),m68k-atari)
  360. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  361. endif
  362. ifeq ($(FULL_TARGET),m68k-openbsd)
  363. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  364. endif
  365. ifeq ($(FULL_TARGET),m68k-palmos)
  366. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  367. endif
  368. ifeq ($(FULL_TARGET),m68k-embedded)
  369. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  370. endif
  371. ifeq ($(FULL_TARGET),powerpc-linux)
  372. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  373. endif
  374. ifeq ($(FULL_TARGET),powerpc-netbsd)
  375. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  376. endif
  377. ifeq ($(FULL_TARGET),powerpc-amiga)
  378. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  379. endif
  380. ifeq ($(FULL_TARGET),powerpc-macos)
  381. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  382. endif
  383. ifeq ($(FULL_TARGET),powerpc-darwin)
  384. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  385. endif
  386. ifeq ($(FULL_TARGET),powerpc-morphos)
  387. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  388. endif
  389. ifeq ($(FULL_TARGET),powerpc-embedded)
  390. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  391. endif
  392. ifeq ($(FULL_TARGET),sparc-linux)
  393. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  394. endif
  395. ifeq ($(FULL_TARGET),sparc-netbsd)
  396. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  397. endif
  398. ifeq ($(FULL_TARGET),sparc-solaris)
  399. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  400. endif
  401. ifeq ($(FULL_TARGET),sparc-embedded)
  402. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  403. endif
  404. ifeq ($(FULL_TARGET),x86_64-linux)
  405. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  406. endif
  407. ifeq ($(FULL_TARGET),x86_64-freebsd)
  408. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  409. endif
  410. ifeq ($(FULL_TARGET),x86_64-darwin)
  411. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  412. endif
  413. ifeq ($(FULL_TARGET),x86_64-win64)
  414. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  415. endif
  416. ifeq ($(FULL_TARGET),x86_64-embedded)
  417. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  418. endif
  419. ifeq ($(FULL_TARGET),arm-linux)
  420. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  421. endif
  422. ifeq ($(FULL_TARGET),arm-palmos)
  423. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  424. endif
  425. ifeq ($(FULL_TARGET),arm-darwin)
  426. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  427. endif
  428. ifeq ($(FULL_TARGET),arm-wince)
  429. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  430. endif
  431. ifeq ($(FULL_TARGET),arm-gba)
  432. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  433. endif
  434. ifeq ($(FULL_TARGET),arm-nds)
  435. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  436. endif
  437. ifeq ($(FULL_TARGET),arm-embedded)
  438. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  439. endif
  440. ifeq ($(FULL_TARGET),arm-symbian)
  441. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  442. endif
  443. ifeq ($(FULL_TARGET),powerpc64-linux)
  444. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  445. endif
  446. ifeq ($(FULL_TARGET),powerpc64-darwin)
  447. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  448. endif
  449. ifeq ($(FULL_TARGET),powerpc64-embedded)
  450. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  451. endif
  452. ifeq ($(FULL_TARGET),avr-embedded)
  453. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  454. endif
  455. ifeq ($(FULL_TARGET),armeb-linux)
  456. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  457. endif
  458. ifeq ($(FULL_TARGET),armeb-embedded)
  459. override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) # objpas macpas strings
  460. endif
  461. override INSTALL_FPCPACKAGE=y
  462. ifeq ($(FULL_TARGET),i386-linux)
  463. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  464. endif
  465. ifeq ($(FULL_TARGET),i386-go32v2)
  466. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  467. endif
  468. ifeq ($(FULL_TARGET),i386-win32)
  469. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  470. endif
  471. ifeq ($(FULL_TARGET),i386-os2)
  472. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  473. endif
  474. ifeq ($(FULL_TARGET),i386-freebsd)
  475. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  476. endif
  477. ifeq ($(FULL_TARGET),i386-beos)
  478. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  479. endif
  480. ifeq ($(FULL_TARGET),i386-haiku)
  481. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  482. endif
  483. ifeq ($(FULL_TARGET),i386-netbsd)
  484. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  485. endif
  486. ifeq ($(FULL_TARGET),i386-solaris)
  487. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  488. endif
  489. ifeq ($(FULL_TARGET),i386-qnx)
  490. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  491. endif
  492. ifeq ($(FULL_TARGET),i386-netware)
  493. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  494. endif
  495. ifeq ($(FULL_TARGET),i386-openbsd)
  496. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  497. endif
  498. ifeq ($(FULL_TARGET),i386-wdosx)
  499. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  500. endif
  501. ifeq ($(FULL_TARGET),i386-darwin)
  502. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  503. endif
  504. ifeq ($(FULL_TARGET),i386-emx)
  505. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  506. endif
  507. ifeq ($(FULL_TARGET),i386-watcom)
  508. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  509. endif
  510. ifeq ($(FULL_TARGET),i386-netwlibc)
  511. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  512. endif
  513. ifeq ($(FULL_TARGET),i386-wince)
  514. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  515. endif
  516. ifeq ($(FULL_TARGET),i386-embedded)
  517. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  518. endif
  519. ifeq ($(FULL_TARGET),i386-symbian)
  520. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  521. endif
  522. ifeq ($(FULL_TARGET),m68k-linux)
  523. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  524. endif
  525. ifeq ($(FULL_TARGET),m68k-freebsd)
  526. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  527. endif
  528. ifeq ($(FULL_TARGET),m68k-netbsd)
  529. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  530. endif
  531. ifeq ($(FULL_TARGET),m68k-amiga)
  532. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  533. endif
  534. ifeq ($(FULL_TARGET),m68k-atari)
  535. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  536. endif
  537. ifeq ($(FULL_TARGET),m68k-openbsd)
  538. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  539. endif
  540. ifeq ($(FULL_TARGET),m68k-palmos)
  541. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  542. endif
  543. ifeq ($(FULL_TARGET),m68k-embedded)
  544. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  545. endif
  546. ifeq ($(FULL_TARGET),powerpc-linux)
  547. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  548. endif
  549. ifeq ($(FULL_TARGET),powerpc-netbsd)
  550. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  551. endif
  552. ifeq ($(FULL_TARGET),powerpc-amiga)
  553. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  554. endif
  555. ifeq ($(FULL_TARGET),powerpc-macos)
  556. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  557. endif
  558. ifeq ($(FULL_TARGET),powerpc-darwin)
  559. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  560. endif
  561. ifeq ($(FULL_TARGET),powerpc-morphos)
  562. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  563. endif
  564. ifeq ($(FULL_TARGET),powerpc-embedded)
  565. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  566. endif
  567. ifeq ($(FULL_TARGET),sparc-linux)
  568. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  569. endif
  570. ifeq ($(FULL_TARGET),sparc-netbsd)
  571. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  572. endif
  573. ifeq ($(FULL_TARGET),sparc-solaris)
  574. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  575. endif
  576. ifeq ($(FULL_TARGET),sparc-embedded)
  577. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  578. endif
  579. ifeq ($(FULL_TARGET),x86_64-linux)
  580. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  581. endif
  582. ifeq ($(FULL_TARGET),x86_64-freebsd)
  583. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  584. endif
  585. ifeq ($(FULL_TARGET),x86_64-darwin)
  586. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  587. endif
  588. ifeq ($(FULL_TARGET),x86_64-win64)
  589. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  590. endif
  591. ifeq ($(FULL_TARGET),x86_64-embedded)
  592. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  593. endif
  594. ifeq ($(FULL_TARGET),arm-linux)
  595. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  596. endif
  597. ifeq ($(FULL_TARGET),arm-palmos)
  598. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  599. endif
  600. ifeq ($(FULL_TARGET),arm-darwin)
  601. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  602. endif
  603. ifeq ($(FULL_TARGET),arm-wince)
  604. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  605. endif
  606. ifeq ($(FULL_TARGET),arm-gba)
  607. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  608. endif
  609. ifeq ($(FULL_TARGET),arm-nds)
  610. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  611. endif
  612. ifeq ($(FULL_TARGET),arm-embedded)
  613. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  614. endif
  615. ifeq ($(FULL_TARGET),arm-symbian)
  616. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  617. endif
  618. ifeq ($(FULL_TARGET),powerpc64-linux)
  619. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  620. endif
  621. ifeq ($(FULL_TARGET),powerpc64-darwin)
  622. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  623. endif
  624. ifeq ($(FULL_TARGET),powerpc64-embedded)
  625. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  626. endif
  627. ifeq ($(FULL_TARGET),avr-embedded)
  628. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  629. endif
  630. ifeq ($(FULL_TARGET),armeb-linux)
  631. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  632. endif
  633. ifeq ($(FULL_TARGET),armeb-embedded)
  634. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  635. endif
  636. ifeq ($(FULL_TARGET),i386-linux)
  637. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  638. endif
  639. ifeq ($(FULL_TARGET),i386-go32v2)
  640. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  641. endif
  642. ifeq ($(FULL_TARGET),i386-win32)
  643. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  644. endif
  645. ifeq ($(FULL_TARGET),i386-os2)
  646. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  647. endif
  648. ifeq ($(FULL_TARGET),i386-freebsd)
  649. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  650. endif
  651. ifeq ($(FULL_TARGET),i386-beos)
  652. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  653. endif
  654. ifeq ($(FULL_TARGET),i386-haiku)
  655. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  656. endif
  657. ifeq ($(FULL_TARGET),i386-netbsd)
  658. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  659. endif
  660. ifeq ($(FULL_TARGET),i386-solaris)
  661. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  662. endif
  663. ifeq ($(FULL_TARGET),i386-qnx)
  664. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  665. endif
  666. ifeq ($(FULL_TARGET),i386-netware)
  667. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  668. endif
  669. ifeq ($(FULL_TARGET),i386-openbsd)
  670. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  671. endif
  672. ifeq ($(FULL_TARGET),i386-wdosx)
  673. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  674. endif
  675. ifeq ($(FULL_TARGET),i386-darwin)
  676. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  677. endif
  678. ifeq ($(FULL_TARGET),i386-emx)
  679. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  680. endif
  681. ifeq ($(FULL_TARGET),i386-watcom)
  682. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  683. endif
  684. ifeq ($(FULL_TARGET),i386-netwlibc)
  685. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  686. endif
  687. ifeq ($(FULL_TARGET),i386-wince)
  688. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  689. endif
  690. ifeq ($(FULL_TARGET),i386-embedded)
  691. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  692. endif
  693. ifeq ($(FULL_TARGET),i386-symbian)
  694. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  695. endif
  696. ifeq ($(FULL_TARGET),m68k-linux)
  697. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  698. endif
  699. ifeq ($(FULL_TARGET),m68k-freebsd)
  700. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  701. endif
  702. ifeq ($(FULL_TARGET),m68k-netbsd)
  703. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  704. endif
  705. ifeq ($(FULL_TARGET),m68k-amiga)
  706. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  707. endif
  708. ifeq ($(FULL_TARGET),m68k-atari)
  709. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  710. endif
  711. ifeq ($(FULL_TARGET),m68k-openbsd)
  712. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  713. endif
  714. ifeq ($(FULL_TARGET),m68k-palmos)
  715. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  716. endif
  717. ifeq ($(FULL_TARGET),m68k-embedded)
  718. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  719. endif
  720. ifeq ($(FULL_TARGET),powerpc-linux)
  721. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  722. endif
  723. ifeq ($(FULL_TARGET),powerpc-netbsd)
  724. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  725. endif
  726. ifeq ($(FULL_TARGET),powerpc-amiga)
  727. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  728. endif
  729. ifeq ($(FULL_TARGET),powerpc-macos)
  730. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  731. endif
  732. ifeq ($(FULL_TARGET),powerpc-darwin)
  733. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  734. endif
  735. ifeq ($(FULL_TARGET),powerpc-morphos)
  736. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  737. endif
  738. ifeq ($(FULL_TARGET),powerpc-embedded)
  739. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  740. endif
  741. ifeq ($(FULL_TARGET),sparc-linux)
  742. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  743. endif
  744. ifeq ($(FULL_TARGET),sparc-netbsd)
  745. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  746. endif
  747. ifeq ($(FULL_TARGET),sparc-solaris)
  748. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  749. endif
  750. ifeq ($(FULL_TARGET),sparc-embedded)
  751. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  752. endif
  753. ifeq ($(FULL_TARGET),x86_64-linux)
  754. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  755. endif
  756. ifeq ($(FULL_TARGET),x86_64-freebsd)
  757. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  758. endif
  759. ifeq ($(FULL_TARGET),x86_64-darwin)
  760. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  761. endif
  762. ifeq ($(FULL_TARGET),x86_64-win64)
  763. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  764. endif
  765. ifeq ($(FULL_TARGET),x86_64-embedded)
  766. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  767. endif
  768. ifeq ($(FULL_TARGET),arm-linux)
  769. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  770. endif
  771. ifeq ($(FULL_TARGET),arm-palmos)
  772. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  773. endif
  774. ifeq ($(FULL_TARGET),arm-darwin)
  775. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  776. endif
  777. ifeq ($(FULL_TARGET),arm-wince)
  778. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  779. endif
  780. ifeq ($(FULL_TARGET),arm-gba)
  781. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  782. endif
  783. ifeq ($(FULL_TARGET),arm-nds)
  784. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  785. endif
  786. ifeq ($(FULL_TARGET),arm-embedded)
  787. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  788. endif
  789. ifeq ($(FULL_TARGET),arm-symbian)
  790. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  791. endif
  792. ifeq ($(FULL_TARGET),powerpc64-linux)
  793. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  794. endif
  795. ifeq ($(FULL_TARGET),powerpc64-darwin)
  796. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  797. endif
  798. ifeq ($(FULL_TARGET),powerpc64-embedded)
  799. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  800. endif
  801. ifeq ($(FULL_TARGET),avr-embedded)
  802. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  803. endif
  804. ifeq ($(FULL_TARGET),armeb-linux)
  805. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  806. endif
  807. ifeq ($(FULL_TARGET),armeb-embedded)
  808. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON) $(ARCH)
  809. endif
  810. ifdef REQUIRE_UNITSDIR
  811. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  812. endif
  813. ifdef REQUIRE_PACKAGESDIR
  814. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  815. endif
  816. ifdef ZIPINSTALL
  817. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  818. UNIXHier=1
  819. endif
  820. else
  821. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  822. UNIXHier=1
  823. endif
  824. endif
  825. ifndef INSTALL_PREFIX
  826. ifdef PREFIX
  827. INSTALL_PREFIX=$(PREFIX)
  828. endif
  829. endif
  830. ifndef INSTALL_PREFIX
  831. ifdef UNIXHier
  832. INSTALL_PREFIX=/usr/local
  833. else
  834. ifdef INSTALL_FPCPACKAGE
  835. INSTALL_BASEDIR:=/pp
  836. else
  837. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  838. endif
  839. endif
  840. endif
  841. export INSTALL_PREFIX
  842. ifdef INSTALL_FPCSUBDIR
  843. export INSTALL_FPCSUBDIR
  844. endif
  845. ifndef DIST_DESTDIR
  846. DIST_DESTDIR:=$(BASEDIR)
  847. endif
  848. export DIST_DESTDIR
  849. ifndef COMPILER_UNITTARGETDIR
  850. ifdef PACKAGEDIR_MAIN
  851. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  852. else
  853. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  854. endif
  855. endif
  856. ifndef COMPILER_TARGETDIR
  857. COMPILER_TARGETDIR=.
  858. endif
  859. ifndef INSTALL_BASEDIR
  860. ifdef UNIXHier
  861. ifdef INSTALL_FPCPACKAGE
  862. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  863. else
  864. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  865. endif
  866. else
  867. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  868. endif
  869. endif
  870. ifndef INSTALL_BINDIR
  871. ifdef UNIXHier
  872. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  873. else
  874. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  875. ifdef INSTALL_FPCPACKAGE
  876. ifdef CROSSCOMPILE
  877. ifdef CROSSINSTALL
  878. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  879. else
  880. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  881. endif
  882. else
  883. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  884. endif
  885. endif
  886. endif
  887. endif
  888. ifndef INSTALL_UNITDIR
  889. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  890. ifdef INSTALL_FPCPACKAGE
  891. ifdef PACKAGE_NAME
  892. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  893. endif
  894. endif
  895. endif
  896. ifndef INSTALL_LIBDIR
  897. ifdef UNIXHier
  898. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  899. else
  900. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  901. endif
  902. endif
  903. ifndef INSTALL_SOURCEDIR
  904. ifdef UNIXHier
  905. ifdef BSDhier
  906. SRCPREFIXDIR=share/src
  907. else
  908. ifdef linuxHier
  909. SRCPREFIXDIR=share/src
  910. else
  911. SRCPREFIXDIR=src
  912. endif
  913. endif
  914. ifdef INSTALL_FPCPACKAGE
  915. ifdef INSTALL_FPCSUBDIR
  916. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  917. else
  918. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  919. endif
  920. else
  921. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  922. endif
  923. else
  924. ifdef INSTALL_FPCPACKAGE
  925. ifdef INSTALL_FPCSUBDIR
  926. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  927. else
  928. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  929. endif
  930. else
  931. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  932. endif
  933. endif
  934. endif
  935. ifndef INSTALL_DOCDIR
  936. ifdef UNIXHier
  937. ifdef BSDhier
  938. DOCPREFIXDIR=share/doc
  939. else
  940. ifdef linuxHier
  941. DOCPREFIXDIR=share/doc
  942. else
  943. DOCPREFIXDIR=doc
  944. endif
  945. endif
  946. ifdef INSTALL_FPCPACKAGE
  947. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  948. else
  949. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  950. endif
  951. else
  952. ifdef INSTALL_FPCPACKAGE
  953. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  954. else
  955. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  956. endif
  957. endif
  958. endif
  959. ifndef INSTALL_EXAMPLEDIR
  960. ifdef UNIXHier
  961. ifdef INSTALL_FPCPACKAGE
  962. ifdef BSDhier
  963. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  964. else
  965. ifdef linuxHier
  966. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  967. else
  968. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  969. endif
  970. endif
  971. else
  972. ifdef BSDhier
  973. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  974. else
  975. ifdef linuxHier
  976. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  977. else
  978. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  979. endif
  980. endif
  981. endif
  982. else
  983. ifdef INSTALL_FPCPACKAGE
  984. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  985. else
  986. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  987. endif
  988. endif
  989. endif
  990. ifndef INSTALL_DATADIR
  991. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  992. endif
  993. ifndef INSTALL_SHAREDDIR
  994. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  995. endif
  996. ifdef CROSSCOMPILE
  997. ifndef CROSSBINDIR
  998. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  999. ifeq ($(CROSSBINDIR),)
  1000. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  1001. endif
  1002. endif
  1003. else
  1004. CROSSBINDIR=
  1005. endif
  1006. BATCHEXT=.bat
  1007. LOADEREXT=.as
  1008. EXEEXT=.exe
  1009. PPLEXT=.ppl
  1010. PPUEXT=.ppu
  1011. OEXT=.o
  1012. ASMEXT=.s
  1013. SMARTEXT=.sl
  1014. STATICLIBEXT=.a
  1015. SHAREDLIBEXT=.so
  1016. SHAREDLIBPREFIX=libfp
  1017. STATICLIBPREFIX=libp
  1018. IMPORTLIBPREFIX=libimp
  1019. RSTEXT=.rst
  1020. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  1021. ifeq ($(OS_TARGET),go32v1)
  1022. STATICLIBPREFIX=
  1023. SHORTSUFFIX=v1
  1024. endif
  1025. ifeq ($(OS_TARGET),go32v2)
  1026. STATICLIBPREFIX=
  1027. SHORTSUFFIX=dos
  1028. IMPORTLIBPREFIX=
  1029. endif
  1030. ifeq ($(OS_TARGET),watcom)
  1031. STATICLIBPREFIX=
  1032. OEXT=.obj
  1033. ASMEXT=.asm
  1034. SHAREDLIBEXT=.dll
  1035. SHORTSUFFIX=wat
  1036. IMPORTLIBPREFIX=
  1037. endif
  1038. ifeq ($(OS_TARGET),linux)
  1039. BATCHEXT=.sh
  1040. EXEEXT=
  1041. HASSHAREDLIB=1
  1042. SHORTSUFFIX=lnx
  1043. endif
  1044. ifeq ($(OS_TARGET),freebsd)
  1045. BATCHEXT=.sh
  1046. EXEEXT=
  1047. HASSHAREDLIB=1
  1048. SHORTSUFFIX=fbs
  1049. endif
  1050. ifeq ($(OS_TARGET),netbsd)
  1051. BATCHEXT=.sh
  1052. EXEEXT=
  1053. HASSHAREDLIB=1
  1054. SHORTSUFFIX=nbs
  1055. endif
  1056. ifeq ($(OS_TARGET),openbsd)
  1057. BATCHEXT=.sh
  1058. EXEEXT=
  1059. HASSHAREDLIB=1
  1060. SHORTSUFFIX=obs
  1061. endif
  1062. ifeq ($(OS_TARGET),win32)
  1063. SHAREDLIBEXT=.dll
  1064. SHORTSUFFIX=w32
  1065. endif
  1066. ifeq ($(OS_TARGET),os2)
  1067. BATCHEXT=.cmd
  1068. AOUTEXT=.out
  1069. STATICLIBPREFIX=
  1070. SHAREDLIBEXT=.dll
  1071. SHORTSUFFIX=os2
  1072. ECHO=echo
  1073. IMPORTLIBPREFIX=
  1074. endif
  1075. ifeq ($(OS_TARGET),emx)
  1076. BATCHEXT=.cmd
  1077. AOUTEXT=.out
  1078. STATICLIBPREFIX=
  1079. SHAREDLIBEXT=.dll
  1080. SHORTSUFFIX=emx
  1081. ECHO=echo
  1082. IMPORTLIBPREFIX=
  1083. endif
  1084. ifeq ($(OS_TARGET),amiga)
  1085. EXEEXT=
  1086. SHAREDLIBEXT=.library
  1087. SHORTSUFFIX=amg
  1088. endif
  1089. ifeq ($(OS_TARGET),morphos)
  1090. EXEEXT=
  1091. SHAREDLIBEXT=.library
  1092. SHORTSUFFIX=mos
  1093. endif
  1094. ifeq ($(OS_TARGET),atari)
  1095. EXEEXT=.ttp
  1096. SHORTSUFFIX=ata
  1097. endif
  1098. ifeq ($(OS_TARGET),beos)
  1099. BATCHEXT=.sh
  1100. EXEEXT=
  1101. SHORTSUFFIX=be
  1102. endif
  1103. ifeq ($(OS_TARGET),haiku)
  1104. BATCHEXT=.sh
  1105. EXEEXT=
  1106. SHORTSUFFIX=hai
  1107. endif
  1108. ifeq ($(OS_TARGET),solaris)
  1109. BATCHEXT=.sh
  1110. EXEEXT=
  1111. SHORTSUFFIX=sun
  1112. endif
  1113. ifeq ($(OS_TARGET),qnx)
  1114. BATCHEXT=.sh
  1115. EXEEXT=
  1116. SHORTSUFFIX=qnx
  1117. endif
  1118. ifeq ($(OS_TARGET),netware)
  1119. EXEEXT=.nlm
  1120. STATICLIBPREFIX=
  1121. SHORTSUFFIX=nw
  1122. IMPORTLIBPREFIX=imp
  1123. endif
  1124. ifeq ($(OS_TARGET),netwlibc)
  1125. EXEEXT=.nlm
  1126. STATICLIBPREFIX=
  1127. SHORTSUFFIX=nwl
  1128. IMPORTLIBPREFIX=imp
  1129. endif
  1130. ifeq ($(OS_TARGET),macos)
  1131. BATCHEXT=
  1132. EXEEXT=
  1133. DEBUGSYMEXT=.xcoff
  1134. SHORTSUFFIX=mac
  1135. IMPORTLIBPREFIX=imp
  1136. endif
  1137. ifeq ($(OS_TARGET),darwin)
  1138. BATCHEXT=.sh
  1139. EXEEXT=
  1140. HASSHAREDLIB=1
  1141. SHORTSUFFIX=dwn
  1142. endif
  1143. ifeq ($(OS_TARGET),gba)
  1144. EXEEXT=.gba
  1145. SHAREDLIBEXT=.so
  1146. SHORTSUFFIX=gba
  1147. endif
  1148. ifeq ($(OS_TARGET),symbian)
  1149. SHAREDLIBEXT=.dll
  1150. SHORTSUFFIX=symbian
  1151. endif
  1152. else
  1153. ifeq ($(OS_TARGET),go32v1)
  1154. PPUEXT=.pp1
  1155. OEXT=.o1
  1156. ASMEXT=.s1
  1157. SMARTEXT=.sl1
  1158. STATICLIBEXT=.a1
  1159. SHAREDLIBEXT=.so1
  1160. STATICLIBPREFIX=
  1161. SHORTSUFFIX=v1
  1162. IMPORTLIBPREFIX=
  1163. endif
  1164. ifeq ($(OS_TARGET),go32v2)
  1165. STATICLIBPREFIX=
  1166. SHORTSUFFIX=dos
  1167. IMPORTLIBPREFIX=
  1168. endif
  1169. ifeq ($(OS_TARGET),watcom)
  1170. STATICLIBPREFIX=
  1171. SHORTSUFFIX=wat
  1172. IMPORTLIBPREFIX=
  1173. endif
  1174. ifeq ($(OS_TARGET),linux)
  1175. BATCHEXT=.sh
  1176. EXEEXT=
  1177. HASSHAREDLIB=1
  1178. SHORTSUFFIX=lnx
  1179. endif
  1180. ifeq ($(OS_TARGET),freebsd)
  1181. BATCHEXT=.sh
  1182. EXEEXT=
  1183. HASSHAREDLIB=1
  1184. SHORTSUFFIX=fbs
  1185. endif
  1186. ifeq ($(OS_TARGET),netbsd)
  1187. BATCHEXT=.sh
  1188. EXEEXT=
  1189. HASSHAREDLIB=1
  1190. SHORTSUFFIX=nbs
  1191. endif
  1192. ifeq ($(OS_TARGET),openbsd)
  1193. BATCHEXT=.sh
  1194. EXEEXT=
  1195. HASSHAREDLIB=1
  1196. SHORTSUFFIX=obs
  1197. endif
  1198. ifeq ($(OS_TARGET),win32)
  1199. PPUEXT=.ppw
  1200. OEXT=.ow
  1201. ASMEXT=.sw
  1202. SMARTEXT=.slw
  1203. STATICLIBEXT=.aw
  1204. SHAREDLIBEXT=.dll
  1205. SHORTSUFFIX=w32
  1206. endif
  1207. ifeq ($(OS_TARGET),os2)
  1208. BATCHEXT=.cmd
  1209. PPUEXT=.ppo
  1210. ASMEXT=.so2
  1211. OEXT=.oo2
  1212. AOUTEXT=.out
  1213. SMARTEXT=.sl2
  1214. STATICLIBPREFIX=
  1215. STATICLIBEXT=.ao2
  1216. SHAREDLIBEXT=.dll
  1217. SHORTSUFFIX=os2
  1218. ECHO=echo
  1219. IMPORTLIBPREFIX=
  1220. endif
  1221. ifeq ($(OS_TARGET),amiga)
  1222. EXEEXT=
  1223. PPUEXT=.ppu
  1224. ASMEXT=.s
  1225. OEXT=.o
  1226. SMARTEXT=.sl
  1227. STATICLIBEXT=.a
  1228. SHAREDLIBEXT=.library
  1229. SHORTSUFFIX=amg
  1230. endif
  1231. ifeq ($(OS_TARGET),atari)
  1232. PPUEXT=.ppu
  1233. ASMEXT=.s
  1234. OEXT=.o
  1235. SMARTEXT=.sl
  1236. STATICLIBEXT=.a
  1237. EXEEXT=.ttp
  1238. SHORTSUFFIX=ata
  1239. endif
  1240. ifeq ($(OS_TARGET),beos)
  1241. BATCHEXT=.sh
  1242. PPUEXT=.ppu
  1243. ASMEXT=.s
  1244. OEXT=.o
  1245. SMARTEXT=.sl
  1246. STATICLIBEXT=.a
  1247. EXEEXT=
  1248. SHORTSUFFIX=be
  1249. endif
  1250. ifeq ($(OS_TARGET),solaris)
  1251. BATCHEXT=.sh
  1252. PPUEXT=.ppu
  1253. ASMEXT=.s
  1254. OEXT=.o
  1255. SMARTEXT=.sl
  1256. STATICLIBEXT=.a
  1257. EXEEXT=
  1258. SHORTSUFFIX=sun
  1259. endif
  1260. ifeq ($(OS_TARGET),qnx)
  1261. BATCHEXT=.sh
  1262. PPUEXT=.ppu
  1263. ASMEXT=.s
  1264. OEXT=.o
  1265. SMARTEXT=.sl
  1266. STATICLIBEXT=.a
  1267. EXEEXT=
  1268. SHORTSUFFIX=qnx
  1269. endif
  1270. ifeq ($(OS_TARGET),netware)
  1271. STATICLIBPREFIX=
  1272. PPUEXT=.ppu
  1273. OEXT=.o
  1274. ASMEXT=.s
  1275. SMARTEXT=.sl
  1276. STATICLIBEXT=.a
  1277. SHAREDLIBEXT=.nlm
  1278. EXEEXT=.nlm
  1279. SHORTSUFFIX=nw
  1280. IMPORTLIBPREFIX=imp
  1281. endif
  1282. ifeq ($(OS_TARGET),netwlibc)
  1283. STATICLIBPREFIX=
  1284. PPUEXT=.ppu
  1285. OEXT=.o
  1286. ASMEXT=.s
  1287. SMARTEXT=.sl
  1288. STATICLIBEXT=.a
  1289. SHAREDLIBEXT=.nlm
  1290. EXEEXT=.nlm
  1291. SHORTSUFFIX=nwl
  1292. IMPORTLIBPREFIX=imp
  1293. endif
  1294. ifeq ($(OS_TARGET),macos)
  1295. BATCHEXT=
  1296. PPUEXT=.ppu
  1297. ASMEXT=.s
  1298. OEXT=.o
  1299. SMARTEXT=.sl
  1300. STATICLIBEXT=.a
  1301. EXEEXT=
  1302. DEBUGSYMEXT=.xcoff
  1303. SHORTSUFFIX=mac
  1304. IMPORTLIBPREFIX=imp
  1305. endif
  1306. endif
  1307. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  1308. FPCMADE=fpcmade.$(SHORTSUFFIX)
  1309. ZIPSUFFIX=$(SHORTSUFFIX)
  1310. ZIPCROSSPREFIX=
  1311. ZIPSOURCESUFFIX=src
  1312. ZIPEXAMPLESUFFIX=exm
  1313. else
  1314. FPCMADE=fpcmade.$(TARGETSUFFIX)
  1315. ZIPSOURCESUFFIX=.source
  1316. ZIPEXAMPLESUFFIX=.examples
  1317. ifdef CROSSCOMPILE
  1318. ZIPSUFFIX=.$(SOURCESUFFIX)
  1319. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  1320. else
  1321. ZIPSUFFIX=.$(TARGETSUFFIX)
  1322. ZIPCROSSPREFIX=
  1323. endif
  1324. endif
  1325. ifndef ECHO
  1326. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  1327. ifeq ($(ECHO),)
  1328. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  1329. ifeq ($(ECHO),)
  1330. ECHO= __missing_command_ECHO
  1331. else
  1332. ECHO:=$(firstword $(ECHO))
  1333. endif
  1334. else
  1335. ECHO:=$(firstword $(ECHO))
  1336. endif
  1337. endif
  1338. export ECHO
  1339. ifndef DATE
  1340. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  1341. ifeq ($(DATE),)
  1342. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  1343. ifeq ($(DATE),)
  1344. DATE= __missing_command_DATE
  1345. else
  1346. DATE:=$(firstword $(DATE))
  1347. endif
  1348. else
  1349. DATE:=$(firstword $(DATE))
  1350. endif
  1351. endif
  1352. export DATE
  1353. ifndef GINSTALL
  1354. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  1355. ifeq ($(GINSTALL),)
  1356. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  1357. ifeq ($(GINSTALL),)
  1358. GINSTALL= __missing_command_GINSTALL
  1359. else
  1360. GINSTALL:=$(firstword $(GINSTALL))
  1361. endif
  1362. else
  1363. GINSTALL:=$(firstword $(GINSTALL))
  1364. endif
  1365. endif
  1366. export GINSTALL
  1367. ifndef CPPROG
  1368. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  1369. ifeq ($(CPPROG),)
  1370. CPPROG= __missing_command_CPPROG
  1371. else
  1372. CPPROG:=$(firstword $(CPPROG))
  1373. endif
  1374. endif
  1375. export CPPROG
  1376. ifndef RMPROG
  1377. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  1378. ifeq ($(RMPROG),)
  1379. RMPROG= __missing_command_RMPROG
  1380. else
  1381. RMPROG:=$(firstword $(RMPROG))
  1382. endif
  1383. endif
  1384. export RMPROG
  1385. ifndef MVPROG
  1386. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  1387. ifeq ($(MVPROG),)
  1388. MVPROG= __missing_command_MVPROG
  1389. else
  1390. MVPROG:=$(firstword $(MVPROG))
  1391. endif
  1392. endif
  1393. export MVPROG
  1394. ifndef MKDIRPROG
  1395. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1396. ifeq ($(MKDIRPROG),)
  1397. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1398. ifeq ($(MKDIRPROG),)
  1399. MKDIRPROG= __missing_command_MKDIRPROG
  1400. else
  1401. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1402. endif
  1403. else
  1404. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1405. endif
  1406. endif
  1407. export MKDIRPROG
  1408. ifndef ECHOREDIR
  1409. ifndef inUnix
  1410. ECHOREDIR=echo
  1411. else
  1412. ECHOREDIR=$(ECHO)
  1413. endif
  1414. endif
  1415. ifndef COPY
  1416. COPY:=$(CPPROG) -fp
  1417. endif
  1418. ifndef COPYTREE
  1419. COPYTREE:=$(CPPROG) -Rfp
  1420. endif
  1421. ifndef MKDIRTREE
  1422. MKDIRTREE:=$(MKDIRPROG) -p
  1423. endif
  1424. ifndef MOVE
  1425. MOVE:=$(MVPROG) -f
  1426. endif
  1427. ifndef DEL
  1428. DEL:=$(RMPROG) -f
  1429. endif
  1430. ifndef DELTREE
  1431. DELTREE:=$(RMPROG) -rf
  1432. endif
  1433. ifndef INSTALL
  1434. ifdef inUnix
  1435. INSTALL:=$(GINSTALL) -c -m 644
  1436. else
  1437. INSTALL:=$(COPY)
  1438. endif
  1439. endif
  1440. ifndef INSTALLEXE
  1441. ifdef inUnix
  1442. INSTALLEXE:=$(GINSTALL) -c -m 755
  1443. else
  1444. INSTALLEXE:=$(COPY)
  1445. endif
  1446. endif
  1447. ifndef MKDIR
  1448. MKDIR:=$(GINSTALL) -m 755 -d
  1449. endif
  1450. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  1451. ifndef PPUMOVE
  1452. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  1453. ifeq ($(PPUMOVE),)
  1454. PPUMOVE= __missing_command_PPUMOVE
  1455. else
  1456. PPUMOVE:=$(firstword $(PPUMOVE))
  1457. endif
  1458. endif
  1459. export PPUMOVE
  1460. ifndef FPCMAKE
  1461. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  1462. ifeq ($(FPCMAKE),)
  1463. FPCMAKE= __missing_command_FPCMAKE
  1464. else
  1465. FPCMAKE:=$(firstword $(FPCMAKE))
  1466. endif
  1467. endif
  1468. export FPCMAKE
  1469. ifndef ZIPPROG
  1470. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  1471. ifeq ($(ZIPPROG),)
  1472. ZIPPROG= __missing_command_ZIPPROG
  1473. else
  1474. ZIPPROG:=$(firstword $(ZIPPROG))
  1475. endif
  1476. endif
  1477. export ZIPPROG
  1478. ifndef TARPROG
  1479. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  1480. ifeq ($(TARPROG),)
  1481. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  1482. ifeq ($(TARPROG),)
  1483. TARPROG= __missing_command_TARPROG
  1484. else
  1485. TARPROG:=$(firstword $(TARPROG))
  1486. endif
  1487. else
  1488. TARPROG:=$(firstword $(TARPROG))
  1489. endif
  1490. endif
  1491. export TARPROG
  1492. ASNAME=$(BINUTILSPREFIX)as
  1493. LDNAME=$(BINUTILSPREFIX)ld
  1494. ARNAME=$(BINUTILSPREFIX)ar
  1495. RCNAME=$(BINUTILSPREFIX)rc
  1496. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  1497. ifeq ($(OS_TARGET),win32)
  1498. ifeq ($(CROSSBINDIR),)
  1499. ASNAME=asw
  1500. LDNAME=ldw
  1501. ARNAME=arw
  1502. endif
  1503. endif
  1504. endif
  1505. ifndef ASPROG
  1506. ifdef CROSSBINDIR
  1507. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  1508. else
  1509. ASPROG=$(ASNAME)
  1510. endif
  1511. endif
  1512. ifndef LDPROG
  1513. ifdef CROSSBINDIR
  1514. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  1515. else
  1516. LDPROG=$(LDNAME)
  1517. endif
  1518. endif
  1519. ifndef RCPROG
  1520. ifdef CROSSBINDIR
  1521. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  1522. else
  1523. RCPROG=$(RCNAME)
  1524. endif
  1525. endif
  1526. ifndef ARPROG
  1527. ifdef CROSSBINDIR
  1528. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  1529. else
  1530. ARPROG=$(ARNAME)
  1531. endif
  1532. endif
  1533. AS=$(ASPROG)
  1534. LD=$(LDPROG)
  1535. RC=$(RCPROG)
  1536. AR=$(ARPROG)
  1537. PPAS=ppas$(SRCBATCHEXT)
  1538. ifdef inUnix
  1539. LDCONFIG=ldconfig
  1540. else
  1541. LDCONFIG=
  1542. endif
  1543. ifdef DATE
  1544. DATESTR:=$(shell $(DATE) +%Y%m%d)
  1545. else
  1546. DATESTR=
  1547. endif
  1548. ifndef UPXPROG
  1549. ifeq ($(OS_TARGET),go32v2)
  1550. UPXPROG:=1
  1551. endif
  1552. ifeq ($(OS_TARGET),win32)
  1553. UPXPROG:=1
  1554. endif
  1555. ifdef UPXPROG
  1556. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  1557. ifeq ($(UPXPROG),)
  1558. UPXPROG=
  1559. else
  1560. UPXPROG:=$(firstword $(UPXPROG))
  1561. endif
  1562. else
  1563. UPXPROG=
  1564. endif
  1565. endif
  1566. export UPXPROG
  1567. ZIPOPT=-9
  1568. ZIPEXT=.zip
  1569. ifeq ($(USETAR),bz2)
  1570. TAROPT=vj
  1571. TAREXT=.tar.bz2
  1572. else
  1573. TAROPT=vz
  1574. TAREXT=.tar.gz
  1575. endif
  1576. ifndef NOCPUDEF
  1577. override FPCOPTDEF=$(ARCH)
  1578. endif
  1579. ifneq ($(OS_TARGET),$(OS_SOURCE))
  1580. override FPCOPT+=-T$(OS_TARGET)
  1581. endif
  1582. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  1583. override FPCOPT+=-P$(ARCH)
  1584. endif
  1585. ifeq ($(OS_SOURCE),openbsd)
  1586. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  1587. endif
  1588. ifndef CROSSBOOTSTRAP
  1589. ifneq ($(BINUTILSPREFIX),)
  1590. override FPCOPT+=-XP$(BINUTILSPREFIX)
  1591. endif
  1592. ifneq ($(BINUTILSPREFIX),)
  1593. override FPCOPT+=-Xr$(RLINKPATH)
  1594. endif
  1595. endif
  1596. ifdef UNITDIR
  1597. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  1598. endif
  1599. ifdef LIBDIR
  1600. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  1601. endif
  1602. ifdef OBJDIR
  1603. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  1604. endif
  1605. ifdef INCDIR
  1606. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  1607. endif
  1608. ifdef LINKSMART
  1609. override FPCOPT+=-XX
  1610. endif
  1611. ifdef CREATESMART
  1612. override FPCOPT+=-CX
  1613. endif
  1614. ifdef DEBUG
  1615. override FPCOPT+=-gl
  1616. override FPCOPTDEF+=DEBUG
  1617. endif
  1618. ifdef RELEASE
  1619. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  1620. ifeq ($(CPU_TARGET),i386)
  1621. FPCCPUOPT:=-OG2p3
  1622. endif
  1623. ifeq ($(CPU_TARGET),powerpc)
  1624. FPCCPUOPT:=-O1r
  1625. endif
  1626. else
  1627. FPCCPUOPT:=-O2
  1628. endif
  1629. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  1630. override FPCOPTDEF+=RELEASE
  1631. endif
  1632. ifdef STRIP
  1633. override FPCOPT+=-Xs
  1634. endif
  1635. ifdef OPTIMIZE
  1636. override FPCOPT+=-O2
  1637. endif
  1638. ifdef VERBOSE
  1639. override FPCOPT+=-vwni
  1640. endif
  1641. ifdef COMPILER_OPTIONS
  1642. override FPCOPT+=$(COMPILER_OPTIONS)
  1643. endif
  1644. ifdef COMPILER_UNITDIR
  1645. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  1646. endif
  1647. ifdef COMPILER_LIBRARYDIR
  1648. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  1649. endif
  1650. ifdef COMPILER_OBJECTDIR
  1651. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  1652. endif
  1653. ifdef COMPILER_INCLUDEDIR
  1654. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1655. endif
  1656. ifdef CROSSBINDIR
  1657. override FPCOPT+=-FD$(CROSSBINDIR)
  1658. endif
  1659. ifdef COMPILER_TARGETDIR
  1660. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1661. ifeq ($(COMPILER_TARGETDIR),.)
  1662. override TARGETDIRPREFIX=
  1663. else
  1664. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1665. endif
  1666. endif
  1667. ifdef COMPILER_UNITTARGETDIR
  1668. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1669. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1670. override UNITTARGETDIRPREFIX=
  1671. else
  1672. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1673. endif
  1674. else
  1675. ifdef COMPILER_TARGETDIR
  1676. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1677. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1678. endif
  1679. endif
  1680. ifdef CREATESHARED
  1681. override FPCOPT+=-Cg
  1682. ifeq ($(CPU_TARGET),i386)
  1683. override FPCOPT+=-Aas
  1684. endif
  1685. endif
  1686. ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
  1687. ifeq ($(OS_TARGET),linux)
  1688. ifeq ($(CPU_TARGET),x86_64)
  1689. override FPCOPT+=-Cg
  1690. endif
  1691. endif
  1692. endif
  1693. ifdef LINKSHARED
  1694. endif
  1695. ifdef OPT
  1696. override FPCOPT+=$(OPT)
  1697. endif
  1698. ifdef FPCOPTDEF
  1699. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1700. endif
  1701. ifdef CFGFILE
  1702. override FPCOPT+=@$(CFGFILE)
  1703. endif
  1704. ifdef USEENV
  1705. override FPCEXTCMD:=$(FPCOPT)
  1706. override FPCOPT:=!FPCEXTCMD
  1707. export FPCEXTCMD
  1708. endif
  1709. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  1710. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  1711. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  1712. override ACROSSCOMPILE=1
  1713. endif
  1714. ifdef ACROSSCOMPILE
  1715. override FPCOPT+=$(CROSSOPT)
  1716. endif
  1717. override COMPILER:=$(FPC) $(FPCOPT)
  1718. ifeq (,$(findstring -s ,$(COMPILER)))
  1719. EXECPPAS=
  1720. else
  1721. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1722. ifdef RUNBATCH
  1723. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  1724. else
  1725. EXECPPAS:=@$(PPAS)
  1726. endif
  1727. endif
  1728. endif
  1729. .PHONY: fpc_units
  1730. ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
  1731. override ALLTARGET+=fpc_units
  1732. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  1733. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  1734. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1735. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1736. endif
  1737. fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
  1738. ifdef TARGET_RSTS
  1739. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  1740. override CLEANRSTFILES+=$(RSTFILES)
  1741. endif
  1742. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  1743. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  1744. @$(ECHOREDIR) Compiled > $(FPCMADE)
  1745. fpc_all: $(FPCMADE)
  1746. fpc_smart:
  1747. $(MAKE) all LINKSMART=1 CREATESMART=1
  1748. fpc_debug:
  1749. $(MAKE) all DEBUG=1
  1750. fpc_release:
  1751. $(MAKE) all RELEASE=1
  1752. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
  1753. $(COMPILER_UNITTARGETDIR):
  1754. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  1755. $(COMPILER_TARGETDIR):
  1756. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  1757. %$(PPUEXT): %.pp
  1758. $(COMPILER) $<
  1759. $(EXECPPAS)
  1760. %$(PPUEXT): %.pas
  1761. $(COMPILER) $<
  1762. $(EXECPPAS)
  1763. %$(EXEEXT): %.pp
  1764. $(COMPILER) $<
  1765. $(EXECPPAS)
  1766. %$(EXEEXT): %.pas
  1767. $(COMPILER) $<
  1768. $(EXECPPAS)
  1769. %$(EXEEXT): %.lpr
  1770. $(COMPILER) $<
  1771. $(EXECPPAS)
  1772. %$(EXEEXT): %.dpr
  1773. $(COMPILER) $<
  1774. $(EXECPPAS)
  1775. %.res: %.rc
  1776. windres -i $< -o $@
  1777. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1778. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1779. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1780. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1781. vpath %.inc $(COMPILER_INCLUDEDIR)
  1782. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  1783. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  1784. .PHONY: fpc_shared
  1785. override INSTALLTARGET+=fpc_shared_install
  1786. ifndef SHARED_LIBVERSION
  1787. SHARED_LIBVERSION=$(FPC_VERSION)
  1788. endif
  1789. ifndef SHARED_LIBNAME
  1790. SHARED_LIBNAME=$(PACKAGE_NAME)
  1791. endif
  1792. ifndef SHARED_FULLNAME
  1793. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  1794. endif
  1795. ifndef SHARED_LIBUNITS
  1796. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  1797. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  1798. endif
  1799. fpc_shared:
  1800. ifdef HASSHAREDLIB
  1801. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  1802. ifneq ($(SHARED_BUILD),n)
  1803. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  1804. endif
  1805. else
  1806. @$(ECHO) Shared Libraries not supported
  1807. endif
  1808. fpc_shared_install:
  1809. ifneq ($(SHARED_BUILD),n)
  1810. ifneq ($(SHARED_LIBUNITS),)
  1811. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  1812. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  1813. endif
  1814. endif
  1815. endif
  1816. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  1817. ifdef INSTALL_UNITS
  1818. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  1819. endif
  1820. ifdef INSTALL_BUILDUNIT
  1821. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  1822. endif
  1823. ifdef INSTALLPPUFILES
  1824. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1825. ifneq ($(UNITTARGETDIRPREFIX),)
  1826. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
  1827. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
  1828. endif
  1829. override INSTALL_CREATEPACKAGEFPC=1
  1830. endif
  1831. ifdef INSTALLEXEFILES
  1832. ifneq ($(TARGETDIRPREFIX),)
  1833. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  1834. endif
  1835. endif
  1836. fpc_install: all $(INSTALLTARGET)
  1837. ifdef INSTALLEXEFILES
  1838. $(MKDIR) $(INSTALL_BINDIR)
  1839. ifdef UPXPROG
  1840. -$(UPXPROG) $(INSTALLEXEFILES)
  1841. endif
  1842. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  1843. endif
  1844. ifdef INSTALL_CREATEPACKAGEFPC
  1845. ifdef FPCMAKE
  1846. ifdef PACKAGE_VERSION
  1847. ifneq ($(wildcard Makefile.fpc),)
  1848. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  1849. $(MKDIR) $(INSTALL_UNITDIR)
  1850. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  1851. endif
  1852. endif
  1853. endif
  1854. endif
  1855. ifdef INSTALLPPUFILES
  1856. $(MKDIR) $(INSTALL_UNITDIR)
  1857. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  1858. ifneq ($(INSTALLPPULINKFILES),)
  1859. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  1860. endif
  1861. ifneq ($(wildcard $(LIB_FULLNAME)),)
  1862. $(MKDIR) $(INSTALL_LIBDIR)
  1863. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  1864. ifdef inUnix
  1865. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  1866. endif
  1867. endif
  1868. endif
  1869. ifdef INSTALL_FILES
  1870. $(MKDIR) $(INSTALL_DATADIR)
  1871. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  1872. endif
  1873. fpc_sourceinstall: distclean
  1874. $(MKDIR) $(INSTALL_SOURCEDIR)
  1875. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  1876. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  1877. ifdef HASEXAMPLES
  1878. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  1879. endif
  1880. ifdef EXAMPLESOURCEFILES
  1881. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  1882. endif
  1883. ifdef TARGET_EXAMPLEDIRS
  1884. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  1885. endif
  1886. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  1887. ifdef EXEFILES
  1888. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  1889. endif
  1890. ifdef CLEAN_UNITS
  1891. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  1892. endif
  1893. ifdef CLEANPPUFILES
  1894. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  1895. ifdef DEBUGSYMEXT
  1896. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  1897. endif
  1898. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  1899. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  1900. endif
  1901. fpc_clean: $(CLEANTARGET)
  1902. ifdef CLEANEXEFILES
  1903. -$(DEL) $(CLEANEXEFILES)
  1904. endif
  1905. ifdef CLEANPPUFILES
  1906. -$(DEL) $(CLEANPPUFILES)
  1907. endif
  1908. ifneq ($(CLEANPPULINKFILES),)
  1909. -$(DEL) $(CLEANPPULINKFILES)
  1910. endif
  1911. ifdef CLEANRSTFILES
  1912. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1913. endif
  1914. ifdef CLEAN_FILES
  1915. -$(DEL) $(CLEAN_FILES)
  1916. endif
  1917. ifdef LIB_NAME
  1918. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  1919. endif
  1920. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1921. -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
  1922. fpc_cleanall: $(CLEANTARGET)
  1923. ifdef CLEANEXEFILES
  1924. -$(DEL) $(CLEANEXEFILES)
  1925. endif
  1926. ifdef COMPILER_UNITTARGETDIR
  1927. ifdef CLEANPPUFILES
  1928. -$(DEL) $(CLEANPPUFILES)
  1929. endif
  1930. ifneq ($(CLEANPPULINKFILES),)
  1931. -$(DEL) $(CLEANPPULINKFILES)
  1932. endif
  1933. ifdef CLEANRSTFILES
  1934. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1935. endif
  1936. endif
  1937. -$(DELTREE) units
  1938. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  1939. ifneq ($(PPUEXT),.ppu)
  1940. -$(DEL) *.o *.ppu *.a
  1941. endif
  1942. -$(DELTREE) *$(SMARTEXT)
  1943. -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1944. -$(DEL) *_ppas$(BATCHEXT)
  1945. ifdef AOUTEXT
  1946. -$(DEL) *$(AOUTEXT)
  1947. endif
  1948. ifdef DEBUGSYMEXT
  1949. -$(DEL) *$(DEBUGSYMEXT)
  1950. endif
  1951. fpc_distclean: cleanall
  1952. .PHONY: fpc_baseinfo
  1953. override INFORULES+=fpc_baseinfo
  1954. fpc_baseinfo:
  1955. @$(ECHO)
  1956. @$(ECHO) == Package info ==
  1957. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  1958. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  1959. @$(ECHO)
  1960. @$(ECHO) == Configuration info ==
  1961. @$(ECHO)
  1962. @$(ECHO) FPC.......... $(FPC)
  1963. @$(ECHO) FPC Version.. $(FPC_VERSION)
  1964. @$(ECHO) Source CPU... $(CPU_SOURCE)
  1965. @$(ECHO) Target CPU... $(CPU_TARGET)
  1966. @$(ECHO) Source OS.... $(OS_SOURCE)
  1967. @$(ECHO) Target OS.... $(OS_TARGET)
  1968. @$(ECHO) Full Source.. $(FULL_SOURCE)
  1969. @$(ECHO) Full Target.. $(FULL_TARGET)
  1970. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  1971. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  1972. @$(ECHO)
  1973. @$(ECHO) == Directory info ==
  1974. @$(ECHO)
  1975. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  1976. @$(ECHO)
  1977. @$(ECHO) Basedir......... $(BASEDIR)
  1978. @$(ECHO) FPCDir.......... $(FPCDIR)
  1979. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  1980. @$(ECHO) UnitsDir........ $(UNITSDIR)
  1981. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  1982. @$(ECHO)
  1983. @$(ECHO) GCC library..... $(GCCLIBDIR)
  1984. @$(ECHO) Other library... $(OTHERLIBDIR)
  1985. @$(ECHO)
  1986. @$(ECHO) == Tools info ==
  1987. @$(ECHO)
  1988. @$(ECHO) As........ $(AS)
  1989. @$(ECHO) Ld........ $(LD)
  1990. @$(ECHO) Ar........ $(AR)
  1991. @$(ECHO) Rc........ $(RC)
  1992. @$(ECHO)
  1993. @$(ECHO) Mv........ $(MVPROG)
  1994. @$(ECHO) Cp........ $(CPPROG)
  1995. @$(ECHO) Rm........ $(RMPROG)
  1996. @$(ECHO) GInstall.. $(GINSTALL)
  1997. @$(ECHO) Echo...... $(ECHO)
  1998. @$(ECHO) Shell..... $(SHELL)
  1999. @$(ECHO) Date...... $(DATE)
  2000. @$(ECHO) FPCMake... $(FPCMAKE)
  2001. @$(ECHO) PPUMove... $(PPUMOVE)
  2002. @$(ECHO) Upx....... $(UPXPROG)
  2003. @$(ECHO) Zip....... $(ZIPPROG)
  2004. @$(ECHO)
  2005. @$(ECHO) == Object info ==
  2006. @$(ECHO)
  2007. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  2008. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  2009. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  2010. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  2011. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  2012. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  2013. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  2014. @$(ECHO)
  2015. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  2016. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  2017. @$(ECHO)
  2018. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  2019. @$(ECHO) Install Files....... $(INSTALL_FILES)
  2020. @$(ECHO)
  2021. @$(ECHO) == Install info ==
  2022. @$(ECHO)
  2023. @$(ECHO) DateStr.............. $(DATESTR)
  2024. @$(ECHO) ZipName.............. $(ZIPNAME)
  2025. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  2026. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  2027. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  2028. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  2029. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  2030. @$(ECHO)
  2031. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  2032. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  2033. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  2034. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  2035. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  2036. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  2037. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  2038. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  2039. @$(ECHO)
  2040. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  2041. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  2042. @$(ECHO)
  2043. .PHONY: fpc_info
  2044. fpc_info: $(INFORULES)
  2045. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  2046. fpc_makefile_dirs
  2047. fpc_makefile:
  2048. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  2049. fpc_makefile_sub1:
  2050. ifdef TARGET_DIRS
  2051. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  2052. endif
  2053. ifdef TARGET_EXAMPLEDIRS
  2054. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  2055. endif
  2056. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  2057. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  2058. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  2059. all: fpc_all
  2060. debug: fpc_debug
  2061. smart: fpc_smart
  2062. release: fpc_release
  2063. units: fpc_units
  2064. examples:
  2065. shared: fpc_shared
  2066. install: fpc_install
  2067. sourceinstall: fpc_sourceinstall
  2068. exampleinstall: fpc_exampleinstall
  2069. distinstall:
  2070. zipinstall:
  2071. zipsourceinstall:
  2072. zipexampleinstall:
  2073. zipdistinstall:
  2074. clean: fpc_clean
  2075. distclean: fpc_distclean
  2076. cleanall: fpc_cleanall
  2077. info: fpc_info
  2078. makefiles: fpc_makefiles
  2079. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  2080. ifneq ($(wildcard fpcmake.loc),)
  2081. include fpcmake.loc
  2082. endif
  2083. .NOTPARALLEL:
  2084. include $(INC)/makefile.inc
  2085. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  2086. include $(PROCINC)/makefile.cpu
  2087. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  2088. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  2089. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
  2090. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
  2091. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  2092. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
  2093. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  2094. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  2095. $(SYSTEMUNIT)$(PPUEXT)
  2096. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  2097. $(SYSTEMUNIT)$(PPUEXT)
  2098. objects$(PPUEXT) : $(INC)/objects.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  2099. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  2100. objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT)
  2101. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  2102. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  2103. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT)
  2104. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  2105. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  2106. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
  2107. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  2108. $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
  2109. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  2110. $(OBJPASDIR)/varutilh.inc varutils.pp
  2111. $(COMPILER) -I$(OBJPASDIR) varutils.pp $(REDIR)
  2112. fmtbcd$(PPUEXT) : $(OBJPASDIR)/fmtbcd.pp objpas$(PPUEXT) sysutils$(PPUEXT) variants$(PPUEXT) classes$(PPUEXT) system$(PPUEXT)
  2113. $(COMPILER) $(OBJPASDIR)/fmtbcd.pp
  2114. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  2115. $(COMPILER) $(OBJPASDIR)/types.pp
  2116. rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp
  2117. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  2118. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  2119. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  2120. dateutil$(PPUEXT) : $(OBJPASDIR)/dateutil.pp
  2121. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutil.pp
  2122. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  2123. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  2124. ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  2125. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  2126. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  2127. $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
  2128. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)