Makefile 66 KB

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