Makefile 25 KB

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