Makefile 27 KB

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