Makefile 58 KB

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