Makefile 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/29]
  3. #
  4. default: all
  5. MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
  6. BSDs = freebsd netbsd openbsd darwin
  7. UNIXs = linux $(BSDs) solaris qnx haiku
  8. LIMIT83fs = go32v2 os2 emx watcom
  9. OSNeedsComspecToRunBatch = go32v2 watcom
  10. FORCE:
  11. .PHONY: FORCE
  12. override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
  13. ifneq ($(findstring darwin,$(OSTYPE)),)
  14. inUnix=1 #darwin
  15. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  16. else
  17. ifeq ($(findstring ;,$(PATH)),)
  18. inUnix=1
  19. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  20. else
  21. SEARCHPATH:=$(subst ;, ,$(PATH))
  22. endif
  23. endif
  24. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  25. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  26. ifeq ($(PWD),)
  27. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  28. ifeq ($(PWD),)
  29. $(error You need the GNU utils package to use this Makefile)
  30. else
  31. PWD:=$(firstword $(PWD))
  32. SRCEXEEXT=
  33. endif
  34. else
  35. PWD:=$(firstword $(PWD))
  36. SRCEXEEXT=.exe
  37. endif
  38. ifndef inUnix
  39. ifeq ($(OS),Windows_NT)
  40. inWinNT=1
  41. else
  42. ifdef OS2_SHELL
  43. inOS2=1
  44. endif
  45. endif
  46. else
  47. ifneq ($(findstring cygdrive,$(PATH)),)
  48. inCygWin=1
  49. endif
  50. endif
  51. ifdef inUnix
  52. SRCBATCHEXT=.sh
  53. else
  54. ifdef inOS2
  55. SRCBATCHEXT=.cmd
  56. else
  57. SRCBATCHEXT=.bat
  58. endif
  59. endif
  60. ifdef COMSPEC
  61. ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
  62. ifndef RUNBATCH
  63. RUNBATCH=$(COMSPEC) /C
  64. endif
  65. endif
  66. endif
  67. ifdef inUnix
  68. PATHSEP=/
  69. else
  70. PATHSEP:=$(subst /,\,/)
  71. ifdef inCygWin
  72. PATHSEP=/
  73. endif
  74. endif
  75. ifdef PWD
  76. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  77. ifdef inCygWin
  78. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  79. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  80. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  81. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  82. endif
  83. endif
  84. else
  85. BASEDIR=.
  86. endif
  87. ifdef inOS2
  88. ifndef ECHO
  89. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  90. ifeq ($(ECHO),)
  91. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  92. ifeq ($(ECHO),)
  93. ECHO=echo
  94. else
  95. ECHO:=$(firstword $(ECHO))
  96. endif
  97. else
  98. ECHO:=$(firstword $(ECHO))
  99. endif
  100. endif
  101. export ECHO
  102. endif
  103. override DEFAULT_FPCDIR=../../..
  104. ifndef FPC
  105. ifdef PP
  106. FPC=$(PP)
  107. endif
  108. endif
  109. ifndef FPC
  110. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  111. ifneq ($(FPCPROG),)
  112. FPCPROG:=$(firstword $(FPCPROG))
  113. ifneq ($(CPU_TARGET),)
  114. FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
  115. else
  116. FPC:=$(shell $(FPCPROG) -PB)
  117. endif
  118. ifneq ($(findstring Error,$(FPC)),)
  119. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  120. else
  121. ifeq ($(strip $(wildcard $(FPC))),)
  122. FPC:=$(firstword $(FPCPROG))
  123. endif
  124. endif
  125. else
  126. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  127. endif
  128. endif
  129. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  130. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  131. FOUNDFPC:=$(strip $(wildcard $(FPC)))
  132. ifeq ($(FOUNDFPC),)
  133. FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
  134. ifeq ($(FOUNDFPC),)
  135. $(error Compiler $(FPC) not found)
  136. endif
  137. endif
  138. ifndef FPC_COMPILERINFO
  139. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  140. endif
  141. ifndef FPC_VERSION
  142. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  143. endif
  144. export FPC FPC_VERSION FPC_COMPILERINFO
  145. unexport CHECKDEPEND ALLDEPENDENCIES
  146. ifndef CPU_TARGET
  147. ifdef CPU_TARGET_DEFAULT
  148. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  149. endif
  150. endif
  151. ifndef OS_TARGET
  152. ifdef OS_TARGET_DEFAULT
  153. OS_TARGET=$(OS_TARGET_DEFAULT)
  154. endif
  155. endif
  156. ifneq ($(words $(FPC_COMPILERINFO)),5)
  157. FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
  158. FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
  159. FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
  160. FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
  161. endif
  162. ifndef CPU_SOURCE
  163. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  164. endif
  165. ifndef CPU_TARGET
  166. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  167. endif
  168. ifndef OS_SOURCE
  169. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  170. endif
  171. ifndef OS_TARGET
  172. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  173. endif
  174. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  175. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  176. ifeq ($(CPU_TARGET),armeb)
  177. ARCH=arm
  178. override FPCOPT+=-Cb
  179. else
  180. ifeq ($(CPU_TARGET),armel)
  181. ARCH=arm
  182. override FPCOPT+=-CaEABI
  183. else
  184. ARCH=$(CPU_TARGET)
  185. endif
  186. endif
  187. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  188. TARGETSUFFIX=$(OS_TARGET)
  189. SOURCESUFFIX=$(OS_SOURCE)
  190. else
  191. TARGETSUFFIX=$(FULL_TARGET)
  192. SOURCESUFFIX=$(FULL_SOURCE)
  193. endif
  194. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  195. CROSSCOMPILE=1
  196. endif
  197. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  198. ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
  199. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  200. endif
  201. endif
  202. ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
  203. BSDhier=1
  204. endif
  205. ifeq ($(OS_TARGET),linux)
  206. linuxHier=1
  207. endif
  208. export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
  209. ifdef FPCDIR
  210. override FPCDIR:=$(subst \,/,$(FPCDIR))
  211. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  212. override FPCDIR=wrong
  213. endif
  214. else
  215. override FPCDIR=wrong
  216. endif
  217. ifdef DEFAULT_FPCDIR
  218. ifeq ($(FPCDIR),wrong)
  219. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  220. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  221. override FPCDIR=wrong
  222. endif
  223. endif
  224. endif
  225. ifeq ($(FPCDIR),wrong)
  226. ifdef inUnix
  227. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  228. ifeq ($(wildcard $(FPCDIR)/units),)
  229. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  230. endif
  231. else
  232. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  233. override FPCDIR:=$(FPCDIR)/..
  234. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  235. override FPCDIR:=$(FPCDIR)/..
  236. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  237. override FPCDIR:=$(BASEDIR)
  238. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  239. override FPCDIR=c:/pp
  240. endif
  241. endif
  242. endif
  243. endif
  244. endif
  245. ifndef CROSSBINDIR
  246. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  247. endif
  248. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  249. ifeq ($(OS_SOURCE),darwin)
  250. DARWIN2DARWIN=1
  251. endif
  252. endif
  253. ifndef BINUTILSPREFIX
  254. ifndef CROSSBINDIR
  255. ifdef CROSSCOMPILE
  256. ifndef DARWIN2DARWIN
  257. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  258. endif
  259. endif
  260. endif
  261. endif
  262. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  263. ifeq ($(UNITSDIR),)
  264. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  265. endif
  266. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
  267. ifeq ($(FULL_TARGET),i386-linux)
  268. override TARGET_PROGRAMS+=ppxview
  269. endif
  270. ifeq ($(FULL_TARGET),i386-win32)
  271. override TARGET_PROGRAMS+=ppxview
  272. endif
  273. ifeq ($(FULL_TARGET),i386-freebsd)
  274. override TARGET_PROGRAMS+=ppxview
  275. endif
  276. ifeq ($(FULL_TARGET),i386-beos)
  277. override TARGET_PROGRAMS+=ppxview
  278. endif
  279. ifeq ($(FULL_TARGET),i386-netbsd)
  280. override TARGET_PROGRAMS+=ppxview
  281. endif
  282. ifeq ($(FULL_TARGET),i386-openbsd)
  283. override TARGET_PROGRAMS+=ppxview
  284. endif
  285. ifeq ($(FULL_TARGET),i386-darwin)
  286. override TARGET_PROGRAMS+=ppxview
  287. endif
  288. ifeq ($(FULL_TARGET),i386-iphonesim)
  289. override TARGET_PROGRAMS+=ppxview
  290. endif
  291. ifeq ($(FULL_TARGET),m68k-linux)
  292. override TARGET_PROGRAMS+=ppxview
  293. endif
  294. ifeq ($(FULL_TARGET),m68k-freebsd)
  295. override TARGET_PROGRAMS+=ppxview
  296. endif
  297. ifeq ($(FULL_TARGET),m68k-netbsd)
  298. override TARGET_PROGRAMS+=ppxview
  299. endif
  300. ifeq ($(FULL_TARGET),m68k-openbsd)
  301. override TARGET_PROGRAMS+=ppxview
  302. endif
  303. ifeq ($(FULL_TARGET),powerpc-linux)
  304. override TARGET_PROGRAMS+=ppxview
  305. endif
  306. ifeq ($(FULL_TARGET),powerpc-netbsd)
  307. override TARGET_PROGRAMS+=ppxview
  308. endif
  309. ifeq ($(FULL_TARGET),powerpc-darwin)
  310. override TARGET_PROGRAMS+=ppxview
  311. endif
  312. ifeq ($(FULL_TARGET),sparc-linux)
  313. override TARGET_PROGRAMS+=ppxview
  314. endif
  315. ifeq ($(FULL_TARGET),sparc-netbsd)
  316. override TARGET_PROGRAMS+=ppxview
  317. endif
  318. ifeq ($(FULL_TARGET),x86_64-linux)
  319. override TARGET_PROGRAMS+=ppxview
  320. endif
  321. ifeq ($(FULL_TARGET),x86_64-freebsd)
  322. override TARGET_PROGRAMS+=ppxview
  323. endif
  324. ifeq ($(FULL_TARGET),x86_64-darwin)
  325. override TARGET_PROGRAMS+=ppxview
  326. endif
  327. ifeq ($(FULL_TARGET),arm-linux)
  328. override TARGET_PROGRAMS+=ppxview
  329. endif
  330. ifeq ($(FULL_TARGET),arm-darwin)
  331. override TARGET_PROGRAMS+=ppxview
  332. endif
  333. ifeq ($(FULL_TARGET),powerpc64-linux)
  334. override TARGET_PROGRAMS+=ppxview
  335. endif
  336. ifeq ($(FULL_TARGET),powerpc64-darwin)
  337. override TARGET_PROGRAMS+=ppxview
  338. endif
  339. ifeq ($(FULL_TARGET),armeb-linux)
  340. override TARGET_PROGRAMS+=ppxview
  341. endif
  342. ifeq ($(FULL_TARGET),mipsel-linux)
  343. override TARGET_PROGRAMS+=ppxview
  344. endif
  345. override INSTALL_FPCPACKAGE=y
  346. ifdef REQUIRE_UNITSDIR
  347. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  348. endif
  349. ifdef REQUIRE_PACKAGESDIR
  350. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  351. endif
  352. ifdef ZIPINSTALL
  353. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  354. UNIXHier=1
  355. endif
  356. else
  357. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  358. UNIXHier=1
  359. endif
  360. endif
  361. ifndef INSTALL_PREFIX
  362. ifdef PREFIX
  363. INSTALL_PREFIX=$(PREFIX)
  364. endif
  365. endif
  366. ifndef INSTALL_PREFIX
  367. ifdef UNIXHier
  368. INSTALL_PREFIX=/usr/local
  369. else
  370. ifdef INSTALL_FPCPACKAGE
  371. INSTALL_BASEDIR:=/pp
  372. else
  373. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  374. endif
  375. endif
  376. endif
  377. export INSTALL_PREFIX
  378. ifdef INSTALL_FPCSUBDIR
  379. export INSTALL_FPCSUBDIR
  380. endif
  381. ifndef DIST_DESTDIR
  382. DIST_DESTDIR:=$(BASEDIR)
  383. endif
  384. export DIST_DESTDIR
  385. ifndef COMPILER_UNITTARGETDIR
  386. ifdef PACKAGEDIR_MAIN
  387. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  388. else
  389. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  390. endif
  391. endif
  392. ifndef COMPILER_TARGETDIR
  393. COMPILER_TARGETDIR=.
  394. endif
  395. ifndef INSTALL_BASEDIR
  396. ifdef UNIXHier
  397. ifdef INSTALL_FPCPACKAGE
  398. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  399. else
  400. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  401. endif
  402. else
  403. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  404. endif
  405. endif
  406. ifndef INSTALL_BINDIR
  407. ifdef UNIXHier
  408. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  409. else
  410. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  411. ifdef INSTALL_FPCPACKAGE
  412. ifdef CROSSCOMPILE
  413. ifdef CROSSINSTALL
  414. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  415. else
  416. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  417. endif
  418. else
  419. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  420. endif
  421. endif
  422. endif
  423. endif
  424. ifndef INSTALL_UNITDIR
  425. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  426. ifdef INSTALL_FPCPACKAGE
  427. ifdef PACKAGE_NAME
  428. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  429. endif
  430. endif
  431. endif
  432. ifndef INSTALL_LIBDIR
  433. ifdef UNIXHier
  434. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  435. else
  436. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  437. endif
  438. endif
  439. ifndef INSTALL_SOURCEDIR
  440. ifdef UNIXHier
  441. ifdef BSDhier
  442. SRCPREFIXDIR=share/src
  443. else
  444. ifdef linuxHier
  445. SRCPREFIXDIR=share/src
  446. else
  447. SRCPREFIXDIR=src
  448. endif
  449. endif
  450. ifdef INSTALL_FPCPACKAGE
  451. ifdef INSTALL_FPCSUBDIR
  452. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  453. else
  454. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  455. endif
  456. else
  457. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  458. endif
  459. else
  460. ifdef INSTALL_FPCPACKAGE
  461. ifdef INSTALL_FPCSUBDIR
  462. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  463. else
  464. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  465. endif
  466. else
  467. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  468. endif
  469. endif
  470. endif
  471. ifndef INSTALL_DOCDIR
  472. ifdef UNIXHier
  473. ifdef BSDhier
  474. DOCPREFIXDIR=share/doc
  475. else
  476. ifdef linuxHier
  477. DOCPREFIXDIR=share/doc
  478. else
  479. DOCPREFIXDIR=doc
  480. endif
  481. endif
  482. ifdef INSTALL_FPCPACKAGE
  483. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  484. else
  485. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  486. endif
  487. else
  488. ifdef INSTALL_FPCPACKAGE
  489. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  490. else
  491. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  492. endif
  493. endif
  494. endif
  495. ifndef INSTALL_EXAMPLEDIR
  496. ifdef UNIXHier
  497. ifdef INSTALL_FPCPACKAGE
  498. ifdef BSDhier
  499. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  500. else
  501. ifdef linuxHier
  502. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  503. else
  504. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  505. endif
  506. endif
  507. else
  508. ifdef BSDhier
  509. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  510. else
  511. ifdef linuxHier
  512. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  513. else
  514. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  515. endif
  516. endif
  517. endif
  518. else
  519. ifdef INSTALL_FPCPACKAGE
  520. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  521. else
  522. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  523. endif
  524. endif
  525. endif
  526. ifndef INSTALL_DATADIR
  527. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  528. endif
  529. ifndef INSTALL_SHAREDDIR
  530. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  531. endif
  532. ifdef CROSSCOMPILE
  533. ifndef CROSSBINDIR
  534. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  535. ifeq ($(CROSSBINDIR),)
  536. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  537. endif
  538. endif
  539. else
  540. CROSSBINDIR=
  541. endif
  542. BATCHEXT=.bat
  543. LOADEREXT=.as
  544. EXEEXT=.exe
  545. PPLEXT=.ppl
  546. PPUEXT=.ppu
  547. OEXT=.o
  548. ASMEXT=.s
  549. SMARTEXT=.sl
  550. STATICLIBEXT=.a
  551. SHAREDLIBEXT=.so
  552. SHAREDLIBPREFIX=libfp
  553. STATICLIBPREFIX=libp
  554. IMPORTLIBPREFIX=libimp
  555. RSTEXT=.rst
  556. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  557. ifeq ($(OS_TARGET),go32v1)
  558. STATICLIBPREFIX=
  559. SHORTSUFFIX=v1
  560. endif
  561. ifeq ($(OS_TARGET),go32v2)
  562. STATICLIBPREFIX=
  563. SHORTSUFFIX=dos
  564. IMPORTLIBPREFIX=
  565. endif
  566. ifeq ($(OS_TARGET),watcom)
  567. STATICLIBPREFIX=
  568. OEXT=.obj
  569. ASMEXT=.asm
  570. SHAREDLIBEXT=.dll
  571. SHORTSUFFIX=wat
  572. IMPORTLIBPREFIX=
  573. endif
  574. ifeq ($(OS_TARGET),linux)
  575. BATCHEXT=.sh
  576. EXEEXT=
  577. HASSHAREDLIB=1
  578. SHORTSUFFIX=lnx
  579. endif
  580. ifeq ($(OS_TARGET),freebsd)
  581. BATCHEXT=.sh
  582. EXEEXT=
  583. HASSHAREDLIB=1
  584. SHORTSUFFIX=fbs
  585. endif
  586. ifeq ($(OS_TARGET),netbsd)
  587. BATCHEXT=.sh
  588. EXEEXT=
  589. HASSHAREDLIB=1
  590. SHORTSUFFIX=nbs
  591. endif
  592. ifeq ($(OS_TARGET),openbsd)
  593. BATCHEXT=.sh
  594. EXEEXT=
  595. HASSHAREDLIB=1
  596. SHORTSUFFIX=obs
  597. endif
  598. ifeq ($(OS_TARGET),win32)
  599. SHAREDLIBEXT=.dll
  600. SHORTSUFFIX=w32
  601. endif
  602. ifeq ($(OS_TARGET),os2)
  603. BATCHEXT=.cmd
  604. AOUTEXT=.out
  605. STATICLIBPREFIX=
  606. SHAREDLIBEXT=.dll
  607. SHORTSUFFIX=os2
  608. ECHO=echo
  609. IMPORTLIBPREFIX=
  610. endif
  611. ifeq ($(OS_TARGET),emx)
  612. BATCHEXT=.cmd
  613. AOUTEXT=.out
  614. STATICLIBPREFIX=
  615. SHAREDLIBEXT=.dll
  616. SHORTSUFFIX=emx
  617. ECHO=echo
  618. IMPORTLIBPREFIX=
  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),haiku)
  640. BATCHEXT=.sh
  641. EXEEXT=
  642. SHORTSUFFIX=hai
  643. endif
  644. ifeq ($(OS_TARGET),solaris)
  645. BATCHEXT=.sh
  646. EXEEXT=
  647. SHORTSUFFIX=sun
  648. endif
  649. ifeq ($(OS_TARGET),qnx)
  650. BATCHEXT=.sh
  651. EXEEXT=
  652. SHORTSUFFIX=qnx
  653. endif
  654. ifeq ($(OS_TARGET),netware)
  655. EXEEXT=.nlm
  656. STATICLIBPREFIX=
  657. SHORTSUFFIX=nw
  658. IMPORTLIBPREFIX=imp
  659. endif
  660. ifeq ($(OS_TARGET),netwlibc)
  661. EXEEXT=.nlm
  662. STATICLIBPREFIX=
  663. SHORTSUFFIX=nwl
  664. IMPORTLIBPREFIX=imp
  665. endif
  666. ifeq ($(OS_TARGET),macos)
  667. BATCHEXT=
  668. EXEEXT=
  669. DEBUGSYMEXT=.xcoff
  670. SHORTSUFFIX=mac
  671. IMPORTLIBPREFIX=imp
  672. endif
  673. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  674. BATCHEXT=.sh
  675. EXEEXT=
  676. HASSHAREDLIB=1
  677. SHORTSUFFIX=dwn
  678. endif
  679. ifeq ($(OS_TARGET),gba)
  680. EXEEXT=.gba
  681. SHAREDLIBEXT=.so
  682. SHORTSUFFIX=gba
  683. endif
  684. ifeq ($(OS_TARGET),symbian)
  685. SHAREDLIBEXT=.dll
  686. SHORTSUFFIX=symbian
  687. endif
  688. ifeq ($(OS_TARGET),NativeNT)
  689. SHAREDLIBEXT=.dll
  690. SHORTSUFFIX=nativent
  691. endif
  692. else
  693. ifeq ($(OS_TARGET),go32v1)
  694. PPUEXT=.pp1
  695. OEXT=.o1
  696. ASMEXT=.s1
  697. SMARTEXT=.sl1
  698. STATICLIBEXT=.a1
  699. SHAREDLIBEXT=.so1
  700. STATICLIBPREFIX=
  701. SHORTSUFFIX=v1
  702. IMPORTLIBPREFIX=
  703. endif
  704. ifeq ($(OS_TARGET),go32v2)
  705. STATICLIBPREFIX=
  706. SHORTSUFFIX=dos
  707. IMPORTLIBPREFIX=
  708. endif
  709. ifeq ($(OS_TARGET),watcom)
  710. STATICLIBPREFIX=
  711. SHORTSUFFIX=wat
  712. IMPORTLIBPREFIX=
  713. endif
  714. ifeq ($(OS_TARGET),linux)
  715. BATCHEXT=.sh
  716. EXEEXT=
  717. HASSHAREDLIB=1
  718. SHORTSUFFIX=lnx
  719. endif
  720. ifeq ($(OS_TARGET),freebsd)
  721. BATCHEXT=.sh
  722. EXEEXT=
  723. HASSHAREDLIB=1
  724. SHORTSUFFIX=fbs
  725. endif
  726. ifeq ($(OS_TARGET),netbsd)
  727. BATCHEXT=.sh
  728. EXEEXT=
  729. HASSHAREDLIB=1
  730. SHORTSUFFIX=nbs
  731. endif
  732. ifeq ($(OS_TARGET),openbsd)
  733. BATCHEXT=.sh
  734. EXEEXT=
  735. HASSHAREDLIB=1
  736. SHORTSUFFIX=obs
  737. endif
  738. ifeq ($(OS_TARGET),win32)
  739. PPUEXT=.ppw
  740. OEXT=.ow
  741. ASMEXT=.sw
  742. SMARTEXT=.slw
  743. STATICLIBEXT=.aw
  744. SHAREDLIBEXT=.dll
  745. SHORTSUFFIX=w32
  746. endif
  747. ifeq ($(OS_TARGET),os2)
  748. BATCHEXT=.cmd
  749. PPUEXT=.ppo
  750. ASMEXT=.so2
  751. OEXT=.oo2
  752. AOUTEXT=.out
  753. SMARTEXT=.sl2
  754. STATICLIBPREFIX=
  755. STATICLIBEXT=.ao2
  756. SHAREDLIBEXT=.dll
  757. SHORTSUFFIX=os2
  758. ECHO=echo
  759. IMPORTLIBPREFIX=
  760. endif
  761. ifeq ($(OS_TARGET),amiga)
  762. EXEEXT=
  763. PPUEXT=.ppu
  764. ASMEXT=.s
  765. OEXT=.o
  766. SMARTEXT=.sl
  767. STATICLIBEXT=.a
  768. SHAREDLIBEXT=.library
  769. SHORTSUFFIX=amg
  770. endif
  771. ifeq ($(OS_TARGET),atari)
  772. PPUEXT=.ppu
  773. ASMEXT=.s
  774. OEXT=.o
  775. SMARTEXT=.sl
  776. STATICLIBEXT=.a
  777. EXEEXT=.ttp
  778. SHORTSUFFIX=ata
  779. endif
  780. ifeq ($(OS_TARGET),beos)
  781. BATCHEXT=.sh
  782. PPUEXT=.ppu
  783. ASMEXT=.s
  784. OEXT=.o
  785. SMARTEXT=.sl
  786. STATICLIBEXT=.a
  787. EXEEXT=
  788. SHORTSUFFIX=be
  789. endif
  790. ifeq ($(OS_TARGET),solaris)
  791. BATCHEXT=.sh
  792. PPUEXT=.ppu
  793. ASMEXT=.s
  794. OEXT=.o
  795. SMARTEXT=.sl
  796. STATICLIBEXT=.a
  797. EXEEXT=
  798. SHORTSUFFIX=sun
  799. endif
  800. ifeq ($(OS_TARGET),qnx)
  801. BATCHEXT=.sh
  802. PPUEXT=.ppu
  803. ASMEXT=.s
  804. OEXT=.o
  805. SMARTEXT=.sl
  806. STATICLIBEXT=.a
  807. EXEEXT=
  808. SHORTSUFFIX=qnx
  809. endif
  810. ifeq ($(OS_TARGET),netware)
  811. STATICLIBPREFIX=
  812. PPUEXT=.ppu
  813. OEXT=.o
  814. ASMEXT=.s
  815. SMARTEXT=.sl
  816. STATICLIBEXT=.a
  817. SHAREDLIBEXT=.nlm
  818. EXEEXT=.nlm
  819. SHORTSUFFIX=nw
  820. IMPORTLIBPREFIX=imp
  821. endif
  822. ifeq ($(OS_TARGET),netwlibc)
  823. STATICLIBPREFIX=
  824. PPUEXT=.ppu
  825. OEXT=.o
  826. ASMEXT=.s
  827. SMARTEXT=.sl
  828. STATICLIBEXT=.a
  829. SHAREDLIBEXT=.nlm
  830. EXEEXT=.nlm
  831. SHORTSUFFIX=nwl
  832. IMPORTLIBPREFIX=imp
  833. endif
  834. ifeq ($(OS_TARGET),macos)
  835. BATCHEXT=
  836. PPUEXT=.ppu
  837. ASMEXT=.s
  838. OEXT=.o
  839. SMARTEXT=.sl
  840. STATICLIBEXT=.a
  841. EXEEXT=
  842. DEBUGSYMEXT=.xcoff
  843. SHORTSUFFIX=mac
  844. IMPORTLIBPREFIX=imp
  845. endif
  846. endif
  847. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  848. FPCMADE=fpcmade.$(SHORTSUFFIX)
  849. ZIPSUFFIX=$(SHORTSUFFIX)
  850. ZIPCROSSPREFIX=
  851. ZIPSOURCESUFFIX=src
  852. ZIPEXAMPLESUFFIX=exm
  853. else
  854. FPCMADE=fpcmade.$(TARGETSUFFIX)
  855. ZIPSOURCESUFFIX=.source
  856. ZIPEXAMPLESUFFIX=.examples
  857. ifdef CROSSCOMPILE
  858. ZIPSUFFIX=.$(SOURCESUFFIX)
  859. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  860. else
  861. ZIPSUFFIX=.$(TARGETSUFFIX)
  862. ZIPCROSSPREFIX=
  863. endif
  864. endif
  865. ifndef ECHO
  866. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  867. ifeq ($(ECHO),)
  868. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  869. ifeq ($(ECHO),)
  870. ECHO= __missing_command_ECHO
  871. else
  872. ECHO:=$(firstword $(ECHO))
  873. endif
  874. else
  875. ECHO:=$(firstword $(ECHO))
  876. endif
  877. endif
  878. export ECHO
  879. ifndef DATE
  880. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  881. ifeq ($(DATE),)
  882. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  883. ifeq ($(DATE),)
  884. DATE= __missing_command_DATE
  885. else
  886. DATE:=$(firstword $(DATE))
  887. endif
  888. else
  889. DATE:=$(firstword $(DATE))
  890. endif
  891. endif
  892. export DATE
  893. ifndef GINSTALL
  894. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  895. ifeq ($(GINSTALL),)
  896. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  897. ifeq ($(GINSTALL),)
  898. GINSTALL= __missing_command_GINSTALL
  899. else
  900. GINSTALL:=$(firstword $(GINSTALL))
  901. endif
  902. else
  903. GINSTALL:=$(firstword $(GINSTALL))
  904. endif
  905. endif
  906. export GINSTALL
  907. ifndef CPPROG
  908. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  909. ifeq ($(CPPROG),)
  910. CPPROG= __missing_command_CPPROG
  911. else
  912. CPPROG:=$(firstword $(CPPROG))
  913. endif
  914. endif
  915. export CPPROG
  916. ifndef RMPROG
  917. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  918. ifeq ($(RMPROG),)
  919. RMPROG= __missing_command_RMPROG
  920. else
  921. RMPROG:=$(firstword $(RMPROG))
  922. endif
  923. endif
  924. export RMPROG
  925. ifndef MVPROG
  926. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  927. ifeq ($(MVPROG),)
  928. MVPROG= __missing_command_MVPROG
  929. else
  930. MVPROG:=$(firstword $(MVPROG))
  931. endif
  932. endif
  933. export MVPROG
  934. ifndef MKDIRPROG
  935. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  936. ifeq ($(MKDIRPROG),)
  937. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  938. ifeq ($(MKDIRPROG),)
  939. MKDIRPROG= __missing_command_MKDIRPROG
  940. else
  941. MKDIRPROG:=$(firstword $(MKDIRPROG))
  942. endif
  943. else
  944. MKDIRPROG:=$(firstword $(MKDIRPROG))
  945. endif
  946. endif
  947. export MKDIRPROG
  948. ifndef ECHOREDIR
  949. ifndef inUnix
  950. ECHOREDIR=echo
  951. else
  952. ECHOREDIR=$(ECHO)
  953. endif
  954. endif
  955. ifndef COPY
  956. COPY:=$(CPPROG) -fp
  957. endif
  958. ifndef COPYTREE
  959. COPYTREE:=$(CPPROG) -Rfp
  960. endif
  961. ifndef MKDIRTREE
  962. MKDIRTREE:=$(MKDIRPROG) -p
  963. endif
  964. ifndef MOVE
  965. MOVE:=$(MVPROG) -f
  966. endif
  967. ifndef DEL
  968. DEL:=$(RMPROG) -f
  969. endif
  970. ifndef DELTREE
  971. DELTREE:=$(RMPROG) -rf
  972. endif
  973. ifndef INSTALL
  974. ifdef inUnix
  975. INSTALL:=$(GINSTALL) -c -m 644
  976. else
  977. INSTALL:=$(COPY)
  978. endif
  979. endif
  980. ifndef INSTALLEXE
  981. ifdef inUnix
  982. INSTALLEXE:=$(GINSTALL) -c -m 755
  983. else
  984. INSTALLEXE:=$(COPY)
  985. endif
  986. endif
  987. ifndef MKDIR
  988. MKDIR:=$(GINSTALL) -m 755 -d
  989. endif
  990. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  991. ifndef PPUMOVE
  992. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  993. ifeq ($(PPUMOVE),)
  994. PPUMOVE= __missing_command_PPUMOVE
  995. else
  996. PPUMOVE:=$(firstword $(PPUMOVE))
  997. endif
  998. endif
  999. export PPUMOVE
  1000. ifndef FPCMAKE
  1001. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  1002. ifeq ($(FPCMAKE),)
  1003. FPCMAKE= __missing_command_FPCMAKE
  1004. else
  1005. FPCMAKE:=$(firstword $(FPCMAKE))
  1006. endif
  1007. endif
  1008. export FPCMAKE
  1009. ifndef ZIPPROG
  1010. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  1011. ifeq ($(ZIPPROG),)
  1012. ZIPPROG= __missing_command_ZIPPROG
  1013. else
  1014. ZIPPROG:=$(firstword $(ZIPPROG))
  1015. endif
  1016. endif
  1017. export ZIPPROG
  1018. ifndef TARPROG
  1019. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  1020. ifeq ($(TARPROG),)
  1021. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  1022. ifeq ($(TARPROG),)
  1023. TARPROG= __missing_command_TARPROG
  1024. else
  1025. TARPROG:=$(firstword $(TARPROG))
  1026. endif
  1027. else
  1028. TARPROG:=$(firstword $(TARPROG))
  1029. endif
  1030. endif
  1031. export TARPROG
  1032. ASNAME=$(BINUTILSPREFIX)as
  1033. LDNAME=$(BINUTILSPREFIX)ld
  1034. ARNAME=$(BINUTILSPREFIX)ar
  1035. RCNAME=$(BINUTILSPREFIX)rc
  1036. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  1037. ifeq ($(OS_TARGET),win32)
  1038. ifeq ($(CROSSBINDIR),)
  1039. ASNAME=asw
  1040. LDNAME=ldw
  1041. ARNAME=arw
  1042. endif
  1043. endif
  1044. endif
  1045. ifndef ASPROG
  1046. ifdef CROSSBINDIR
  1047. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  1048. else
  1049. ASPROG=$(ASNAME)
  1050. endif
  1051. endif
  1052. ifndef LDPROG
  1053. ifdef CROSSBINDIR
  1054. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  1055. else
  1056. LDPROG=$(LDNAME)
  1057. endif
  1058. endif
  1059. ifndef RCPROG
  1060. ifdef CROSSBINDIR
  1061. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  1062. else
  1063. RCPROG=$(RCNAME)
  1064. endif
  1065. endif
  1066. ifndef ARPROG
  1067. ifdef CROSSBINDIR
  1068. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  1069. else
  1070. ARPROG=$(ARNAME)
  1071. endif
  1072. endif
  1073. AS=$(ASPROG)
  1074. LD=$(LDPROG)
  1075. RC=$(RCPROG)
  1076. AR=$(ARPROG)
  1077. PPAS=ppas$(SRCBATCHEXT)
  1078. ifdef inUnix
  1079. LDCONFIG=ldconfig
  1080. else
  1081. LDCONFIG=
  1082. endif
  1083. ifdef DATE
  1084. DATESTR:=$(shell $(DATE) +%Y%m%d)
  1085. else
  1086. DATESTR=
  1087. endif
  1088. ifndef UPXPROG
  1089. ifeq ($(OS_TARGET),go32v2)
  1090. UPXPROG:=1
  1091. endif
  1092. ifeq ($(OS_TARGET),win32)
  1093. UPXPROG:=1
  1094. endif
  1095. ifdef UPXPROG
  1096. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  1097. ifeq ($(UPXPROG),)
  1098. UPXPROG=
  1099. else
  1100. UPXPROG:=$(firstword $(UPXPROG))
  1101. endif
  1102. else
  1103. UPXPROG=
  1104. endif
  1105. endif
  1106. export UPXPROG
  1107. ZIPOPT=-9
  1108. ZIPEXT=.zip
  1109. ifeq ($(USETAR),bz2)
  1110. TAROPT=vj
  1111. TAREXT=.tar.bz2
  1112. else
  1113. TAROPT=vz
  1114. TAREXT=.tar.gz
  1115. endif
  1116. override REQUIRE_PACKAGES=rtl pxlib
  1117. ifeq ($(FULL_TARGET),i386-linux)
  1118. REQUIRE_PACKAGES_RTL=1
  1119. REQUIRE_PACKAGES_PXLIB=1
  1120. endif
  1121. ifeq ($(FULL_TARGET),i386-go32v2)
  1122. REQUIRE_PACKAGES_RTL=1
  1123. REQUIRE_PACKAGES_PXLIB=1
  1124. endif
  1125. ifeq ($(FULL_TARGET),i386-win32)
  1126. REQUIRE_PACKAGES_RTL=1
  1127. REQUIRE_PACKAGES_PXLIB=1
  1128. endif
  1129. ifeq ($(FULL_TARGET),i386-os2)
  1130. REQUIRE_PACKAGES_RTL=1
  1131. REQUIRE_PACKAGES_PXLIB=1
  1132. endif
  1133. ifeq ($(FULL_TARGET),i386-freebsd)
  1134. REQUIRE_PACKAGES_RTL=1
  1135. REQUIRE_PACKAGES_PXLIB=1
  1136. endif
  1137. ifeq ($(FULL_TARGET),i386-beos)
  1138. REQUIRE_PACKAGES_RTL=1
  1139. REQUIRE_PACKAGES_PXLIB=1
  1140. endif
  1141. ifeq ($(FULL_TARGET),i386-haiku)
  1142. REQUIRE_PACKAGES_RTL=1
  1143. REQUIRE_PACKAGES_PXLIB=1
  1144. endif
  1145. ifeq ($(FULL_TARGET),i386-netbsd)
  1146. REQUIRE_PACKAGES_RTL=1
  1147. REQUIRE_PACKAGES_PXLIB=1
  1148. endif
  1149. ifeq ($(FULL_TARGET),i386-solaris)
  1150. REQUIRE_PACKAGES_RTL=1
  1151. REQUIRE_PACKAGES_PXLIB=1
  1152. endif
  1153. ifeq ($(FULL_TARGET),i386-qnx)
  1154. REQUIRE_PACKAGES_RTL=1
  1155. REQUIRE_PACKAGES_PXLIB=1
  1156. endif
  1157. ifeq ($(FULL_TARGET),i386-netware)
  1158. REQUIRE_PACKAGES_RTL=1
  1159. REQUIRE_PACKAGES_PXLIB=1
  1160. endif
  1161. ifeq ($(FULL_TARGET),i386-openbsd)
  1162. REQUIRE_PACKAGES_RTL=1
  1163. REQUIRE_PACKAGES_PXLIB=1
  1164. endif
  1165. ifeq ($(FULL_TARGET),i386-wdosx)
  1166. REQUIRE_PACKAGES_RTL=1
  1167. REQUIRE_PACKAGES_PXLIB=1
  1168. endif
  1169. ifeq ($(FULL_TARGET),i386-darwin)
  1170. REQUIRE_PACKAGES_RTL=1
  1171. REQUIRE_PACKAGES_PXLIB=1
  1172. endif
  1173. ifeq ($(FULL_TARGET),i386-emx)
  1174. REQUIRE_PACKAGES_RTL=1
  1175. REQUIRE_PACKAGES_PXLIB=1
  1176. endif
  1177. ifeq ($(FULL_TARGET),i386-watcom)
  1178. REQUIRE_PACKAGES_RTL=1
  1179. REQUIRE_PACKAGES_PXLIB=1
  1180. endif
  1181. ifeq ($(FULL_TARGET),i386-netwlibc)
  1182. REQUIRE_PACKAGES_RTL=1
  1183. REQUIRE_PACKAGES_PXLIB=1
  1184. endif
  1185. ifeq ($(FULL_TARGET),i386-wince)
  1186. REQUIRE_PACKAGES_RTL=1
  1187. REQUIRE_PACKAGES_PXLIB=1
  1188. endif
  1189. ifeq ($(FULL_TARGET),i386-embedded)
  1190. REQUIRE_PACKAGES_RTL=1
  1191. REQUIRE_PACKAGES_PXLIB=1
  1192. endif
  1193. ifeq ($(FULL_TARGET),i386-symbian)
  1194. REQUIRE_PACKAGES_RTL=1
  1195. REQUIRE_PACKAGES_PXLIB=1
  1196. endif
  1197. ifeq ($(FULL_TARGET),i386-nativent)
  1198. REQUIRE_PACKAGES_RTL=1
  1199. REQUIRE_PACKAGES_PXLIB=1
  1200. endif
  1201. ifeq ($(FULL_TARGET),i386-iphonesim)
  1202. REQUIRE_PACKAGES_RTL=1
  1203. REQUIRE_PACKAGES_PXLIB=1
  1204. endif
  1205. ifeq ($(FULL_TARGET),m68k-linux)
  1206. REQUIRE_PACKAGES_RTL=1
  1207. REQUIRE_PACKAGES_PXLIB=1
  1208. endif
  1209. ifeq ($(FULL_TARGET),m68k-freebsd)
  1210. REQUIRE_PACKAGES_RTL=1
  1211. REQUIRE_PACKAGES_PXLIB=1
  1212. endif
  1213. ifeq ($(FULL_TARGET),m68k-netbsd)
  1214. REQUIRE_PACKAGES_RTL=1
  1215. REQUIRE_PACKAGES_PXLIB=1
  1216. endif
  1217. ifeq ($(FULL_TARGET),m68k-amiga)
  1218. REQUIRE_PACKAGES_RTL=1
  1219. REQUIRE_PACKAGES_PXLIB=1
  1220. endif
  1221. ifeq ($(FULL_TARGET),m68k-atari)
  1222. REQUIRE_PACKAGES_RTL=1
  1223. REQUIRE_PACKAGES_PXLIB=1
  1224. endif
  1225. ifeq ($(FULL_TARGET),m68k-openbsd)
  1226. REQUIRE_PACKAGES_RTL=1
  1227. REQUIRE_PACKAGES_PXLIB=1
  1228. endif
  1229. ifeq ($(FULL_TARGET),m68k-palmos)
  1230. REQUIRE_PACKAGES_RTL=1
  1231. REQUIRE_PACKAGES_PXLIB=1
  1232. endif
  1233. ifeq ($(FULL_TARGET),m68k-embedded)
  1234. REQUIRE_PACKAGES_RTL=1
  1235. REQUIRE_PACKAGES_PXLIB=1
  1236. endif
  1237. ifeq ($(FULL_TARGET),powerpc-linux)
  1238. REQUIRE_PACKAGES_RTL=1
  1239. REQUIRE_PACKAGES_PXLIB=1
  1240. endif
  1241. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1242. REQUIRE_PACKAGES_RTL=1
  1243. REQUIRE_PACKAGES_PXLIB=1
  1244. endif
  1245. ifeq ($(FULL_TARGET),powerpc-amiga)
  1246. REQUIRE_PACKAGES_RTL=1
  1247. REQUIRE_PACKAGES_PXLIB=1
  1248. endif
  1249. ifeq ($(FULL_TARGET),powerpc-macos)
  1250. REQUIRE_PACKAGES_RTL=1
  1251. REQUIRE_PACKAGES_PXLIB=1
  1252. endif
  1253. ifeq ($(FULL_TARGET),powerpc-darwin)
  1254. REQUIRE_PACKAGES_RTL=1
  1255. REQUIRE_PACKAGES_PXLIB=1
  1256. endif
  1257. ifeq ($(FULL_TARGET),powerpc-morphos)
  1258. REQUIRE_PACKAGES_RTL=1
  1259. REQUIRE_PACKAGES_PXLIB=1
  1260. endif
  1261. ifeq ($(FULL_TARGET),powerpc-embedded)
  1262. REQUIRE_PACKAGES_RTL=1
  1263. REQUIRE_PACKAGES_PXLIB=1
  1264. endif
  1265. ifeq ($(FULL_TARGET),sparc-linux)
  1266. REQUIRE_PACKAGES_RTL=1
  1267. REQUIRE_PACKAGES_PXLIB=1
  1268. endif
  1269. ifeq ($(FULL_TARGET),sparc-netbsd)
  1270. REQUIRE_PACKAGES_RTL=1
  1271. REQUIRE_PACKAGES_PXLIB=1
  1272. endif
  1273. ifeq ($(FULL_TARGET),sparc-solaris)
  1274. REQUIRE_PACKAGES_RTL=1
  1275. REQUIRE_PACKAGES_PXLIB=1
  1276. endif
  1277. ifeq ($(FULL_TARGET),sparc-embedded)
  1278. REQUIRE_PACKAGES_RTL=1
  1279. REQUIRE_PACKAGES_PXLIB=1
  1280. endif
  1281. ifeq ($(FULL_TARGET),x86_64-linux)
  1282. REQUIRE_PACKAGES_RTL=1
  1283. REQUIRE_PACKAGES_PXLIB=1
  1284. endif
  1285. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1286. REQUIRE_PACKAGES_RTL=1
  1287. REQUIRE_PACKAGES_PXLIB=1
  1288. endif
  1289. ifeq ($(FULL_TARGET),x86_64-solaris)
  1290. REQUIRE_PACKAGES_RTL=1
  1291. REQUIRE_PACKAGES_PXLIB=1
  1292. endif
  1293. ifeq ($(FULL_TARGET),x86_64-darwin)
  1294. REQUIRE_PACKAGES_RTL=1
  1295. REQUIRE_PACKAGES_PXLIB=1
  1296. endif
  1297. ifeq ($(FULL_TARGET),x86_64-win64)
  1298. REQUIRE_PACKAGES_RTL=1
  1299. REQUIRE_PACKAGES_PXLIB=1
  1300. endif
  1301. ifeq ($(FULL_TARGET),x86_64-embedded)
  1302. REQUIRE_PACKAGES_RTL=1
  1303. REQUIRE_PACKAGES_PXLIB=1
  1304. endif
  1305. ifeq ($(FULL_TARGET),arm-linux)
  1306. REQUIRE_PACKAGES_RTL=1
  1307. REQUIRE_PACKAGES_PXLIB=1
  1308. endif
  1309. ifeq ($(FULL_TARGET),arm-palmos)
  1310. REQUIRE_PACKAGES_RTL=1
  1311. REQUIRE_PACKAGES_PXLIB=1
  1312. endif
  1313. ifeq ($(FULL_TARGET),arm-darwin)
  1314. REQUIRE_PACKAGES_RTL=1
  1315. REQUIRE_PACKAGES_PXLIB=1
  1316. endif
  1317. ifeq ($(FULL_TARGET),arm-wince)
  1318. REQUIRE_PACKAGES_RTL=1
  1319. REQUIRE_PACKAGES_PXLIB=1
  1320. endif
  1321. ifeq ($(FULL_TARGET),arm-gba)
  1322. REQUIRE_PACKAGES_RTL=1
  1323. REQUIRE_PACKAGES_PXLIB=1
  1324. endif
  1325. ifeq ($(FULL_TARGET),arm-nds)
  1326. REQUIRE_PACKAGES_RTL=1
  1327. REQUIRE_PACKAGES_PXLIB=1
  1328. endif
  1329. ifeq ($(FULL_TARGET),arm-embedded)
  1330. REQUIRE_PACKAGES_RTL=1
  1331. REQUIRE_PACKAGES_PXLIB=1
  1332. endif
  1333. ifeq ($(FULL_TARGET),arm-symbian)
  1334. REQUIRE_PACKAGES_RTL=1
  1335. REQUIRE_PACKAGES_PXLIB=1
  1336. endif
  1337. ifeq ($(FULL_TARGET),powerpc64-linux)
  1338. REQUIRE_PACKAGES_RTL=1
  1339. REQUIRE_PACKAGES_PXLIB=1
  1340. endif
  1341. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1342. REQUIRE_PACKAGES_RTL=1
  1343. REQUIRE_PACKAGES_PXLIB=1
  1344. endif
  1345. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1346. REQUIRE_PACKAGES_RTL=1
  1347. REQUIRE_PACKAGES_PXLIB=1
  1348. endif
  1349. ifeq ($(FULL_TARGET),avr-embedded)
  1350. REQUIRE_PACKAGES_RTL=1
  1351. REQUIRE_PACKAGES_PXLIB=1
  1352. endif
  1353. ifeq ($(FULL_TARGET),armeb-linux)
  1354. REQUIRE_PACKAGES_RTL=1
  1355. REQUIRE_PACKAGES_PXLIB=1
  1356. endif
  1357. ifeq ($(FULL_TARGET),armeb-embedded)
  1358. REQUIRE_PACKAGES_RTL=1
  1359. REQUIRE_PACKAGES_PXLIB=1
  1360. endif
  1361. ifeq ($(FULL_TARGET),mipsel-linux)
  1362. REQUIRE_PACKAGES_RTL=1
  1363. REQUIRE_PACKAGES_PXLIB=1
  1364. endif
  1365. ifdef REQUIRE_PACKAGES_RTL
  1366. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  1367. ifneq ($(PACKAGEDIR_RTL),)
  1368. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  1369. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  1370. else
  1371. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  1372. endif
  1373. ifdef CHECKDEPEND
  1374. $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
  1375. $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
  1376. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
  1377. endif
  1378. else
  1379. PACKAGEDIR_RTL=
  1380. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  1381. ifneq ($(UNITDIR_RTL),)
  1382. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  1383. else
  1384. UNITDIR_RTL=
  1385. endif
  1386. endif
  1387. ifdef UNITDIR_RTL
  1388. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  1389. endif
  1390. endif
  1391. ifdef REQUIRE_PACKAGES_PXLIB
  1392. PACKAGEDIR_PXLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pxlib/Makefile.fpc,$(PACKAGESDIR))))))
  1393. ifneq ($(PACKAGEDIR_PXLIB),)
  1394. ifneq ($(wildcard $(PACKAGEDIR_PXLIB)/units/$(TARGETSUFFIX)),)
  1395. UNITDIR_PXLIB=$(PACKAGEDIR_PXLIB)/units/$(TARGETSUFFIX)
  1396. else
  1397. UNITDIR_PXLIB=$(PACKAGEDIR_PXLIB)
  1398. endif
  1399. ifdef CHECKDEPEND
  1400. $(PACKAGEDIR_PXLIB)/$(FPCMADE):
  1401. $(MAKE) -C $(PACKAGEDIR_PXLIB) $(FPCMADE)
  1402. override ALLDEPENDENCIES+=$(PACKAGEDIR_PXLIB)/$(FPCMADE)
  1403. endif
  1404. else
  1405. PACKAGEDIR_PXLIB=
  1406. UNITDIR_PXLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pxlib/Package.fpc,$(UNITSDIR)))))
  1407. ifneq ($(UNITDIR_PXLIB),)
  1408. UNITDIR_PXLIB:=$(firstword $(UNITDIR_PXLIB))
  1409. else
  1410. UNITDIR_PXLIB=
  1411. endif
  1412. endif
  1413. ifdef UNITDIR_PXLIB
  1414. override COMPILER_UNITDIR+=$(UNITDIR_PXLIB)
  1415. endif
  1416. endif
  1417. ifndef NOCPUDEF
  1418. override FPCOPTDEF=$(ARCH)
  1419. endif
  1420. ifneq ($(OS_TARGET),$(OS_SOURCE))
  1421. override FPCOPT+=-T$(OS_TARGET)
  1422. endif
  1423. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  1424. override FPCOPT+=-P$(ARCH)
  1425. endif
  1426. ifeq ($(OS_SOURCE),openbsd)
  1427. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  1428. endif
  1429. ifndef CROSSBOOTSTRAP
  1430. ifneq ($(BINUTILSPREFIX),)
  1431. override FPCOPT+=-XP$(BINUTILSPREFIX)
  1432. endif
  1433. ifneq ($(BINUTILSPREFIX),)
  1434. override FPCOPT+=-Xr$(RLINKPATH)
  1435. endif
  1436. endif
  1437. ifdef UNITDIR
  1438. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  1439. endif
  1440. ifdef LIBDIR
  1441. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  1442. endif
  1443. ifdef OBJDIR
  1444. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  1445. endif
  1446. ifdef INCDIR
  1447. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  1448. endif
  1449. ifdef LINKSMART
  1450. override FPCOPT+=-XX
  1451. endif
  1452. ifdef CREATESMART
  1453. override FPCOPT+=-CX
  1454. endif
  1455. ifdef DEBUG
  1456. override FPCOPT+=-gl
  1457. override FPCOPTDEF+=DEBUG
  1458. endif
  1459. ifdef RELEASE
  1460. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  1461. ifeq ($(CPU_TARGET),i386)
  1462. FPCCPUOPT:=-OG2p3
  1463. endif
  1464. ifeq ($(CPU_TARGET),powerpc)
  1465. FPCCPUOPT:=-O1r
  1466. endif
  1467. else
  1468. FPCCPUOPT:=-O2
  1469. endif
  1470. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  1471. override FPCOPTDEF+=RELEASE
  1472. endif
  1473. ifdef STRIP
  1474. override FPCOPT+=-Xs
  1475. endif
  1476. ifdef OPTIMIZE
  1477. override FPCOPT+=-O2
  1478. endif
  1479. ifdef VERBOSE
  1480. override FPCOPT+=-vwni
  1481. endif
  1482. ifdef COMPILER_OPTIONS
  1483. override FPCOPT+=$(COMPILER_OPTIONS)
  1484. endif
  1485. ifdef COMPILER_UNITDIR
  1486. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  1487. endif
  1488. ifdef COMPILER_LIBRARYDIR
  1489. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  1490. endif
  1491. ifdef COMPILER_OBJECTDIR
  1492. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  1493. endif
  1494. ifdef COMPILER_INCLUDEDIR
  1495. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1496. endif
  1497. ifdef CROSSBINDIR
  1498. override FPCOPT+=-FD$(CROSSBINDIR)
  1499. endif
  1500. ifdef COMPILER_TARGETDIR
  1501. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1502. ifeq ($(COMPILER_TARGETDIR),.)
  1503. override TARGETDIRPREFIX=
  1504. else
  1505. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1506. endif
  1507. endif
  1508. ifdef COMPILER_UNITTARGETDIR
  1509. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1510. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1511. override UNITTARGETDIRPREFIX=
  1512. else
  1513. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1514. endif
  1515. else
  1516. ifdef COMPILER_TARGETDIR
  1517. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1518. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1519. endif
  1520. endif
  1521. ifdef CREATESHARED
  1522. override FPCOPT+=-Cg
  1523. ifeq ($(CPU_TARGET),i386)
  1524. override FPCOPT+=-Aas
  1525. endif
  1526. endif
  1527. ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
  1528. ifeq ($(OS_TARGET),linux)
  1529. ifeq ($(CPU_TARGET),x86_64)
  1530. override FPCOPT+=-Cg
  1531. endif
  1532. endif
  1533. endif
  1534. ifdef LINKSHARED
  1535. endif
  1536. ifdef OPT
  1537. override FPCOPT+=$(OPT)
  1538. endif
  1539. ifdef FPCOPTDEF
  1540. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1541. endif
  1542. ifdef CFGFILE
  1543. override FPCOPT+=@$(CFGFILE)
  1544. endif
  1545. ifdef USEENV
  1546. override FPCEXTCMD:=$(FPCOPT)
  1547. override FPCOPT:=!FPCEXTCMD
  1548. export FPCEXTCMD
  1549. endif
  1550. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  1551. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  1552. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  1553. override ACROSSCOMPILE=1
  1554. endif
  1555. ifdef ACROSSCOMPILE
  1556. override FPCOPT+=$(CROSSOPT)
  1557. endif
  1558. override COMPILER:=$(FPC) $(FPCOPT)
  1559. ifeq (,$(findstring -s ,$(COMPILER)))
  1560. EXECPPAS=
  1561. else
  1562. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1563. ifdef RUNBATCH
  1564. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  1565. else
  1566. EXECPPAS:=@$(PPAS)
  1567. endif
  1568. endif
  1569. endif
  1570. .PHONY: fpc_exes
  1571. ifndef CROSSINSTALL
  1572. ifneq ($(TARGET_PROGRAMS),)
  1573. override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
  1574. override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
  1575. override ALLTARGET+=fpc_exes
  1576. override INSTALLEXEFILES+=$(EXEFILES)
  1577. override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
  1578. ifeq ($(OS_TARGET),os2)
  1579. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  1580. endif
  1581. ifeq ($(OS_TARGET),emx)
  1582. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  1583. endif
  1584. endif
  1585. endif
  1586. fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
  1587. ifdef TARGET_RSTS
  1588. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  1589. override CLEANRSTFILES+=$(RSTFILES)
  1590. endif
  1591. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  1592. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  1593. @$(ECHOREDIR) Compiled > $(FPCMADE)
  1594. fpc_all: $(FPCMADE)
  1595. fpc_smart:
  1596. $(MAKE) all LINKSMART=1 CREATESMART=1
  1597. fpc_debug:
  1598. $(MAKE) all DEBUG=1
  1599. fpc_release:
  1600. $(MAKE) all RELEASE=1
  1601. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
  1602. $(COMPILER_UNITTARGETDIR):
  1603. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  1604. $(COMPILER_TARGETDIR):
  1605. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  1606. %$(PPUEXT): %.pp
  1607. $(COMPILER) $<
  1608. $(EXECPPAS)
  1609. %$(PPUEXT): %.pas
  1610. $(COMPILER) $<
  1611. $(EXECPPAS)
  1612. %$(EXEEXT): %.pp
  1613. $(COMPILER) $<
  1614. $(EXECPPAS)
  1615. %$(EXEEXT): %.pas
  1616. $(COMPILER) $<
  1617. $(EXECPPAS)
  1618. %$(EXEEXT): %.lpr
  1619. $(COMPILER) $<
  1620. $(EXECPPAS)
  1621. %$(EXEEXT): %.dpr
  1622. $(COMPILER) $<
  1623. $(EXECPPAS)
  1624. %.res: %.rc
  1625. windres -i $< -o $@
  1626. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1627. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1628. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1629. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1630. vpath %.inc $(COMPILER_INCLUDEDIR)
  1631. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  1632. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  1633. .PHONY: fpc_shared
  1634. override INSTALLTARGET+=fpc_shared_install
  1635. ifndef SHARED_LIBVERSION
  1636. SHARED_LIBVERSION=$(FPC_VERSION)
  1637. endif
  1638. ifndef SHARED_LIBNAME
  1639. SHARED_LIBNAME=$(PACKAGE_NAME)
  1640. endif
  1641. ifndef SHARED_FULLNAME
  1642. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  1643. endif
  1644. ifndef SHARED_LIBUNITS
  1645. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  1646. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  1647. endif
  1648. fpc_shared:
  1649. ifdef HASSHAREDLIB
  1650. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  1651. ifneq ($(SHARED_BUILD),n)
  1652. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  1653. endif
  1654. else
  1655. @$(ECHO) Shared Libraries not supported
  1656. endif
  1657. fpc_shared_install:
  1658. ifneq ($(SHARED_BUILD),n)
  1659. ifneq ($(SHARED_LIBUNITS),)
  1660. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  1661. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  1662. endif
  1663. endif
  1664. endif
  1665. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  1666. ifdef INSTALL_UNITS
  1667. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  1668. endif
  1669. ifdef INSTALL_BUILDUNIT
  1670. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  1671. endif
  1672. ifdef INSTALLPPUFILES
  1673. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1674. ifneq ($(UNITTARGETDIRPREFIX),)
  1675. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
  1676. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
  1677. endif
  1678. override INSTALL_CREATEPACKAGEFPC=1
  1679. endif
  1680. ifdef INSTALLEXEFILES
  1681. ifneq ($(TARGETDIRPREFIX),)
  1682. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  1683. endif
  1684. endif
  1685. fpc_install: all $(INSTALLTARGET)
  1686. ifdef INSTALLEXEFILES
  1687. $(MKDIR) $(INSTALL_BINDIR)
  1688. ifdef UPXPROG
  1689. -$(UPXPROG) $(INSTALLEXEFILES)
  1690. endif
  1691. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  1692. endif
  1693. ifdef INSTALL_CREATEPACKAGEFPC
  1694. ifdef FPCMAKE
  1695. ifdef PACKAGE_VERSION
  1696. ifneq ($(wildcard Makefile.fpc),)
  1697. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  1698. $(MKDIR) $(INSTALL_UNITDIR)
  1699. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  1700. endif
  1701. endif
  1702. endif
  1703. endif
  1704. ifdef INSTALLPPUFILES
  1705. $(MKDIR) $(INSTALL_UNITDIR)
  1706. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  1707. ifneq ($(INSTALLPPULINKFILES),)
  1708. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  1709. endif
  1710. ifneq ($(wildcard $(LIB_FULLNAME)),)
  1711. $(MKDIR) $(INSTALL_LIBDIR)
  1712. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  1713. ifdef inUnix
  1714. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  1715. endif
  1716. endif
  1717. endif
  1718. ifdef INSTALL_FILES
  1719. $(MKDIR) $(INSTALL_DATADIR)
  1720. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  1721. endif
  1722. fpc_sourceinstall: distclean
  1723. $(MKDIR) $(INSTALL_SOURCEDIR)
  1724. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  1725. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  1726. ifdef HASEXAMPLES
  1727. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  1728. endif
  1729. ifdef EXAMPLESOURCEFILES
  1730. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  1731. endif
  1732. ifdef TARGET_EXAMPLEDIRS
  1733. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  1734. endif
  1735. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  1736. ifdef EXEFILES
  1737. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  1738. endif
  1739. ifdef CLEAN_PROGRAMS
  1740. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  1741. endif
  1742. ifdef CLEAN_UNITS
  1743. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  1744. endif
  1745. ifdef CLEANPPUFILES
  1746. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  1747. ifdef DEBUGSYMEXT
  1748. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  1749. endif
  1750. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  1751. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  1752. endif
  1753. fpc_clean: $(CLEANTARGET)
  1754. ifdef CLEANEXEFILES
  1755. -$(DEL) $(CLEANEXEFILES)
  1756. endif
  1757. ifdef CLEANPPUFILES
  1758. -$(DEL) $(CLEANPPUFILES)
  1759. endif
  1760. ifneq ($(CLEANPPULINKFILES),)
  1761. -$(DEL) $(CLEANPPULINKFILES)
  1762. endif
  1763. ifdef CLEANRSTFILES
  1764. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1765. endif
  1766. ifdef CLEAN_FILES
  1767. -$(DEL) $(CLEAN_FILES)
  1768. endif
  1769. ifdef LIB_NAME
  1770. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  1771. endif
  1772. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1773. -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
  1774. fpc_cleanall: $(CLEANTARGET)
  1775. ifdef CLEANEXEFILES
  1776. -$(DEL) $(CLEANEXEFILES)
  1777. endif
  1778. ifdef COMPILER_UNITTARGETDIR
  1779. ifdef CLEANPPUFILES
  1780. -$(DEL) $(CLEANPPUFILES)
  1781. endif
  1782. ifneq ($(CLEANPPULINKFILES),)
  1783. -$(DEL) $(CLEANPPULINKFILES)
  1784. endif
  1785. ifdef CLEANRSTFILES
  1786. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1787. endif
  1788. endif
  1789. ifdef CLEAN_FILES
  1790. -$(DEL) $(CLEAN_FILES)
  1791. endif
  1792. -$(DELTREE) units
  1793. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  1794. ifneq ($(PPUEXT),.ppu)
  1795. -$(DEL) *.o *.ppu *.a
  1796. endif
  1797. -$(DELTREE) *$(SMARTEXT)
  1798. -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1799. -$(DEL) *_ppas$(BATCHEXT)
  1800. ifdef AOUTEXT
  1801. -$(DEL) *$(AOUTEXT)
  1802. endif
  1803. ifdef DEBUGSYMEXT
  1804. -$(DEL) *$(DEBUGSYMEXT)
  1805. endif
  1806. fpc_distclean: cleanall
  1807. .PHONY: fpc_baseinfo
  1808. override INFORULES+=fpc_baseinfo
  1809. fpc_baseinfo:
  1810. @$(ECHO)
  1811. @$(ECHO) == Package info ==
  1812. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  1813. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  1814. @$(ECHO)
  1815. @$(ECHO) == Configuration info ==
  1816. @$(ECHO)
  1817. @$(ECHO) FPC.......... $(FPC)
  1818. @$(ECHO) FPC Version.. $(FPC_VERSION)
  1819. @$(ECHO) Source CPU... $(CPU_SOURCE)
  1820. @$(ECHO) Target CPU... $(CPU_TARGET)
  1821. @$(ECHO) Source OS.... $(OS_SOURCE)
  1822. @$(ECHO) Target OS.... $(OS_TARGET)
  1823. @$(ECHO) Full Source.. $(FULL_SOURCE)
  1824. @$(ECHO) Full Target.. $(FULL_TARGET)
  1825. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  1826. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  1827. @$(ECHO)
  1828. @$(ECHO) == Directory info ==
  1829. @$(ECHO)
  1830. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  1831. @$(ECHO)
  1832. @$(ECHO) Basedir......... $(BASEDIR)
  1833. @$(ECHO) FPCDir.......... $(FPCDIR)
  1834. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  1835. @$(ECHO) UnitsDir........ $(UNITSDIR)
  1836. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  1837. @$(ECHO)
  1838. @$(ECHO) GCC library..... $(GCCLIBDIR)
  1839. @$(ECHO) Other library... $(OTHERLIBDIR)
  1840. @$(ECHO)
  1841. @$(ECHO) == Tools info ==
  1842. @$(ECHO)
  1843. @$(ECHO) As........ $(AS)
  1844. @$(ECHO) Ld........ $(LD)
  1845. @$(ECHO) Ar........ $(AR)
  1846. @$(ECHO) Rc........ $(RC)
  1847. @$(ECHO)
  1848. @$(ECHO) Mv........ $(MVPROG)
  1849. @$(ECHO) Cp........ $(CPPROG)
  1850. @$(ECHO) Rm........ $(RMPROG)
  1851. @$(ECHO) GInstall.. $(GINSTALL)
  1852. @$(ECHO) Echo...... $(ECHO)
  1853. @$(ECHO) Shell..... $(SHELL)
  1854. @$(ECHO) Date...... $(DATE)
  1855. @$(ECHO) FPCMake... $(FPCMAKE)
  1856. @$(ECHO) PPUMove... $(PPUMOVE)
  1857. @$(ECHO) Upx....... $(UPXPROG)
  1858. @$(ECHO) Zip....... $(ZIPPROG)
  1859. @$(ECHO)
  1860. @$(ECHO) == Object info ==
  1861. @$(ECHO)
  1862. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  1863. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  1864. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  1865. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  1866. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  1867. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  1868. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  1869. @$(ECHO)
  1870. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  1871. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  1872. @$(ECHO)
  1873. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  1874. @$(ECHO) Install Files....... $(INSTALL_FILES)
  1875. @$(ECHO)
  1876. @$(ECHO) == Install info ==
  1877. @$(ECHO)
  1878. @$(ECHO) DateStr.............. $(DATESTR)
  1879. @$(ECHO) ZipName.............. $(ZIPNAME)
  1880. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  1881. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  1882. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  1883. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  1884. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  1885. @$(ECHO)
  1886. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  1887. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  1888. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  1889. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  1890. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  1891. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  1892. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  1893. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  1894. @$(ECHO)
  1895. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  1896. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  1897. @$(ECHO)
  1898. .PHONY: fpc_info
  1899. fpc_info: $(INFORULES)
  1900. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  1901. fpc_makefile_dirs
  1902. fpc_makefile:
  1903. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  1904. fpc_makefile_sub1:
  1905. ifdef TARGET_DIRS
  1906. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  1907. endif
  1908. ifdef TARGET_EXAMPLEDIRS
  1909. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  1910. endif
  1911. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  1912. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  1913. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  1914. all: fpc_all
  1915. debug: fpc_debug
  1916. smart: fpc_smart
  1917. release: fpc_release
  1918. units: fpc_units
  1919. examples:
  1920. shared: fpc_shared
  1921. install: fpc_install
  1922. sourceinstall: fpc_sourceinstall
  1923. exampleinstall: fpc_exampleinstall
  1924. distinstall:
  1925. zipinstall:
  1926. zipsourceinstall:
  1927. zipexampleinstall:
  1928. zipdistinstall:
  1929. clean: fpc_clean
  1930. distclean: fpc_distclean
  1931. cleanall: fpc_cleanall
  1932. info: fpc_info
  1933. makefiles: fpc_makefiles
  1934. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  1935. ifneq ($(wildcard fpcmake.loc),)
  1936. include fpcmake.loc
  1937. endif