2
0

Makefile 45 KB

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