Makefile 33 KB

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