Makefile 37 KB

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