Makefile 34 KB

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