Makefile 37 KB

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