Makefile 39 KB

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