Makefile 37 KB

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