Makefile 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 1.1 [2004/02/22]
  3. #
  4. default: all
  5. MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
  6. override PATH:=$(subst \,/,$(PATH))
  7. ifeq ($(findstring ;,$(PATH)),)
  8. inUnix=1
  9. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  10. else
  11. SEARCHPATH:=$(subst ;, ,$(PATH))
  12. endif
  13. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  14. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  15. ifeq ($(PWD),)
  16. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  17. ifeq ($(PWD),)
  18. $(error You need the GNU utils package to use this Makefile)
  19. else
  20. PWD:=$(firstword $(PWD))
  21. SRCEXEEXT=
  22. endif
  23. else
  24. PWD:=$(firstword $(PWD))
  25. SRCEXEEXT=.exe
  26. endif
  27. ifndef inUnix
  28. ifeq ($(OS),Windows_NT)
  29. inWinNT=1
  30. else
  31. ifdef OS2_SHELL
  32. inOS2=1
  33. endif
  34. endif
  35. else
  36. ifneq ($(findstring cygdrive,$(PATH)),)
  37. inCygWin=1
  38. endif
  39. endif
  40. ifeq ($(OS_TARGET),freebsd)
  41. BSDhier=1
  42. endif
  43. ifeq ($(OS_TARGET),netbsd)
  44. BSDhier=1
  45. endif
  46. ifeq ($(OS_TARGET),openbsd)
  47. BSDhier=1
  48. endif
  49. ifdef inUnix
  50. BATCHEXT=.sh
  51. else
  52. ifdef inOS2
  53. BATCHEXT=.cmd
  54. else
  55. BATCHEXT=.bat
  56. endif
  57. endif
  58. ifdef inUnix
  59. PATHSEP=/
  60. else
  61. PATHSEP:=$(subst /,\,/)
  62. ifdef inCygWin
  63. PATHSEP=/
  64. endif
  65. endif
  66. ifdef PWD
  67. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  68. ifdef inCygWin
  69. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  70. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  71. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  72. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  73. endif
  74. endif
  75. else
  76. BASEDIR=.
  77. endif
  78. ifdef inOS2
  79. ifndef ECHO
  80. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  81. ifeq ($(ECHO),)
  82. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  83. ifeq ($(ECHO),)
  84. ECHO=echo
  85. else
  86. ECHO:=$(firstword $(ECHO))
  87. endif
  88. else
  89. ECHO:=$(firstword $(ECHO))
  90. endif
  91. endif
  92. export ECHO
  93. endif
  94. override DEFAULT_FPCDIR=../../..
  95. ifndef FPC
  96. ifdef PP
  97. FPC=$(PP)
  98. endif
  99. endif
  100. ifndef FPC
  101. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  102. ifneq ($(FPCPROG),)
  103. FPCPROG:=$(firstword $(FPCPROG))
  104. FPC:=$(shell $(FPCPROG) -PB)
  105. ifneq ($(findstring Error,$(FPC)),)
  106. override FPC=ppc386
  107. endif
  108. else
  109. override FPC=ppc386
  110. endif
  111. endif
  112. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  113. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  114. ifndef FPC_VERSION
  115. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  116. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  117. endif
  118. export FPC FPC_VERSION FPC_COMPILERINFO
  119. unexport CHECKDEPEND ALLDEPENDENCIES
  120. ifndef CPU_TARGET
  121. ifdef CPU_TARGET_DEFAULT
  122. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  123. endif
  124. endif
  125. ifndef OS_TARGET
  126. ifdef OS_TARGET_DEFAULT
  127. OS_TARGET=$(OS_TARGET_DEFAULT)
  128. endif
  129. endif
  130. ifneq ($(words $(FPC_COMPILERINFO)),5)
  131. FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
  132. FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
  133. FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
  134. FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
  135. endif
  136. ifndef CPU_SOURCE
  137. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  138. endif
  139. ifndef CPU_TARGET
  140. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  141. endif
  142. ifndef OS_SOURCE
  143. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  144. endif
  145. ifndef OS_TARGET
  146. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  147. endif
  148. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  149. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  150. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  151. CROSSCOMPILE=1
  152. endif
  153. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  154. ifeq ($(findstring $(OS_TARGET),$(MAKEFILETARGETS)),)
  155. $(error The Makefile doesn't support target $(OS_TARGET), please run fpcmake first)
  156. endif
  157. endif
  158. export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE CROSSCOMPILE
  159. ifdef FPCDIR
  160. override FPCDIR:=$(subst \,/,$(FPCDIR))
  161. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  162. override FPCDIR=wrong
  163. endif
  164. else
  165. override FPCDIR=wrong
  166. endif
  167. ifdef DEFAULT_FPCDIR
  168. ifeq ($(FPCDIR),wrong)
  169. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  170. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  171. override FPCDIR=wrong
  172. endif
  173. endif
  174. endif
  175. ifeq ($(FPCDIR),wrong)
  176. ifdef inUnix
  177. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  178. ifeq ($(wildcard $(FPCDIR)/units),)
  179. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  180. endif
  181. else
  182. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  183. override FPCDIR:=$(FPCDIR)/..
  184. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  185. override FPCDIR:=$(FPCDIR)/..
  186. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  187. override FPCDIR:=$(BASEDIR)
  188. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  189. override FPCDIR=c:/pp
  190. endif
  191. endif
  192. endif
  193. endif
  194. endif
  195. ifndef CROSSDIR
  196. CROSSDIR:=$(FPCDIR)/cross/$(FULL_TARGET)
  197. endif
  198. ifndef CROSSTARGETDIR
  199. CROSSTARGETDIR=$(CROSSDIR)/$(FULL_TARGET)
  200. endif
  201. ifdef CROSSCOMPILE
  202. UNITSDIR:=$(wildcard $(CROSSTARGETDIR)/units)
  203. ifeq ($(UNITSDIR),)
  204. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  205. endif
  206. else
  207. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  208. endif
  209. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
  210. override PACKAGE_NAME=postgres
  211. override PACKAGE_VERSION=1.9.2
  212. override TARGET_UNITS+=dllist postgres
  213. override TARGET_EXAMPLES+=testpg1 testpg2
  214. override INSTALL_FPCPACKAGE=y
  215. ifdef REQUIRE_UNITSDIR
  216. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  217. endif
  218. ifdef REQUIRE_PACKAGESDIR
  219. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  220. endif
  221. ifdef ZIPINSTALL
  222. ifeq ($(OS_TARGET),linux)
  223. UNIXINSTALLDIR=1
  224. endif
  225. ifeq ($(OS_TARGET),freebsd)
  226. UNIXINSTALLDIR=1
  227. endif
  228. ifeq ($(OS_TARGET),netbsd)
  229. UNIXINSTALLDIR=1
  230. endif
  231. ifeq ($(OS_TARGET),openbsd)
  232. UNIXINSTALLDIR=1
  233. endif
  234. ifeq ($(OS_TARGET),sunos)
  235. UNIXINSTALLDIR=1
  236. endif
  237. ifeq ($(OS_TARGET),qnx)
  238. UNIXINSTALLDIR=1
  239. endif
  240. else
  241. ifeq ($(OS_SOURCE),linux)
  242. UNIXINSTALLDIR=1
  243. endif
  244. ifeq ($(OS_SOURCE),freebsd)
  245. UNIXINSTALLDIR=1
  246. endif
  247. ifeq ($(OS_SOURCE),netbsd)
  248. UNIXINSTALLDIR=1
  249. endif
  250. ifeq ($(OS_SOURCE),openbsd)
  251. UNIXINSTALLDIR=1
  252. endif
  253. ifeq ($(OS_TARGET),sunos)
  254. UNIXINSTALLDIR=1
  255. endif
  256. ifeq ($(OS_TARGET),qnx)
  257. UNIXINSTALLDIR=1
  258. endif
  259. endif
  260. ifndef INSTALL_PREFIX
  261. ifdef PREFIX
  262. INSTALL_PREFIX=$(PREFIX)
  263. endif
  264. endif
  265. ifndef INSTALL_PREFIX
  266. ifdef UNIXINSTALLDIR
  267. INSTALL_PREFIX=/usr/local
  268. else
  269. ifdef INSTALL_FPCPACKAGE
  270. INSTALL_BASEDIR:=/pp
  271. else
  272. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  273. endif
  274. endif
  275. endif
  276. export INSTALL_PREFIX
  277. ifdef INSTALL_FPCSUBDIR
  278. export INSTALL_FPCSUBDIR
  279. endif
  280. ifndef DIST_DESTDIR
  281. DIST_DESTDIR:=$(BASEDIR)
  282. endif
  283. export DIST_DESTDIR
  284. ifndef INSTALL_BASEDIR
  285. ifdef UNIXINSTALLDIR
  286. ifdef INSTALL_FPCPACKAGE
  287. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  288. else
  289. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  290. endif
  291. else
  292. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  293. endif
  294. endif
  295. ifndef INSTALL_BINDIR
  296. ifdef UNIXINSTALLDIR
  297. ifdef CROSSCOMPILE
  298. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/bin
  299. else
  300. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  301. endif
  302. else
  303. ifdef CROSSCOMPILE
  304. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/bin
  305. else
  306. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  307. endif
  308. ifdef INSTALL_FPCPACKAGE
  309. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(OS_TARGET)
  310. endif
  311. endif
  312. endif
  313. ifndef INSTALL_UNITDIR
  314. ifdef CROSSCOMPILE
  315. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/units
  316. else
  317. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(OS_TARGET)
  318. endif
  319. ifdef INSTALL_FPCPACKAGE
  320. ifdef PACKAGE_NAME
  321. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  322. endif
  323. endif
  324. endif
  325. ifndef INSTALL_LIBDIR
  326. ifdef UNIXINSTALLDIR
  327. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  328. else
  329. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  330. endif
  331. endif
  332. ifndef INSTALL_SOURCEDIR
  333. ifdef UNIXINSTALLDIR
  334. ifdef BSDhier
  335. SRCPREFIXDIR=share/src
  336. else
  337. SRCPREFIXDIR=src
  338. endif
  339. ifdef INSTALL_FPCPACKAGE
  340. ifdef INSTALL_FPCSUBDIR
  341. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  342. else
  343. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  344. endif
  345. else
  346. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  347. endif
  348. else
  349. ifdef INSTALL_FPCPACKAGE
  350. ifdef INSTALL_FPCSUBDIR
  351. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  352. else
  353. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  354. endif
  355. else
  356. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  357. endif
  358. endif
  359. endif
  360. ifndef INSTALL_DOCDIR
  361. ifdef UNIXINSTALLDIR
  362. ifdef BSDhier
  363. DOCPREFIXDIR=share/doc
  364. else
  365. DOCPREFIXDIR=doc
  366. endif
  367. ifdef INSTALL_FPCPACKAGE
  368. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  369. else
  370. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  371. endif
  372. else
  373. ifdef INSTALL_FPCPACKAGE
  374. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  375. else
  376. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  377. endif
  378. endif
  379. endif
  380. ifndef INSTALL_EXAMPLEDIR
  381. ifdef UNIXINSTALLDIR
  382. ifdef INSTALL_FPCPACKAGE
  383. ifdef BSDhier
  384. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  385. else
  386. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  387. endif
  388. else
  389. ifdef BSDhier
  390. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  391. else
  392. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  393. endif
  394. endif
  395. else
  396. ifdef INSTALL_FPCPACKAGE
  397. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  398. else
  399. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  400. endif
  401. endif
  402. endif
  403. ifndef INSTALL_DATADIR
  404. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  405. endif
  406. ifdef CROSSCOMPILE
  407. ifndef CROSSBINDIR
  408. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(FULL_SOURCE))
  409. ifeq ($(CROSSBINDIR),)
  410. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/bin/$(FULL_SOURCE))
  411. endif
  412. endif
  413. else
  414. CROSSBINDIR=
  415. endif
  416. ifeq ($(OS_SOURCE),linux)
  417. ifndef GCCLIBDIR
  418. GCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
  419. endif
  420. ifndef OTHERLIBDIR
  421. OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
  422. endif
  423. endif
  424. ifdef inUnix
  425. ifeq ($(OS_SOURCE),netbsd)
  426. OTHERLIBDIR+=/usr/pkg/lib
  427. endif
  428. export GCCLIBDIR OTHERLIB
  429. endif
  430. LOADEREXT=.as
  431. EXEEXT=.exe
  432. PPLEXT=.ppl
  433. PPUEXT=.ppu
  434. OEXT=.o
  435. ASMEXT=.s
  436. SMARTEXT=.sl
  437. STATICLIBEXT=.a
  438. SHAREDLIBEXT=.so
  439. STATICLIBPREFIX=libp
  440. RSTEXT=.rst
  441. FPCMADE=fpcmade
  442. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  443. ifeq ($(OS_TARGET),go32v1)
  444. STATICLIBPREFIX=
  445. FPCMADE=fpcmade.v1
  446. PACKAGESUFFIX=v1
  447. endif
  448. ifeq ($(OS_TARGET),go32v2)
  449. STATICLIBPREFIX=
  450. FPCMADE=fpcmade.dos
  451. ZIPSUFFIX=go32
  452. endif
  453. ifeq ($(OS_TARGET),watcom)
  454. STATICLIBPREFIX=
  455. FPCMADE=fpcmade.wat
  456. ZIPSUFFIX=watc
  457. OEXT=.obj
  458. ASMEXT=.asm
  459. SHAREDLIBEXT=.dll
  460. endif
  461. ifeq ($(OS_TARGET),linux)
  462. EXEEXT=
  463. HASSHAREDLIB=1
  464. FPCMADE=fpcmade.lnx
  465. ZIPSUFFIX=linux
  466. endif
  467. ifeq ($(OS_TARGET),freebsd)
  468. EXEEXT=
  469. HASSHAREDLIB=1
  470. FPCMADE=fpcmade.freebsd
  471. ZIPSUFFIX=freebsd
  472. endif
  473. ifeq ($(OS_TARGET),netbsd)
  474. EXEEXT=
  475. HASSHAREDLIB=1
  476. FPCMADE=fpcmade.netbsd
  477. ZIPSUFFIX=netbsd
  478. endif
  479. ifeq ($(OS_TARGET),openbsd)
  480. EXEEXT=
  481. HASSHAREDLIB=1
  482. FPCMADE=fpcmade.openbsd
  483. ZIPSUFFIX=openbsd
  484. endif
  485. ifeq ($(OS_TARGET),win32)
  486. SHAREDLIBEXT=.dll
  487. FPCMADE=fpcmade.w32
  488. ZIPSUFFIX=w32
  489. endif
  490. ifeq ($(OS_TARGET),os2)
  491. AOUTEXT=.out
  492. STATICLIBPREFIX=
  493. SHAREDLIBEXT=.dll
  494. FPCMADE=fpcmade.os2
  495. ZIPSUFFIX=os2
  496. ECHO=echo
  497. endif
  498. ifeq ($(OS_TARGET),emx)
  499. AOUTEXT=.out
  500. STATICLIBPREFIX=
  501. SHAREDLIBEXT=.dll
  502. FPCMADE=fpcmade.emx
  503. ZIPSUFFIX=emx
  504. ECHO=echo
  505. endif
  506. ifeq ($(OS_TARGET),amiga)
  507. EXEEXT=
  508. SHAREDLIBEXT=.library
  509. FPCMADE=fpcmade.amg
  510. endif
  511. ifeq ($(OS_TARGET),atari)
  512. EXEEXT=.ttp
  513. FPCMADE=fpcmade.ata
  514. endif
  515. ifeq ($(OS_TARGET),beos)
  516. EXEEXT=
  517. FPCMADE=fpcmade.be
  518. ZIPSUFFIX=be
  519. endif
  520. ifeq ($(OS_TARGET),sunos)
  521. EXEEXT=
  522. FPCMADE=fpcmade.sun
  523. ZIPSUFFIX=sun
  524. endif
  525. ifeq ($(OS_TARGET),qnx)
  526. EXEEXT=
  527. FPCMADE=fpcmade.qnx
  528. ZIPSUFFIX=qnx
  529. endif
  530. ifeq ($(OS_TARGET),netware)
  531. EXEEXT=.nlm
  532. STATICLIBPREFIX=
  533. FPCMADE=fpcmade.nw
  534. ZIPSUFFIX=nw
  535. endif
  536. ifeq ($(OS_TARGET),macos)
  537. EXEEXT=
  538. FPCMADE=fpcmade.mcc
  539. endif
  540. ifeq ($(OS_TARGET),darwin)
  541. EXEEXT=
  542. HASSHAREDLIB=1
  543. FPCMADE=fpcmade.darwin
  544. ZIPSUFFIX=darwin
  545. endif
  546. else
  547. ifeq ($(OS_TARGET),go32v1)
  548. PPUEXT=.pp1
  549. OEXT=.o1
  550. ASMEXT=.s1
  551. SMARTEXT=.sl1
  552. STATICLIBEXT=.a1
  553. SHAREDLIBEXT=.so1
  554. STATICLIBPREFIX=
  555. FPCMADE=fpcmade.v1
  556. PACKAGESUFFIX=v1
  557. endif
  558. ifeq ($(OS_TARGET),go32v2)
  559. STATICLIBPREFIX=
  560. FPCMADE=fpcmade.dos
  561. ZIPSUFFIX=go32
  562. endif
  563. ifeq ($(OS_TARGET),watcom)
  564. STATICLIBPREFIX=
  565. FPCMADE=fpcmade.dos
  566. ZIPSUFFIX=watcom
  567. endif
  568. ifeq ($(OS_TARGET),linux)
  569. EXEEXT=
  570. HASSHAREDLIB=1
  571. FPCMADE=fpcmade.lnx
  572. ZIPSUFFIX=linux
  573. endif
  574. ifeq ($(OS_TARGET),freebsd)
  575. EXEEXT=
  576. HASSHAREDLIB=1
  577. FPCMADE=fpcmade.freebsd
  578. ZIPSUFFIX=freebsd
  579. endif
  580. ifeq ($(OS_TARGET),netbsd)
  581. EXEEXT=
  582. HASSHAREDLIB=1
  583. FPCMADE=fpcmade.netbsd
  584. ZIPSUFFIX=netbsd
  585. endif
  586. ifeq ($(OS_TARGET),openbsd)
  587. EXEEXT=
  588. HASSHAREDLIB=1
  589. FPCMADE=fpcmade.openbsd
  590. ZIPSUFFIX=openbsd
  591. endif
  592. ifeq ($(OS_TARGET),win32)
  593. PPUEXT=.ppw
  594. OEXT=.ow
  595. ASMEXT=.sw
  596. SMARTEXT=.slw
  597. STATICLIBEXT=.aw
  598. SHAREDLIBEXT=.dll
  599. FPCMADE=fpcmade.w32
  600. ZIPSUFFIX=w32
  601. endif
  602. ifeq ($(OS_TARGET),os2)
  603. PPUEXT=.ppo
  604. ASMEXT=.so2
  605. OEXT=.oo2
  606. AOUTEXT=.out
  607. SMARTEXT=.sl2
  608. STATICLIBPREFIX=
  609. STATICLIBEXT=.ao2
  610. SHAREDLIBEXT=.dll
  611. FPCMADE=fpcmade.os2
  612. ZIPSUFFIX=emx
  613. ECHO=echo
  614. endif
  615. ifeq ($(OS_TARGET),amiga)
  616. EXEEXT=
  617. PPUEXT=.ppu
  618. ASMEXT=.asm
  619. OEXT=.o
  620. SMARTEXT=.sl
  621. STATICLIBEXT=.a
  622. SHAREDLIBEXT=.library
  623. FPCMADE=fpcmade.amg
  624. endif
  625. ifeq ($(OS_TARGET),atari)
  626. PPUEXT=.ppu
  627. ASMEXT=.s
  628. OEXT=.o
  629. SMARTEXT=.sl
  630. STATICLIBEXT=.a
  631. EXEEXT=.ttp
  632. FPCMADE=fpcmade.ata
  633. endif
  634. ifeq ($(OS_TARGET),beos)
  635. PPUEXT=.ppu
  636. ASMEXT=.s
  637. OEXT=.o
  638. SMARTEXT=.sl
  639. STATICLIBEXT=.a
  640. EXEEXT=
  641. FPCMADE=fpcmade.be
  642. ZIPSUFFIX=be
  643. endif
  644. ifeq ($(OS_TARGET),sunos)
  645. PPUEXT=.ppu
  646. ASMEXT=.s
  647. OEXT=.o
  648. SMARTEXT=.sl
  649. STATICLIBEXT=.a
  650. EXEEXT=
  651. FPCMADE=fpcmade.sun
  652. ZIPSUFFIX=sun
  653. endif
  654. ifeq ($(OS_TARGET),qnx)
  655. PPUEXT=.ppu
  656. ASMEXT=.s
  657. OEXT=.o
  658. SMARTEXT=.sl
  659. STATICLIBEXT=.a
  660. EXEEXT=
  661. FPCMADE=fpcmade.qnx
  662. ZIPSUFFIX=qnx
  663. endif
  664. ifeq ($(OS_TARGET),netware)
  665. STATICLIBPREFIX=
  666. PPUEXT=.ppu
  667. OEXT=.o
  668. ASMEXT=.s
  669. SMARTEXT=.sl
  670. STATICLIBEXT=.a
  671. SHAREDLIBEXT=.nlm
  672. FPCMADE=fpcmade.nw
  673. ZIPSUFFIX=nw
  674. EXEEXT=.nlm
  675. endif
  676. ifeq ($(OS_TARGET),macos)
  677. PPUEXT=.ppu
  678. ASMEXT=.s
  679. OEXT=.o
  680. SMARTEXT=.sl
  681. STATICLIBEXT=.a
  682. EXEEXT=
  683. FPCMADE=fpcmade.mcc
  684. endif
  685. endif
  686. ifndef ECHO
  687. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  688. ifeq ($(ECHO),)
  689. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  690. ifeq ($(ECHO),)
  691. ECHO=
  692. else
  693. ECHO:=$(firstword $(ECHO))
  694. endif
  695. else
  696. ECHO:=$(firstword $(ECHO))
  697. endif
  698. endif
  699. export ECHO
  700. ifndef DATE
  701. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  702. ifeq ($(DATE),)
  703. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  704. ifeq ($(DATE),)
  705. DATE=
  706. else
  707. DATE:=$(firstword $(DATE))
  708. endif
  709. else
  710. DATE:=$(firstword $(DATE))
  711. endif
  712. endif
  713. export DATE
  714. ifndef GINSTALL
  715. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  716. ifeq ($(GINSTALL),)
  717. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  718. ifeq ($(GINSTALL),)
  719. GINSTALL=
  720. else
  721. GINSTALL:=$(firstword $(GINSTALL))
  722. endif
  723. else
  724. GINSTALL:=$(firstword $(GINSTALL))
  725. endif
  726. endif
  727. export GINSTALL
  728. ifndef CPPROG
  729. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  730. ifeq ($(CPPROG),)
  731. CPPROG=
  732. else
  733. CPPROG:=$(firstword $(CPPROG))
  734. endif
  735. endif
  736. export CPPROG
  737. ifndef RMPROG
  738. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  739. ifeq ($(RMPROG),)
  740. RMPROG=
  741. else
  742. RMPROG:=$(firstword $(RMPROG))
  743. endif
  744. endif
  745. export RMPROG
  746. ifndef MVPROG
  747. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  748. ifeq ($(MVPROG),)
  749. MVPROG=
  750. else
  751. MVPROG:=$(firstword $(MVPROG))
  752. endif
  753. endif
  754. export MVPROG
  755. ifndef ECHOREDIR
  756. ifndef inUnix
  757. ECHOREDIR=echo
  758. else
  759. ECHOREDIR=$(ECHO)
  760. endif
  761. endif
  762. ifndef COPY
  763. COPY:=$(CPPROG) -fp
  764. endif
  765. ifndef COPYTREE
  766. COPYTREE:=$(CPPROG) -rfp
  767. endif
  768. ifndef MOVE
  769. MOVE:=$(MVPROG) -f
  770. endif
  771. ifndef DEL
  772. DEL:=$(RMPROG) -f
  773. endif
  774. ifndef DELTREE
  775. DELTREE:=$(RMPROG) -rf
  776. endif
  777. ifndef INSTALL
  778. ifdef inUnix
  779. INSTALL:=$(GINSTALL) -c -m 644
  780. else
  781. INSTALL:=$(COPY)
  782. endif
  783. endif
  784. ifndef INSTALLEXE
  785. ifdef inUnix
  786. INSTALLEXE:=$(GINSTALL) -c -m 755
  787. else
  788. INSTALLEXE:=$(COPY)
  789. endif
  790. endif
  791. ifndef MKDIR
  792. MKDIR:=$(GINSTALL) -m 755 -d
  793. endif
  794. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  795. ifndef PPUMOVE
  796. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  797. ifeq ($(PPUMOVE),)
  798. PPUMOVE=
  799. else
  800. PPUMOVE:=$(firstword $(PPUMOVE))
  801. endif
  802. endif
  803. export PPUMOVE
  804. ifndef FPCMAKE
  805. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  806. ifeq ($(FPCMAKE),)
  807. FPCMAKE=
  808. else
  809. FPCMAKE:=$(firstword $(FPCMAKE))
  810. endif
  811. endif
  812. export FPCMAKE
  813. ifndef ZIPPROG
  814. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  815. ifeq ($(ZIPPROG),)
  816. ZIPPROG=
  817. else
  818. ZIPPROG:=$(firstword $(ZIPPROG))
  819. endif
  820. endif
  821. export ZIPPROG
  822. ifndef TARPROG
  823. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  824. ifeq ($(TARPROG),)
  825. TARPROG=
  826. else
  827. TARPROG:=$(firstword $(TARPROG))
  828. endif
  829. endif
  830. export TARPROG
  831. ASNAME=$(BINUTILSPREFIX)as
  832. LDNAME=$(BINUTILSPREFIX)ld
  833. ARNAME=$(BINUTILSPREFIX)ar
  834. RCNAME=$(BINUTILSPREFIX)rc
  835. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  836. ifeq ($(OS_TARGET),win32)
  837. ASNAME=as
  838. LDNAME=ld
  839. ARNAME=ar
  840. endif
  841. endif
  842. ifndef ASPROG
  843. ifdef CROSSBINDIR
  844. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  845. else
  846. ASPROG=$(ASNAME)
  847. endif
  848. endif
  849. ifndef LDPROG
  850. ifdef CROSSBINDIR
  851. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  852. else
  853. LDPROG=$(LDNAME)
  854. endif
  855. endif
  856. ifndef RCPROG
  857. ifdef CROSSBINDIR
  858. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  859. else
  860. RCPROG=$(RCNAME)
  861. endif
  862. endif
  863. ifndef ARPROG
  864. ifdef CROSSBINDIR
  865. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  866. else
  867. ARPROG=$(ARNAME)
  868. endif
  869. endif
  870. AS=$(ASPROG)
  871. LD=$(LDPROG)
  872. RC=$(RCPROG)
  873. AR=$(ARPROG)
  874. PPAS=ppas$(BATCHEXT)
  875. ifdef inUnix
  876. LDCONFIG=ldconfig
  877. else
  878. LDCONFIG=
  879. endif
  880. ifdef DATE
  881. DATESTR:=$(shell $(DATE) +%Y%m%d)
  882. else
  883. DATESTR=
  884. endif
  885. ifndef UPXPROG
  886. ifeq ($(OS_TARGET),go32v2)
  887. UPXPROG:=1
  888. endif
  889. ifeq ($(OS_TARGET),win32)
  890. UPXPROG:=1
  891. endif
  892. ifdef UPXPROG
  893. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  894. ifeq ($(UPXPROG),)
  895. UPXPROG=
  896. else
  897. UPXPROG:=$(firstword $(UPXPROG))
  898. endif
  899. else
  900. UPXPROG=
  901. endif
  902. endif
  903. export UPXPROG
  904. ZIPOPT=-9
  905. ZIPEXT=.zip
  906. ifeq ($(USETAR),bz2)
  907. TAROPT=vI
  908. TAREXT=.tar.bz2
  909. else
  910. TAROPT=vz
  911. TAREXT=.tar.gz
  912. endif
  913. override REQUIRE_PACKAGES=rtl
  914. ifeq ($(OS_TARGET),linux)
  915. ifeq ($(CPU_TARGET),i386)
  916. REQUIRE_PACKAGES_RTL=1
  917. endif
  918. endif
  919. ifeq ($(OS_TARGET),linux)
  920. ifeq ($(CPU_TARGET),m68k)
  921. REQUIRE_PACKAGES_RTL=1
  922. endif
  923. endif
  924. ifeq ($(OS_TARGET),linux)
  925. ifeq ($(CPU_TARGET),powerpc)
  926. REQUIRE_PACKAGES_RTL=1
  927. endif
  928. endif
  929. ifeq ($(OS_TARGET),linux)
  930. ifeq ($(CPU_TARGET),sparc)
  931. REQUIRE_PACKAGES_RTL=1
  932. endif
  933. endif
  934. ifeq ($(OS_TARGET),linux)
  935. ifeq ($(CPU_TARGET),x86_64)
  936. REQUIRE_PACKAGES_RTL=1
  937. endif
  938. endif
  939. ifeq ($(OS_TARGET),linux)
  940. ifeq ($(CPU_TARGET),arm)
  941. REQUIRE_PACKAGES_RTL=1
  942. endif
  943. endif
  944. ifeq ($(OS_TARGET),go32v2)
  945. ifeq ($(CPU_TARGET),i386)
  946. REQUIRE_PACKAGES_RTL=1
  947. endif
  948. endif
  949. ifeq ($(OS_TARGET),win32)
  950. ifeq ($(CPU_TARGET),i386)
  951. REQUIRE_PACKAGES_RTL=1
  952. endif
  953. endif
  954. ifeq ($(OS_TARGET),os2)
  955. ifeq ($(CPU_TARGET),i386)
  956. REQUIRE_PACKAGES_RTL=1
  957. endif
  958. endif
  959. ifeq ($(OS_TARGET),freebsd)
  960. ifeq ($(CPU_TARGET),i386)
  961. REQUIRE_PACKAGES_RTL=1
  962. endif
  963. endif
  964. ifeq ($(OS_TARGET),freebsd)
  965. ifeq ($(CPU_TARGET),m68k)
  966. REQUIRE_PACKAGES_RTL=1
  967. endif
  968. endif
  969. ifeq ($(OS_TARGET),beos)
  970. ifeq ($(CPU_TARGET),i386)
  971. REQUIRE_PACKAGES_RTL=1
  972. endif
  973. endif
  974. ifeq ($(OS_TARGET),netbsd)
  975. ifeq ($(CPU_TARGET),i386)
  976. REQUIRE_PACKAGES_RTL=1
  977. endif
  978. endif
  979. ifeq ($(OS_TARGET),netbsd)
  980. ifeq ($(CPU_TARGET),m68k)
  981. REQUIRE_PACKAGES_RTL=1
  982. endif
  983. endif
  984. ifeq ($(OS_TARGET),netbsd)
  985. ifeq ($(CPU_TARGET),powerpc)
  986. REQUIRE_PACKAGES_RTL=1
  987. endif
  988. endif
  989. ifeq ($(OS_TARGET),netbsd)
  990. ifeq ($(CPU_TARGET),sparc)
  991. REQUIRE_PACKAGES_RTL=1
  992. endif
  993. endif
  994. ifeq ($(OS_TARGET),amiga)
  995. ifeq ($(CPU_TARGET),m68k)
  996. REQUIRE_PACKAGES_RTL=1
  997. endif
  998. endif
  999. ifeq ($(OS_TARGET),atari)
  1000. ifeq ($(CPU_TARGET),m68k)
  1001. REQUIRE_PACKAGES_RTL=1
  1002. endif
  1003. endif
  1004. ifeq ($(OS_TARGET),sunos)
  1005. ifeq ($(CPU_TARGET),i386)
  1006. REQUIRE_PACKAGES_RTL=1
  1007. endif
  1008. endif
  1009. ifeq ($(OS_TARGET),sunos)
  1010. ifeq ($(CPU_TARGET),sparc)
  1011. REQUIRE_PACKAGES_RTL=1
  1012. endif
  1013. endif
  1014. ifeq ($(OS_TARGET),qnx)
  1015. ifeq ($(CPU_TARGET),i386)
  1016. REQUIRE_PACKAGES_RTL=1
  1017. endif
  1018. endif
  1019. ifeq ($(OS_TARGET),netware)
  1020. ifeq ($(CPU_TARGET),i386)
  1021. REQUIRE_PACKAGES_RTL=1
  1022. endif
  1023. endif
  1024. ifeq ($(OS_TARGET),openbsd)
  1025. ifeq ($(CPU_TARGET),i386)
  1026. REQUIRE_PACKAGES_RTL=1
  1027. endif
  1028. endif
  1029. ifeq ($(OS_TARGET),openbsd)
  1030. ifeq ($(CPU_TARGET),m68k)
  1031. REQUIRE_PACKAGES_RTL=1
  1032. endif
  1033. endif
  1034. ifeq ($(OS_TARGET),wdosx)
  1035. ifeq ($(CPU_TARGET),i386)
  1036. REQUIRE_PACKAGES_RTL=1
  1037. endif
  1038. endif
  1039. ifeq ($(OS_TARGET),palmos)
  1040. ifeq ($(CPU_TARGET),m68k)
  1041. REQUIRE_PACKAGES_RTL=1
  1042. endif
  1043. endif
  1044. ifeq ($(OS_TARGET),macos)
  1045. ifeq ($(CPU_TARGET),powerpc)
  1046. REQUIRE_PACKAGES_RTL=1
  1047. endif
  1048. endif
  1049. ifeq ($(OS_TARGET),darwin)
  1050. ifeq ($(CPU_TARGET),powerpc)
  1051. REQUIRE_PACKAGES_RTL=1
  1052. endif
  1053. endif
  1054. ifeq ($(OS_TARGET),emx)
  1055. ifeq ($(CPU_TARGET),i386)
  1056. REQUIRE_PACKAGES_RTL=1
  1057. endif
  1058. endif
  1059. ifeq ($(OS_TARGET),watcom)
  1060. ifeq ($(CPU_TARGET),i386)
  1061. REQUIRE_PACKAGES_RTL=1
  1062. endif
  1063. endif
  1064. ifdef REQUIRE_PACKAGES_RTL
  1065. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR))))))
  1066. ifneq ($(PACKAGEDIR_RTL),)
  1067. ifneq ($(wildcard $(PACKAGEDIR_RTL)/$(OS_TARGET)),)
  1068. UNITDIR_RTL=$(PACKAGEDIR_RTL)/$(OS_TARGET)
  1069. else
  1070. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  1071. endif
  1072. ifdef CHECKDEPEND
  1073. $(PACKAGEDIR_RTL)/$(FPCMADE):
  1074. $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
  1075. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
  1076. endif
  1077. else
  1078. PACKAGEDIR_RTL=
  1079. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  1080. ifneq ($(UNITDIR_RTL),)
  1081. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  1082. else
  1083. UNITDIR_RTL=
  1084. endif
  1085. endif
  1086. ifdef UNITDIR_RTL
  1087. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  1088. endif
  1089. endif
  1090. ifndef NOCPUDEF
  1091. override FPCOPTDEF=$(CPU_TARGET)
  1092. endif
  1093. ifneq ($(OS_TARGET),$(OS_SOURCE))
  1094. override FPCOPT+=-T$(OS_TARGET)
  1095. endif
  1096. ifeq ($(OS_SOURCE),openbsd)
  1097. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  1098. endif
  1099. ifndef CROSSBOOTSTRAP
  1100. ifneq ($(BINUTILSPREFIX),)
  1101. override FPCOPT+=-XP$(BINUTILSPREFIX) -Xc
  1102. endif
  1103. ifneq ($(BINUTILSPREFIX),)
  1104. override FPCOPT+=-Xr$(RLINKPATH)
  1105. endif
  1106. endif
  1107. ifdef UNITDIR
  1108. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  1109. endif
  1110. ifdef LIBDIR
  1111. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  1112. endif
  1113. ifdef OBJDIR
  1114. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  1115. endif
  1116. ifdef INCDIR
  1117. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  1118. endif
  1119. ifdef LINKSMART
  1120. override FPCOPT+=-XX
  1121. endif
  1122. ifdef CREATESMART
  1123. override FPCOPT+=-CX
  1124. endif
  1125. ifdef DEBUG
  1126. override FPCOPT+=-gl
  1127. override FPCOPTDEF+=DEBUG
  1128. endif
  1129. ifdef RELEASE
  1130. ifeq ($(CPU_TARGET),i386)
  1131. FPCCPUOPT:=-OG2p3
  1132. else
  1133. FPCCPUOPT:=
  1134. endif
  1135. override FPCOPT+=-Xs $(FPCCPUOPT) -n
  1136. override FPCOPTDEF+=RELEASE
  1137. endif
  1138. ifdef STRIP
  1139. override FPCOPT+=-Xs
  1140. endif
  1141. ifdef OPTIMIZE
  1142. ifeq ($(CPU_TARGET),i386)
  1143. override FPCOPT+=-OG2p3
  1144. endif
  1145. endif
  1146. ifdef VERBOSE
  1147. override FPCOPT+=-vwni
  1148. endif
  1149. ifdef COMPILER_OPTIONS
  1150. override FPCOPT+=$(COMPILER_OPTIONS)
  1151. endif
  1152. ifdef COMPILER_UNITDIR
  1153. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  1154. endif
  1155. ifdef COMPILER_LIBRARYDIR
  1156. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  1157. endif
  1158. ifdef COMPILER_OBJECTDIR
  1159. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  1160. endif
  1161. ifdef COMPILER_INCLUDEDIR
  1162. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1163. endif
  1164. ifdef CROSSBINDIR
  1165. override FPCOPT+=-FD$(CROSSBINDIR)
  1166. endif
  1167. ifdef COMPILER_TARGETDIR
  1168. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1169. ifeq ($(COMPILER_TARGETDIR),.)
  1170. override TARGETDIRPREFIX=
  1171. else
  1172. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1173. endif
  1174. endif
  1175. ifdef COMPILER_UNITTARGETDIR
  1176. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1177. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1178. override UNITTARGETDIRPREFIX=
  1179. else
  1180. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1181. endif
  1182. else
  1183. ifdef COMPILER_TARGETDIR
  1184. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1185. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1186. endif
  1187. endif
  1188. ifeq ($(OS_TARGET),linux)
  1189. ifeq ($(FPC_VERSION),1.0.6)
  1190. override FPCOPTDEF+=HASUNIX
  1191. endif
  1192. endif
  1193. ifdef GCCLIBDIR
  1194. override FPCOPT+=-Fl$(GCCLIBDIR)
  1195. endif
  1196. ifdef OTHERLIBDIR
  1197. override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
  1198. endif
  1199. ifdef OPT
  1200. override FPCOPT+=$(OPT)
  1201. endif
  1202. ifdef FPCOPTDEF
  1203. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1204. endif
  1205. ifdef CFGFILE
  1206. override FPCOPT+=@$(CFGFILE)
  1207. endif
  1208. ifdef USEENV
  1209. override FPCEXTCMD:=$(FPCOPT)
  1210. override FPCOPT:=!FPCEXTCMD
  1211. export FPCEXTCMD
  1212. endif
  1213. override COMPILER:=$(FPC) $(FPCOPT)
  1214. ifeq (,$(findstring -s ,$(COMPILER)))
  1215. EXECPPAS=
  1216. else
  1217. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1218. EXECPPAS:=@$(PPAS)
  1219. endif
  1220. endif
  1221. .PHONY: fpc_units
  1222. ifdef TARGET_UNITS
  1223. override ALLTARGET+=fpc_units
  1224. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  1225. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  1226. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1227. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1228. endif
  1229. fpc_units: $(UNITPPUFILES)
  1230. ifdef TARGET_RSTS
  1231. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  1232. override CLEANRSTFILES+=$(RSTFILES)
  1233. endif
  1234. .PHONY: fpc_examples
  1235. ifdef TARGET_EXAMPLES
  1236. HASEXAMPLES=1
  1237. override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES)))
  1238. override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))
  1239. override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES)))
  1240. override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
  1241. ifeq ($(OS_TARGET),os2)
  1242. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
  1243. endif
  1244. ifeq ($(OS_TARGET),emx)
  1245. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
  1246. endif
  1247. endif
  1248. ifdef TARGET_EXAMPLEDIRS
  1249. HASEXAMPLES=1
  1250. endif
  1251. fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS))
  1252. .PHONY: fpc_all fpc_smart fpc_debug fpc_release
  1253. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  1254. @$(ECHOREDIR) Compiled > $(FPCMADE)
  1255. fpc_all: $(FPCMADE)
  1256. fpc_smart:
  1257. $(MAKE) all LINKSMART=1 CREATESMART=1
  1258. fpc_debug:
  1259. $(MAKE) all DEBUG=1
  1260. fpc_release:
  1261. $(MAKE) all RELEASE=1
  1262. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .dpr .pp .rc .res
  1263. %$(PPUEXT): %.pp
  1264. $(COMPILER) $<
  1265. $(EXECPPAS)
  1266. %$(PPUEXT): %.pas
  1267. $(COMPILER) $<
  1268. $(EXECPPAS)
  1269. %$(EXEEXT): %.pp
  1270. $(COMPILER) $<
  1271. $(EXECPPAS)
  1272. %$(EXEEXT): %.pas
  1273. $(COMPILER) $<
  1274. $(EXECPPAS)
  1275. %$(EXEEXT): %.dpr
  1276. $(COMPILER) $<
  1277. $(EXECPPAS)
  1278. %.res: %.rc
  1279. windres -i $< -o $@
  1280. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1281. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1282. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1283. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  1284. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  1285. ifdef INSTALL_UNITS
  1286. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  1287. endif
  1288. ifdef INSTALL_BUILDUNIT
  1289. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  1290. endif
  1291. ifdef INSTALLPPUFILES
  1292. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1293. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
  1294. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)))
  1295. override INSTALL_CREATEPACKAGEFPC=1
  1296. endif
  1297. ifdef INSTALLEXEFILES
  1298. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
  1299. endif
  1300. fpc_install: all $(INSTALLTARGET)
  1301. ifdef INSTALLEXEFILES
  1302. $(MKDIR) $(INSTALL_BINDIR)
  1303. ifdef UPXPROG
  1304. -$(UPXPROG) $(INSTALLEXEFILES)
  1305. endif
  1306. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  1307. endif
  1308. ifdef INSTALL_CREATEPACKAGEFPC
  1309. ifdef FPCMAKE
  1310. ifdef PACKAGE_VERSION
  1311. ifneq ($(wildcard Makefile.fpc),)
  1312. $(FPCMAKE) -p -T$(OS_TARGET) Makefile.fpc
  1313. $(MKDIR) $(INSTALL_UNITDIR)
  1314. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  1315. endif
  1316. endif
  1317. endif
  1318. endif
  1319. ifdef INSTALLPPUFILES
  1320. $(MKDIR) $(INSTALL_UNITDIR)
  1321. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  1322. ifneq ($(INSTALLPPULINKFILES),)
  1323. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  1324. endif
  1325. ifneq ($(wildcard $(LIB_FULLNAME)),)
  1326. $(MKDIR) $(INSTALL_LIBDIR)
  1327. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  1328. ifdef inUnix
  1329. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  1330. endif
  1331. endif
  1332. endif
  1333. ifdef INSTALL_FILES
  1334. $(MKDIR) $(INSTALL_DATADIR)
  1335. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  1336. endif
  1337. fpc_sourceinstall: distclean
  1338. $(MKDIR) $(INSTALL_SOURCEDIR)
  1339. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  1340. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  1341. ifdef HASEXAMPLES
  1342. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  1343. endif
  1344. ifdef EXAMPLESOURCEFILES
  1345. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  1346. endif
  1347. ifdef TARGET_EXAMPLEDIRS
  1348. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  1349. endif
  1350. .PHONY: fpc_distinstall
  1351. fpc_distinstall: install exampleinstall
  1352. .PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
  1353. ifndef PACKDIR
  1354. ifndef inUnix
  1355. PACKDIR=$(BASEDIR)/../fpc-pack
  1356. else
  1357. PACKDIR=/tmp/fpc-pack
  1358. endif
  1359. endif
  1360. ifndef ZIPNAME
  1361. ifdef DIST_ZIPNAME
  1362. ZIPNAME=$(DIST_ZIPNAME)
  1363. else
  1364. ZIPNAME=$(ZIPPREFIX)$(PACKAGE_NAME)$(ZIPSUFFIX)
  1365. endif
  1366. endif
  1367. ifndef ZIPTARGET
  1368. ifdef DIST_ZIPTARGET
  1369. ZIPTARGET=DIST_ZIPTARGET
  1370. else
  1371. ZIPTARGET=install
  1372. endif
  1373. endif
  1374. ifndef USEZIP
  1375. ifdef inUnix
  1376. USETAR=1
  1377. endif
  1378. endif
  1379. ifndef inUnix
  1380. USEZIPWRAPPER=1
  1381. endif
  1382. ifdef USEZIPWRAPPER
  1383. ZIPPATHSEP=$(PATHSEP)
  1384. ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(BATCHEXT))
  1385. else
  1386. ZIPPATHSEP=/
  1387. endif
  1388. ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
  1389. ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
  1390. ifdef USETAR
  1391. ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(TAREXT)
  1392. ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
  1393. else
  1394. ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(ZIPEXT)
  1395. ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
  1396. endif
  1397. fpc_zipinstall:
  1398. $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
  1399. $(MKDIR) $(DIST_DESTDIR)
  1400. $(DEL) $(ZIPDESTFILE)
  1401. ifdef USEZIPWRAPPER
  1402. ifneq ($(ECHOREDIR),echo)
  1403. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
  1404. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
  1405. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
  1406. else
  1407. echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
  1408. echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
  1409. echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
  1410. endif
  1411. ifdef inUnix
  1412. /bin/sh $(ZIPWRAPPER)
  1413. else
  1414. $(ZIPWRAPPER)
  1415. endif
  1416. $(DEL) $(ZIPWRAPPER)
  1417. else
  1418. $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
  1419. endif
  1420. $(DELTREE) $(PACKDIR)
  1421. fpc_zipsourceinstall:
  1422. $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=src
  1423. fpc_zipexampleinstall:
  1424. ifdef HASEXAMPLES
  1425. $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=exm
  1426. endif
  1427. fpc_zipdistinstall:
  1428. $(MAKE) fpc_zipinstall ZIPTARGET=distinstall
  1429. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  1430. ifdef EXEFILES
  1431. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  1432. endif
  1433. ifdef CLEAN_UNITS
  1434. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  1435. endif
  1436. ifdef CLEANPPUFILES
  1437. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  1438. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  1439. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  1440. endif
  1441. fpc_clean: $(CLEANTARGET)
  1442. ifdef CLEANEXEFILES
  1443. -$(DEL) $(CLEANEXEFILES)
  1444. endif
  1445. ifdef CLEANPPUFILES
  1446. -$(DEL) $(CLEANPPUFILES)
  1447. endif
  1448. ifneq ($(CLEANPPULINKFILES),)
  1449. -$(DEL) $(CLEANPPULINKFILES)
  1450. endif
  1451. ifdef CLEANRSTFILES
  1452. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1453. endif
  1454. ifdef CLEAN_FILES
  1455. -$(DEL) $(CLEAN_FILES)
  1456. endif
  1457. ifdef LIB_NAME
  1458. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  1459. endif
  1460. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1461. fpc_distclean: clean
  1462. ifdef COMPILER_UNITTARGETDIR
  1463. TARGETDIRCLEAN=fpc_clean
  1464. endif
  1465. fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
  1466. ifdef CLEANEXEFILES
  1467. -$(DEL) $(CLEANEXEFILES)
  1468. endif
  1469. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  1470. -$(DELTREE) *$(SMARTEXT)
  1471. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1472. ifdef AOUTEXT
  1473. -$(DEL) *$(AOUTEXT)
  1474. endif
  1475. .PHONY: fpc_baseinfo
  1476. override INFORULES+=fpc_baseinfo
  1477. fpc_baseinfo:
  1478. @$(ECHO)
  1479. @$(ECHO) == Package info ==
  1480. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  1481. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  1482. @$(ECHO)
  1483. @$(ECHO) == Configuration info ==
  1484. @$(ECHO)
  1485. @$(ECHO) FPC.......... $(FPC)
  1486. @$(ECHO) FPC Version.. $(FPC_VERSION)
  1487. @$(ECHO) Source CPU... $(CPU_SOURCE)
  1488. @$(ECHO) Target CPU... $(CPU_TARGET)
  1489. @$(ECHO) Source OS.... $(OS_SOURCE)
  1490. @$(ECHO) Target OS.... $(OS_TARGET)
  1491. @$(ECHO) Full Source.. $(FULL_SOURCE)
  1492. @$(ECHO) Full Target.. $(FULL_TARGET)
  1493. @$(ECHO)
  1494. @$(ECHO) == Directory info ==
  1495. @$(ECHO)
  1496. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  1497. @$(ECHO)
  1498. @$(ECHO) Basedir......... $(BASEDIR)
  1499. @$(ECHO) FPCDir.......... $(FPCDIR)
  1500. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  1501. @$(ECHO) UnitsDir........ $(UNITSDIR)
  1502. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  1503. @$(ECHO)
  1504. @$(ECHO) GCC library..... $(GCCLIBDIR)
  1505. @$(ECHO) Other library... $(OTHERLIBDIR)
  1506. @$(ECHO)
  1507. @$(ECHO) == Tools info ==
  1508. @$(ECHO)
  1509. @$(ECHO) As........ $(AS)
  1510. @$(ECHO) Ld........ $(LD)
  1511. @$(ECHO) Ar........ $(AR)
  1512. @$(ECHO) Rc........ $(RC)
  1513. @$(ECHO)
  1514. @$(ECHO) Mv........ $(MVPROG)
  1515. @$(ECHO) Cp........ $(CPPROG)
  1516. @$(ECHO) Rm........ $(RMPROG)
  1517. @$(ECHO) GInstall.. $(GINSTALL)
  1518. @$(ECHO) Echo...... $(ECHO)
  1519. @$(ECHO) Shell..... $(SHELL)
  1520. @$(ECHO) Date...... $(DATE)
  1521. @$(ECHO) FPCMake... $(FPCMAKE)
  1522. @$(ECHO) PPUMove... $(PPUMOVE)
  1523. @$(ECHO) Upx....... $(UPXPROG)
  1524. @$(ECHO) Zip....... $(ZIPPROG)
  1525. @$(ECHO)
  1526. @$(ECHO) == Object info ==
  1527. @$(ECHO)
  1528. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  1529. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  1530. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  1531. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  1532. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  1533. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  1534. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  1535. @$(ECHO)
  1536. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  1537. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  1538. @$(ECHO)
  1539. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  1540. @$(ECHO) Install Files....... $(INSTALL_FILES)
  1541. @$(ECHO)
  1542. @$(ECHO) == Install info ==
  1543. @$(ECHO)
  1544. @$(ECHO) DateStr.............. $(DATESTR)
  1545. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  1546. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  1547. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  1548. @$(ECHO)
  1549. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  1550. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  1551. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  1552. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  1553. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  1554. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  1555. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  1556. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  1557. @$(ECHO)
  1558. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  1559. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  1560. @$(ECHO)
  1561. .PHONY: fpc_info
  1562. fpc_info: $(INFORULES)
  1563. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  1564. fpc_makefile_dirs
  1565. fpc_makefile:
  1566. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  1567. fpc_makefile_sub1:
  1568. ifdef TARGET_DIRS
  1569. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  1570. endif
  1571. ifdef TARGET_EXAMPLEDIRS
  1572. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  1573. endif
  1574. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  1575. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  1576. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  1577. all: fpc_all
  1578. debug: fpc_debug
  1579. smart: fpc_smart
  1580. release: fpc_release
  1581. examples: fpc_examples
  1582. shared:
  1583. install: fpc_install
  1584. sourceinstall: fpc_sourceinstall
  1585. exampleinstall: fpc_exampleinstall
  1586. distinstall: fpc_distinstall
  1587. zipinstall: fpc_zipinstall
  1588. zipsourceinstall: fpc_zipsourceinstall
  1589. zipexampleinstall: fpc_zipexampleinstall
  1590. zipdistinstall: fpc_zipdistinstall
  1591. clean: fpc_clean
  1592. distclean: fpc_distclean
  1593. cleanall: fpc_cleanall
  1594. info: fpc_info
  1595. makefiles: fpc_makefiles
  1596. .PHONY: all debug smart release examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  1597. ifneq ($(wildcard fpcmake.loc),)
  1598. include fpcmake.loc
  1599. endif