Makefile 35 KB

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