Makefile 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 1.1 [2001/08/22]
  3. #
  4. default: all
  5. override PATH:=$(subst \,/,$(PATH))
  6. ifeq ($(findstring ;,$(PATH)),)
  7. inUnix=1
  8. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  9. else
  10. SEARCHPATH:=$(subst ;, ,$(PATH))
  11. endif
  12. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  13. ifeq ($(PWD),)
  14. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  15. ifeq ($(PWD),)
  16. nopwd:
  17. @echo You need the GNU utils package to use this Makefile!
  18. @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
  19. @exit
  20. else
  21. PWD:=$(firstword $(PWD))
  22. SRCEXEEXT=
  23. endif
  24. else
  25. PWD:=$(firstword $(PWD))
  26. SRCEXEEXT=.exe
  27. endif
  28. ifndef inUnix
  29. ifeq ($(OS),Windows_NT)
  30. inWinNT=1
  31. else
  32. ifdef OS2_SHELL
  33. inOS2=1
  34. endif
  35. endif
  36. else
  37. ifneq ($(findstring cygwin,$(MACHTYPE)),)
  38. inCygWin=1
  39. endif
  40. endif
  41. ifdef inUnix
  42. BATCHEXT=.sh
  43. else
  44. ifdef inOS2
  45. BATCHEXT=.cmd
  46. else
  47. BATCHEXT=.bat
  48. endif
  49. endif
  50. ifdef inUnix
  51. PATHSEP=/
  52. else
  53. PATHSEP:=$(subst /,\,/)
  54. endif
  55. ifdef PWD
  56. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  57. ifdef inCygWin
  58. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  59. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  60. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  61. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  62. endif
  63. endif
  64. else
  65. BASEDIR=.
  66. endif
  67. ifndef FPC
  68. ifdef PP
  69. FPC=$(PP)
  70. else
  71. ifdef inUnix
  72. CPU_SOURCE=$(shell uname -m)
  73. ifeq (m68k,$(CPU_SOURCE))
  74. FPC=ppc68k
  75. else
  76. FPC=ppc386
  77. endif
  78. else
  79. FPC=ppc386
  80. endif
  81. endif
  82. endif
  83. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  84. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  85. ifndef OS_TARGET
  86. OS_TARGET:=$(shell $(FPC) -iTO)
  87. endif
  88. ifndef OS_SOURCE
  89. OS_SOURCE:=$(shell $(FPC) -iSO)
  90. endif
  91. ifndef CPU_TARGET
  92. CPU_TARGET:=$(shell $(FPC) -iTP)
  93. endif
  94. ifndef CPU_SOURCE
  95. CPU_SOURCE:=$(shell $(FPC) -iSP)
  96. endif
  97. ifndef FPC_VERSION
  98. FPC_VERSION:=$(shell $(FPC) -iV)
  99. endif
  100. export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
  101. ifdef FPCDIR
  102. override FPCDIR:=$(subst \,/,$(FPCDIR))
  103. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  104. override FPCDIR=wrong
  105. endif
  106. else
  107. override FPCDIR=wrong
  108. endif
  109. ifeq ($(FPCDIR),wrong)
  110. override FPCDIR=../..
  111. ifeq ($(wildcard $(FPCDIR)/rtl),)
  112. ifeq ($(wildcard $(FPCDIR)/units),)
  113. override FPCDIR=wrong
  114. endif
  115. endif
  116. endif
  117. ifeq ($(FPCDIR),wrong)
  118. ifdef inUnix
  119. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  120. ifeq ($(wildcard $(FPCDIR)/units),)
  121. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  122. endif
  123. else
  124. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  125. override FPCDIR:=$(FPCDIR)/..
  126. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  127. override FPCDIR:=$(FPCDIR)/..
  128. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  129. override FPCDIR=c:/pp
  130. endif
  131. endif
  132. endif
  133. endif
  134. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  135. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
  136. override PACKAGE_NAME=postgres
  137. override PACKAGE_VERSION=1.0.5
  138. override TARGET_UNITS+=dllist postgres
  139. override TARGET_EXAMPLES+=testpg1 testpg2
  140. override INSTALL_FPCPACKAGE=y
  141. ifndef ECHO
  142. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  143. ifeq ($(ECHO),)
  144. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  145. ifeq ($(ECHO),)
  146. ECHO=
  147. else
  148. ECHO:=$(firstword $(ECHO))
  149. endif
  150. else
  151. ECHO:=$(firstword $(ECHO))
  152. endif
  153. endif
  154. export ECHO
  155. ifndef DATE
  156. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  157. ifeq ($(DATE),)
  158. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  159. ifeq ($(DATE),)
  160. DATE=
  161. else
  162. DATE:=$(firstword $(DATE))
  163. endif
  164. else
  165. DATE:=$(firstword $(DATE))
  166. endif
  167. endif
  168. export DATE
  169. ifndef GINSTALL
  170. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  171. ifeq ($(GINSTALL),)
  172. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  173. ifeq ($(GINSTALL),)
  174. GINSTALL=
  175. else
  176. GINSTALL:=$(firstword $(GINSTALL))
  177. endif
  178. else
  179. GINSTALL:=$(firstword $(GINSTALL))
  180. endif
  181. endif
  182. export GINSTALL
  183. ifndef CPPROG
  184. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  185. ifeq ($(CPPROG),)
  186. CPPROG=
  187. else
  188. CPPROG:=$(firstword $(CPPROG))
  189. endif
  190. endif
  191. export CPPROG
  192. ifndef RMPROG
  193. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  194. ifeq ($(RMPROG),)
  195. RMPROG=
  196. else
  197. RMPROG:=$(firstword $(RMPROG))
  198. endif
  199. endif
  200. export RMPROG
  201. ifndef MVPROG
  202. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  203. ifeq ($(MVPROG),)
  204. MVPROG=
  205. else
  206. MVPROG:=$(firstword $(MVPROG))
  207. endif
  208. endif
  209. export MVPROG
  210. ifndef ECHOREDIR
  211. ECHOREDIR:=$(subst /,$(PATHSEP),$(ECHO))
  212. endif
  213. ifndef COPY
  214. COPY:=$(CPPROG) -fp
  215. endif
  216. ifndef COPYTREE
  217. COPYTREE:=$(CPPROG) -rfp
  218. endif
  219. ifndef MOVE
  220. MOVE:=$(MVPROG) -f
  221. endif
  222. ifndef DEL
  223. DEL:=$(RMPROG) -f
  224. endif
  225. ifndef DELTREE
  226. DELTREE:=$(RMPROG) -rf
  227. endif
  228. ifndef INSTALL
  229. ifdef inUnix
  230. INSTALL:=$(GINSTALL) -c -m 644
  231. else
  232. INSTALL:=$(COPY)
  233. endif
  234. endif
  235. ifndef INSTALLEXE
  236. ifdef inUnix
  237. INSTALLEXE:=$(GINSTALL) -c -m 755
  238. else
  239. INSTALLEXE:=$(COPY)
  240. endif
  241. endif
  242. ifndef MKDIR
  243. MKDIR:=$(GINSTALL) -m 755 -d
  244. endif
  245. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  246. ifndef PPUMOVE
  247. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  248. ifeq ($(PPUMOVE),)
  249. PPUMOVE=
  250. else
  251. PPUMOVE:=$(firstword $(PPUMOVE))
  252. endif
  253. endif
  254. export PPUMOVE
  255. ifndef FPCMAKE
  256. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  257. ifeq ($(FPCMAKE),)
  258. FPCMAKE=
  259. else
  260. FPCMAKE:=$(firstword $(FPCMAKE))
  261. endif
  262. endif
  263. export FPCMAKE
  264. ifndef ZIPPROG
  265. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  266. ifeq ($(ZIPPROG),)
  267. ZIPPROG=
  268. else
  269. ZIPPROG:=$(firstword $(ZIPPROG))
  270. endif
  271. endif
  272. export ZIPPROG
  273. ifndef TARPROG
  274. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  275. ifeq ($(TARPROG),)
  276. TARPROG=
  277. else
  278. TARPROG:=$(firstword $(TARPROG))
  279. endif
  280. endif
  281. export TARPROG
  282. ifndef AS
  283. AS=as
  284. endif
  285. ifndef LD
  286. LD=ld
  287. endif
  288. ifndef RC
  289. RC=rc
  290. endif
  291. PPAS=ppas$(BATCHEXT)
  292. ifdef inUnix
  293. LDCONFIG=ldconfig
  294. else
  295. LDCONFIG=
  296. endif
  297. ifdef DATE
  298. DATESTR:=$(shell $(DATE) +%Y%m%d)
  299. else
  300. DATESTR=
  301. endif
  302. ifndef UPXPROG
  303. ifeq ($(OS_TARGET),go32v2)
  304. UPXPROG:=1
  305. endif
  306. ifeq ($(OS_TARGET),win32)
  307. UPXPROG:=1
  308. endif
  309. ifdef UPXPROG
  310. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  311. ifeq ($(UPXPROG),)
  312. UPXPROG=
  313. else
  314. UPXPROG:=$(firstword $(UPXPROG))
  315. endif
  316. else
  317. UPXPROG=
  318. endif
  319. endif
  320. export UPXPROG
  321. ZIPOPT=-9
  322. ZIPEXT=.zip
  323. ifeq ($(USETAR),bz2)
  324. TAROPT=vI
  325. TAREXT=.tar.bz2
  326. else
  327. TAROPT=vz
  328. TAREXT=.tar.gz
  329. endif
  330. LOADEREXT=.as
  331. EXEEXT=.exe
  332. PPLEXT=.ppl
  333. PPUEXT=.ppu
  334. OEXT=.o
  335. ASMEXT=.s
  336. SMARTEXT=.sl
  337. STATICLIBEXT=.a
  338. SHAREDLIBEXT=.so
  339. STATICLIBPREFIX=libp
  340. RSTEXT=.rst
  341. FPCMADE=fpcmade
  342. ifeq ($(OS_TARGET),go32v1)
  343. PPUEXT=.pp1
  344. OEXT=.o1
  345. ASMEXT=.s1
  346. SMARTEXT=.sl1
  347. STATICLIBEXT=.a1
  348. SHAREDLIBEXT=.so1
  349. STATICLIBPREFIX=
  350. FPCMADE=fpcmade.v1
  351. PACKAGESUFFIX=v1
  352. endif
  353. ifeq ($(OS_TARGET),go32v2)
  354. STATICLIBPREFIX=
  355. FPCMADE=fpcmade.dos
  356. ZIPSUFFIX=go32
  357. endif
  358. ifeq ($(OS_TARGET),linux)
  359. EXEEXT=
  360. HASSHAREDLIB=1
  361. FPCMADE=fpcmade.lnx
  362. ZIPSUFFIX=linux
  363. endif
  364. ifeq ($(OS_TARGET),freebsd)
  365. EXEEXT=
  366. HASSHAREDLIB=1
  367. FPCMADE=fpcmade.freebsd
  368. ZIPSUFFIX=freebsd
  369. endif
  370. ifeq ($(OS_TARGET),netbsd)
  371. EXEEXT=
  372. HASSHAREDLIB=1
  373. FPCMADE=fpcmade.netbsd
  374. ZIPSUFFIX=netbsd
  375. endif
  376. ifeq ($(OS_TARGET),win32)
  377. PPUEXT=.ppw
  378. OEXT=.ow
  379. ASMEXT=.sw
  380. SMARTEXT=.slw
  381. STATICLIBEXT=.aw
  382. SHAREDLIBEXT=.dll
  383. FPCMADE=fpcmade.w32
  384. ZIPSUFFIX=w32
  385. endif
  386. ifeq ($(OS_TARGET),os2)
  387. PPUEXT=.ppo
  388. ASMEXT=.so2
  389. OEXT=.oo2
  390. AOUTEXT=.out
  391. SMARTEXT=.so
  392. STATICLIBEXT=.ao2
  393. SHAREDLIBEXT=.dll
  394. FPCMADE=fpcmade.os2
  395. ZIPSUFFIX=emx
  396. endif
  397. ifeq ($(OS_TARGET),amiga)
  398. EXEEXT=
  399. PPUEXT=.ppa
  400. ASMEXT=.asm
  401. OEXT=.o
  402. SMARTEXT=.sl
  403. STATICLIBEXT=.a
  404. SHAREDLIBEXT=.library
  405. FPCMADE=fpcmade.amg
  406. endif
  407. ifeq ($(OS_TARGET),atari)
  408. PPUEXT=.ppt
  409. ASMEXT=.s
  410. OEXT=.o
  411. SMARTEXT=.sl
  412. STATICLIBEXT=.a
  413. EXEEXT=.ttp
  414. FPCMADE=fpcmade.ata
  415. endif
  416. ifdef REQUIRE_UNITSDIR
  417. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  418. endif
  419. ifdef REQUIRE_PACKAGESDIR
  420. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  421. endif
  422. ifdef ZIPINSTALL
  423. ifeq ($(OS_TARGET),linux)
  424. UNIXINSTALLDIR=1
  425. endif
  426. ifeq ($(OS_TARGET),freebsd)
  427. UNIXINSTALLDIR=1
  428. endif
  429. ifeq ($(OS_TARGET),netbsd)
  430. UNIXINSTALLDIR=1
  431. endif
  432. else
  433. ifeq ($(OS_SOURCE),linux)
  434. UNIXINSTALLDIR=1
  435. endif
  436. ifeq ($(OS_SOURCE),freebsd)
  437. UNIXINSTALLDIR=1
  438. endif
  439. ifeq ($(OS_SOURCE),netbsd)
  440. UNIXINSTALLDIR=1
  441. endif
  442. endif
  443. ifndef INSTALL_PREFIX
  444. ifdef UNIXINSTALLDIR
  445. INSTALL_PREFIX=/usr/local
  446. else
  447. ifdef INSTALL_FPCPACKAGE
  448. INSTALL_BASEDIR:=/pp
  449. else
  450. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  451. endif
  452. endif
  453. endif
  454. export INSTALL_PREFIX
  455. ifndef DIST_DESTDIR
  456. DIST_DESTDIR:=$(BASEDIR)
  457. endif
  458. export DIST_DESTDIR
  459. ifndef INSTALL_BASEDIR
  460. ifdef UNIXINSTALLDIR
  461. ifdef INSTALL_FPCPACKAGE
  462. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  463. else
  464. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  465. endif
  466. else
  467. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  468. endif
  469. endif
  470. ifndef INSTALL_BINDIR
  471. ifdef UNIXINSTALLDIR
  472. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  473. else
  474. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  475. ifdef INSTALL_FPCPACKAGE
  476. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(OS_TARGET)
  477. endif
  478. endif
  479. endif
  480. ifndef INSTALL_UNITDIR
  481. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(OS_TARGET)
  482. ifdef INSTALL_FPCPACKAGE
  483. ifdef PACKAGE_NAME
  484. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  485. endif
  486. endif
  487. endif
  488. ifndef INSTALL_LIBDIR
  489. ifdef UNIXINSTALLDIR
  490. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  491. else
  492. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  493. endif
  494. endif
  495. ifndef INSTALL_SOURCEDIR
  496. ifdef UNIXINSTALLDIR
  497. ifdef INSTALL_FPCPACKAGE
  498. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  499. else
  500. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  501. endif
  502. else
  503. ifdef INSTALL_FPCPACKAGE
  504. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  505. else
  506. INSTALL_SOURCEDIRL:=$(INSTALL_BASEDIR)/source
  507. endif
  508. endif
  509. endif
  510. ifndef INSTALL_DOCDIR
  511. ifdef UNIXINSTALLDIR
  512. ifdef INSTALL_FPCPACKAGE
  513. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  514. else
  515. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  516. endif
  517. else
  518. ifdef INSTALL_FPCPACKAGE
  519. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  520. else
  521. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  522. endif
  523. endif
  524. endif
  525. ifndef INSTALL_EXAMPLEDIR
  526. ifdef UNIXINSTALLDIR
  527. ifdef INSTALL_FPCPACKAGE
  528. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  529. else
  530. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  531. endif
  532. else
  533. ifdef INSTALL_FPCPACKAGE
  534. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  535. else
  536. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  537. endif
  538. endif
  539. endif
  540. ifndef INSTALL_DATADIR
  541. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  542. endif
  543. ifdef inUnix
  544. ifndef GCCLIBDIR
  545. GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
  546. endif
  547. ifndef OTHERLIBDIR
  548. OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
  549. endif
  550. export GCCLIBDIR OTHERLIB
  551. endif
  552. ifeq ($(OS_TARGET),linux)
  553. REQUIRE_PACKAGES_RTL=1
  554. endif
  555. ifeq ($(OS_TARGET),go32v2)
  556. REQUIRE_PACKAGES_RTL=1
  557. endif
  558. ifeq ($(OS_TARGET),win32)
  559. REQUIRE_PACKAGES_RTL=1
  560. endif
  561. ifeq ($(OS_TARGET),os2)
  562. REQUIRE_PACKAGES_RTL=1
  563. endif
  564. ifeq ($(OS_TARGET),freebsd)
  565. REQUIRE_PACKAGES_RTL=1
  566. endif
  567. ifeq ($(OS_TARGET),beos)
  568. REQUIRE_PACKAGES_RTL=1
  569. endif
  570. ifeq ($(OS_TARGET),netbsd)
  571. REQUIRE_PACKAGES_RTL=1
  572. endif
  573. ifeq ($(OS_TARGET),amiga)
  574. REQUIRE_PACKAGES_RTL=1
  575. endif
  576. ifeq ($(OS_TARGET),atari)
  577. REQUIRE_PACKAGES_RTL=1
  578. endif
  579. ifdef REQUIRE_PACKAGES_RTL
  580. PACKAGEDIR_RTL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))
  581. ifneq ($(PACKAGEDIR_RTL),)
  582. PACKAGEDIR_RTL:=$(firstword $(PACKAGEDIR_RTL))
  583. ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
  584. override COMPILEPACKAGES+=package_rtl
  585. package_rtl:
  586. $(MAKE) -C $(PACKAGEDIR_RTL) all
  587. endif
  588. ifneq ($(wildcard $(PACKAGEDIR_RTL)/$(OS_TARGET)),)
  589. UNITDIR_RTL=$(PACKAGEDIR_RTL)/$(OS_TARGET)
  590. else
  591. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  592. endif
  593. else
  594. PACKAGEDIR_RTL=
  595. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  596. ifneq ($(UNITDIR_RTL),)
  597. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  598. else
  599. UNITDIR_RTL=
  600. endif
  601. endif
  602. ifdef UNITDIR_RTL
  603. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  604. endif
  605. endif
  606. .PHONY: package_rtl
  607. override FPCOPTDEF=$(CPU_TARGET)
  608. ifneq ($(OS_TARGET),$(OS_SOURCE))
  609. override FPCOPT+=-T$(OS_TARGET)
  610. endif
  611. ifdef UNITDIR
  612. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  613. endif
  614. ifdef LIBDIR
  615. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  616. endif
  617. ifdef OBJDIR
  618. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  619. endif
  620. ifdef INCDIR
  621. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  622. endif
  623. ifdef LINKSMART
  624. override FPCOPT+=-XX
  625. endif
  626. ifdef CREATESMART
  627. override FPCOPT+=-CX
  628. endif
  629. ifdef DEBUG
  630. override FPCOPT+=-gl
  631. override FPCOPTDEF+=DEBUG
  632. endif
  633. ifdef RELEASE
  634. override FPCOPT+=-Xs -OG2p3 -n
  635. override FPCOPTDEF+=RELEASE
  636. endif
  637. ifdef STRIP
  638. override FPCOPT+=-Xs
  639. endif
  640. ifdef OPTIMIZE
  641. override FPCOPT+=-OG2p3
  642. endif
  643. ifdef VERBOSE
  644. override FPCOPT+=-vwni
  645. endif
  646. ifdef COMPILER_OPTIONS
  647. override FPCOPT+=$(COMPILER_OPTIONS)
  648. endif
  649. ifdef COMPILER_UNITDIR
  650. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  651. endif
  652. ifdef COMPILER_LIBRARYDIR
  653. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  654. endif
  655. ifdef COMPILER_OBJECTDIR
  656. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  657. endif
  658. ifdef COMPILER_INCLUDEDIR
  659. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  660. endif
  661. ifdef COMPILER_TARGETDIR
  662. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  663. ifeq ($(COMPILER_TARGETDIR),.)
  664. override TARGETDIRPREFIX=
  665. else
  666. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  667. endif
  668. endif
  669. ifdef COMPILER_UNITTARGETDIR
  670. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  671. ifeq ($(COMPILER_UNITTARGETDIR),.)
  672. override UNITTARGETDIRPREFIX=
  673. else
  674. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  675. endif
  676. else
  677. ifdef COMPILER_TARGETDIR
  678. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  679. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  680. endif
  681. endif
  682. ifdef GCCLIBDIR
  683. override FPCOPT+=-Fl$(GCCLIBDIR)
  684. endif
  685. ifdef OTHERLIBDIR
  686. override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
  687. endif
  688. ifdef OPT
  689. override FPCOPT+=$(OPT)
  690. endif
  691. ifdef FPCOPTDEF
  692. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  693. endif
  694. ifdef CFGFILE
  695. override FPCOPT+=@$(CFGFILE)
  696. endif
  697. ifdef USEENV
  698. override FPCEXTCMD:=$(FPCOPT)
  699. override FPCOPT:=!FPCEXTCMD
  700. export FPCEXTCMD
  701. endif
  702. override COMPILER:=$(FPC) $(FPCOPT)
  703. ifeq (,$(findstring -s ,$(COMPILER)))
  704. EXECPPAS=
  705. else
  706. ifeq ($(OS_SOURCE),$(OS_TARGET))
  707. EXECPPAS:=@$(PPAS)
  708. endif
  709. endif
  710. .PHONY: fpc_units
  711. ifdef TARGET_UNITS
  712. override ALLTARGET+=fpc_units
  713. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  714. override INSTALLPPUFILES+=$(UNITPPUFILES)
  715. override CLEANPPUFILES+=$(UNITPPUFILES)
  716. endif
  717. fpc_units: $(UNITPPUFILES)
  718. ifdef TARGET_RSTS
  719. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  720. override CLEANRSTFILES+=$(RSTFILES)
  721. endif
  722. .PHONY: fpc_examples
  723. ifdef TARGET_EXAMPLES
  724. HASEXAMPLES=1
  725. override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)))
  726. override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))
  727. override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES)))
  728. override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
  729. ifeq ($(OS_TARGET),os2)
  730. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
  731. endif
  732. endif
  733. ifdef TARGET_EXAMPLEDIRS
  734. HASEXAMPLES=1
  735. endif
  736. fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS))
  737. .PHONY: fpc_packages fpc_all fpc_smart fpc_debug
  738. $(FPCMADE): $(ALLTARGET)
  739. @$(ECHOREDIR) Compiled > $(FPCMADE)
  740. fpc_packages: $(COMPILEPACKAGES)
  741. fpc_all: fpc_packages $(FPCMADE)
  742. fpc_smart:
  743. $(MAKE) all LINKSMART=1 CREATESMART=1
  744. fpc_debug:
  745. $(MAKE) all DEBUG=1
  746. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
  747. %$(PPUEXT): %.pp
  748. $(COMPILER) $<
  749. $(EXECPPAS)
  750. %$(PPUEXT): %.pas
  751. $(COMPILER) $<
  752. $(EXECPPAS)
  753. %$(EXEEXT): %.pp
  754. $(COMPILER) $<
  755. $(EXECPPAS)
  756. %$(EXEEXT): %.pas
  757. $(COMPILER) $<
  758. $(EXECPPAS)
  759. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  760. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  761. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  762. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  763. ifdef INSTALL_UNITS
  764. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  765. endif
  766. ifdef INSTALLPPUFILES
  767. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  768. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
  769. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)))
  770. override INSTALL_CREATEPACKAGEFPC=1
  771. endif
  772. ifdef INSTALLEXEFILES
  773. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
  774. endif
  775. fpc_install: all $(INSTALLTARGET)
  776. ifdef INSTALLEXEFILES
  777. $(MKDIR) $(INSTALL_BINDIR)
  778. ifdef UPXPROG
  779. -$(UPXPROG) $(INSTALLEXEFILES)
  780. endif
  781. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  782. endif
  783. ifdef INSTALL_CREATEPACKAGEFPC
  784. ifdef FPCMAKE
  785. ifdef PACKAGE_VERSION
  786. ifneq ($(wildcard Makefile.fpc),)
  787. $(FPCMAKE) -p -T$(OS_TARGET) Makefile.fpc
  788. $(MKDIR) $(INSTALL_UNITDIR)
  789. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  790. endif
  791. endif
  792. endif
  793. endif
  794. ifdef INSTALLPPUFILES
  795. $(MKDIR) $(INSTALL_UNITDIR)
  796. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  797. ifneq ($(INSTALLPPULINKFILES),)
  798. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  799. endif
  800. ifneq ($(wildcard $(LIB_FULLNAME)),)
  801. $(MKDIR) $(INSTALL_LIBDIR)
  802. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  803. ifdef inUnix
  804. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  805. endif
  806. endif
  807. endif
  808. ifdef INSTALL_FILES
  809. $(MKDIR) $(INSTALL_DATADIR)
  810. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  811. endif
  812. fpc_sourceinstall: distclean
  813. $(MKDIR) $(INSTALL_SOURCEDIR)
  814. $(COPYTREE) $(BASEDIR) $(INSTALL_SOURCEDIR)
  815. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  816. ifdef HASEXAMPLES
  817. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  818. endif
  819. ifdef EXAMPLESOURCEFILES
  820. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  821. endif
  822. ifdef TARGET_EXAMPLEDIRS
  823. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  824. endif
  825. .PHONY: fpc_distinstall
  826. fpc_distinstall: install exampleinstall
  827. .PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
  828. ifndef PACKDIR
  829. ifndef inUnix
  830. PACKDIR=$(BASEDIR)/../fpc-pack
  831. else
  832. PACKDIR=/tmp/fpc-pack
  833. endif
  834. endif
  835. ifndef ZIPNAME
  836. ifdef DIST_ZIPNAME
  837. ZIPNAME=$(DIST_ZIPNAME)
  838. else
  839. ZIPNAME=$(ZIPPREFIX)$(PACKAGE_NAME)$(ZIPSUFFIX)
  840. endif
  841. endif
  842. ifndef ZIPTARGET
  843. ifdef DIST_ZIPTARGET
  844. ZIPTARGET=DIST_ZIPTARGET
  845. else
  846. ZIPTARGET=install
  847. endif
  848. endif
  849. ifndef USEZIP
  850. ifdef inUnix
  851. USETAR=1
  852. endif
  853. endif
  854. ifndef inUnix
  855. USEZIPWRAPPER=1
  856. endif
  857. ifdef USEZIPWRAPPER
  858. ZIPPATHSEP=$(PATHSEP)
  859. ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(BATCHEXT))
  860. else
  861. ZIPPATHSEP=/
  862. endif
  863. ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
  864. ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
  865. ifdef USETAR
  866. ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(TAREXT)
  867. ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
  868. else
  869. ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(ZIPEXT)
  870. ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
  871. endif
  872. fpc_zipinstall:
  873. $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
  874. $(MKDIR) $(DIST_DESTDIR)
  875. $(DEL) $(ZIPDESTFILE)
  876. ifdef USEZIPWRAPPER
  877. ifneq ($(ECHOREDIR),echo)
  878. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
  879. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
  880. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
  881. else
  882. echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
  883. echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
  884. echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
  885. endif
  886. ifdef inUnix
  887. /bin/sh $(ZIPWRAPPER)
  888. else
  889. $(ZIPWRAPPER)
  890. endif
  891. $(DEL) $(ZIPWRAPPER)
  892. else
  893. $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
  894. endif
  895. $(DELTREE) $(PACKDIR)
  896. fpc_zipsourceinstall:
  897. $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=src
  898. fpc_zipexampleinstall:
  899. ifdef HASEXAMPLES
  900. $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=exm
  901. endif
  902. fpc_zipdistinstall:
  903. $(MAKE) fpc_zipinstall ZIPTARGET=distinstall
  904. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  905. ifdef EXEFILES
  906. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  907. endif
  908. ifdef CLEAN_UNITS
  909. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  910. endif
  911. ifdef CLEANPPUFILES
  912. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  913. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  914. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  915. endif
  916. fpc_clean: $(CLEANTARGET)
  917. ifdef CLEANEXEFILES
  918. -$(DEL) $(CLEANEXEFILES)
  919. endif
  920. ifdef CLEANPPUFILES
  921. -$(DEL) $(CLEANPPUFILES)
  922. endif
  923. ifneq ($(CLEANPPULINKFILES),)
  924. -$(DEL) $(CLEANPPULINKFILES)
  925. endif
  926. ifdef CLEANRSTFILES
  927. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  928. endif
  929. ifdef CLEAN_FILES
  930. -$(DEL) $(CLEAN_FILES)
  931. endif
  932. ifdef LIB_NAME
  933. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  934. endif
  935. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
  936. fpc_distclean: clean
  937. ifdef COMPILER_UNITTARGETDIR
  938. TARGETDIRCLEAN=fpc_clean
  939. endif
  940. fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
  941. ifdef CLEANEXEFILES
  942. -$(DEL) $(CLEANEXEFILES)
  943. endif
  944. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  945. -$(DELTREE) *$(SMARTEXT)
  946. -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
  947. ifdef AOUTEXT
  948. -$(DEL) *$(AOUTEXT)
  949. endif
  950. .PHONY: fpc_info
  951. fpc_info:
  952. @$(ECHO)
  953. @$(ECHO) == Package info ==
  954. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  955. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  956. @$(ECHO)
  957. @$(ECHO) == Configuration info ==
  958. @$(ECHO)
  959. @$(ECHO) FPC.......... $(FPC)
  960. @$(ECHO) FPC Version.. $(FPC_VERSION)
  961. @$(ECHO) Source CPU... $(CPU_SOURCE)
  962. @$(ECHO) Target CPU... $(CPU_TARGET)
  963. @$(ECHO) Source OS.... $(OS_SOURCE)
  964. @$(ECHO) Target OS.... $(OS_TARGET)
  965. @$(ECHO)
  966. @$(ECHO) == Directory info ==
  967. @$(ECHO)
  968. @$(ECHO) Basedir......... $(BASEDIR)
  969. @$(ECHO) FPCDir.......... $(FPCDIR)
  970. @$(ECHO) UnitsDir........ $(UNITSDIR)
  971. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  972. @$(ECHO)
  973. @$(ECHO) GCC library..... $(GCCLIBDIR)
  974. @$(ECHO) Other library... $(OTHERLIBDIR)
  975. @$(ECHO)
  976. @$(ECHO) == Tools info ==
  977. @$(ECHO)
  978. @$(ECHO) Pwd....... $(PWD)
  979. @$(ECHO) Mv........ $(MVPROG)
  980. @$(ECHO) Cp........ $(CPPROG)
  981. @$(ECHO) Rm........ $(RMPROG)
  982. @$(ECHO) GInstall.. $(GINSTALL)
  983. @$(ECHO) Echo...... $(ECHO)
  984. @$(ECHO) Date...... $(DATE)
  985. @$(ECHO) FPCMake... $(FPCMAKE)
  986. @$(ECHO) PPUMove... $(PPUMOVE)
  987. @$(ECHO) Upx....... $(UPXPROG)
  988. @$(ECHO) Zip....... $(ZIPPROG)
  989. @$(ECHO)
  990. @$(ECHO) == Object info ==
  991. @$(ECHO)
  992. @$(ECHO) Target Loaders...... $(TARGET_LOADERS)
  993. @$(ECHO) Target Units........ $(TARGET_UNITS)
  994. @$(ECHO) Target Programs..... $(TARGET_PROGRAMS)
  995. @$(ECHO) Target Dirs......... $(TARGET_DIRS)
  996. @$(ECHO) Target Examples..... $(TARGET_EXAMPLES)
  997. @$(ECHO) Target ExampleDirs.. $(TARGET_EXAMPLEDIRS)
  998. @$(ECHO)
  999. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  1000. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  1001. @$(ECHO)
  1002. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  1003. @$(ECHO) Install Files....... $(INSTALL_FILES)
  1004. @$(ECHO)
  1005. @$(ECHO) == Install info ==
  1006. @$(ECHO)
  1007. @$(ECHO) DateStr.............. $(DATESTR)
  1008. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  1009. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  1010. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  1011. @$(ECHO)
  1012. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  1013. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  1014. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  1015. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  1016. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  1017. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  1018. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  1019. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  1020. @$(ECHO)
  1021. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  1022. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  1023. @$(ECHO)
  1024. all: fpc_all
  1025. debug: fpc_debug
  1026. smart: fpc_smart
  1027. examples: fpc_examples
  1028. shared:
  1029. install: fpc_install
  1030. sourceinstall: fpc_sourceinstall
  1031. exampleinstall: fpc_exampleinstall
  1032. distinstall: fpc_distinstall
  1033. zipinstall: fpc_zipinstall
  1034. zipsourceinstall: fpc_zipsourceinstall
  1035. zipexampleinstall: fpc_zipexampleinstall
  1036. zipdistinstall: fpc_zipdistinstall
  1037. clean: fpc_clean
  1038. distclean: fpc_distclean
  1039. cleanall: fpc_cleanall
  1040. info: fpc_info
  1041. .PHONY: all debug smart examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info
  1042. ifneq ($(wildcard fpcmake.loc),)
  1043. include fpcmake.loc
  1044. endif