Makefile 46 KB

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