Makefile 45 KB

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