Makefile 45 KB

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