Makefile 45 KB

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