Makefile 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447
  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. override PACKAGE_NAME=zlib
  268. override PACKAGE_VERSION=2.5.1
  269. ifeq ($(FULL_TARGET),i386-linux)
  270. override TARGET_UNITS+=zlib
  271. endif
  272. ifeq ($(FULL_TARGET),i386-go32v2)
  273. override TARGET_UNITS+=zlib
  274. endif
  275. ifeq ($(FULL_TARGET),i386-win32)
  276. override TARGET_UNITS+=zlib
  277. endif
  278. ifeq ($(FULL_TARGET),i386-os2)
  279. override TARGET_UNITS+=zlib
  280. endif
  281. ifeq ($(FULL_TARGET),i386-freebsd)
  282. override TARGET_UNITS+=zlib
  283. endif
  284. ifeq ($(FULL_TARGET),i386-beos)
  285. override TARGET_UNITS+=zlib
  286. endif
  287. ifeq ($(FULL_TARGET),i386-haiku)
  288. override TARGET_UNITS+=zlib
  289. endif
  290. ifeq ($(FULL_TARGET),i386-netbsd)
  291. override TARGET_UNITS+=zlib
  292. endif
  293. ifeq ($(FULL_TARGET),i386-solaris)
  294. override TARGET_UNITS+=zlib
  295. endif
  296. ifeq ($(FULL_TARGET),i386-qnx)
  297. override TARGET_UNITS+=zlib
  298. endif
  299. ifeq ($(FULL_TARGET),i386-netware)
  300. override TARGET_UNITS+=zlib
  301. endif
  302. ifeq ($(FULL_TARGET),i386-openbsd)
  303. override TARGET_UNITS+=zlib
  304. endif
  305. ifeq ($(FULL_TARGET),i386-wdosx)
  306. override TARGET_UNITS+=zlib
  307. endif
  308. ifeq ($(FULL_TARGET),i386-darwin)
  309. override TARGET_UNITS+=zlib
  310. endif
  311. ifeq ($(FULL_TARGET),i386-emx)
  312. override TARGET_UNITS+=zlib
  313. endif
  314. ifeq ($(FULL_TARGET),i386-watcom)
  315. override TARGET_UNITS+=zlib
  316. endif
  317. ifeq ($(FULL_TARGET),i386-netwlibc)
  318. override TARGET_UNITS+=zlib
  319. endif
  320. ifeq ($(FULL_TARGET),i386-wince)
  321. override TARGET_UNITS+=zlib
  322. endif
  323. ifeq ($(FULL_TARGET),i386-embedded)
  324. override TARGET_UNITS+=zlib
  325. endif
  326. ifeq ($(FULL_TARGET),i386-symbian)
  327. override TARGET_UNITS+=zlib
  328. endif
  329. ifeq ($(FULL_TARGET),i386-nativent)
  330. override TARGET_UNITS+=zlib
  331. endif
  332. ifeq ($(FULL_TARGET),i386-iphonesim)
  333. override TARGET_UNITS+=zlib
  334. endif
  335. ifeq ($(FULL_TARGET),m68k-linux)
  336. override TARGET_UNITS+=zlib
  337. endif
  338. ifeq ($(FULL_TARGET),m68k-freebsd)
  339. override TARGET_UNITS+=zlib
  340. endif
  341. ifeq ($(FULL_TARGET),m68k-netbsd)
  342. override TARGET_UNITS+=zlib
  343. endif
  344. ifeq ($(FULL_TARGET),m68k-amiga)
  345. override TARGET_UNITS+=zlib
  346. endif
  347. ifeq ($(FULL_TARGET),m68k-atari)
  348. override TARGET_UNITS+=zlib
  349. endif
  350. ifeq ($(FULL_TARGET),m68k-openbsd)
  351. override TARGET_UNITS+=zlib
  352. endif
  353. ifeq ($(FULL_TARGET),m68k-palmos)
  354. override TARGET_UNITS+=zlib
  355. endif
  356. ifeq ($(FULL_TARGET),m68k-embedded)
  357. override TARGET_UNITS+=zlib
  358. endif
  359. ifeq ($(FULL_TARGET),powerpc-linux)
  360. override TARGET_UNITS+=zlib
  361. endif
  362. ifeq ($(FULL_TARGET),powerpc-netbsd)
  363. override TARGET_UNITS+=zlib
  364. endif
  365. ifeq ($(FULL_TARGET),powerpc-amiga)
  366. override TARGET_UNITS+=zlib
  367. endif
  368. ifeq ($(FULL_TARGET),powerpc-macos)
  369. override TARGET_UNITS+=zlib
  370. endif
  371. ifeq ($(FULL_TARGET),powerpc-darwin)
  372. override TARGET_UNITS+=zlib
  373. endif
  374. ifeq ($(FULL_TARGET),powerpc-morphos)
  375. override TARGET_UNITS+=zlib
  376. endif
  377. ifeq ($(FULL_TARGET),powerpc-embedded)
  378. override TARGET_UNITS+=zlib
  379. endif
  380. ifeq ($(FULL_TARGET),sparc-linux)
  381. override TARGET_UNITS+=zlib
  382. endif
  383. ifeq ($(FULL_TARGET),sparc-netbsd)
  384. override TARGET_UNITS+=zlib
  385. endif
  386. ifeq ($(FULL_TARGET),sparc-solaris)
  387. override TARGET_UNITS+=zlib
  388. endif
  389. ifeq ($(FULL_TARGET),sparc-embedded)
  390. override TARGET_UNITS+=zlib
  391. endif
  392. ifeq ($(FULL_TARGET),x86_64-linux)
  393. override TARGET_UNITS+=zlib
  394. endif
  395. ifeq ($(FULL_TARGET),x86_64-freebsd)
  396. override TARGET_UNITS+=zlib
  397. endif
  398. ifeq ($(FULL_TARGET),x86_64-solaris)
  399. override TARGET_UNITS+=zlib
  400. endif
  401. ifeq ($(FULL_TARGET),x86_64-darwin)
  402. override TARGET_UNITS+=zlib
  403. endif
  404. ifeq ($(FULL_TARGET),x86_64-win64)
  405. override TARGET_UNITS+=zlib
  406. endif
  407. ifeq ($(FULL_TARGET),x86_64-embedded)
  408. override TARGET_UNITS+=zlib
  409. endif
  410. ifeq ($(FULL_TARGET),arm-linux)
  411. override TARGET_UNITS+=zlib
  412. endif
  413. ifeq ($(FULL_TARGET),arm-palmos)
  414. override TARGET_UNITS+=zlib
  415. endif
  416. ifeq ($(FULL_TARGET),arm-darwin)
  417. override TARGET_UNITS+=zlib
  418. endif
  419. ifeq ($(FULL_TARGET),arm-wince)
  420. override TARGET_UNITS+=zlib
  421. endif
  422. ifeq ($(FULL_TARGET),arm-gba)
  423. override TARGET_UNITS+=zlib
  424. endif
  425. ifeq ($(FULL_TARGET),arm-nds)
  426. override TARGET_UNITS+=zlib
  427. endif
  428. ifeq ($(FULL_TARGET),arm-embedded)
  429. override TARGET_UNITS+=zlib
  430. endif
  431. ifeq ($(FULL_TARGET),arm-symbian)
  432. override TARGET_UNITS+=zlib
  433. endif
  434. ifeq ($(FULL_TARGET),powerpc64-linux)
  435. override TARGET_UNITS+=zlib
  436. endif
  437. ifeq ($(FULL_TARGET),powerpc64-darwin)
  438. override TARGET_UNITS+=zlib
  439. endif
  440. ifeq ($(FULL_TARGET),powerpc64-embedded)
  441. override TARGET_UNITS+=zlib
  442. endif
  443. ifeq ($(FULL_TARGET),avr-embedded)
  444. override TARGET_UNITS+=zlib
  445. endif
  446. ifeq ($(FULL_TARGET),armeb-linux)
  447. override TARGET_UNITS+=zlib
  448. endif
  449. ifeq ($(FULL_TARGET),armeb-embedded)
  450. override TARGET_UNITS+=zlib
  451. endif
  452. ifeq ($(FULL_TARGET),mipsel-linux)
  453. override TARGET_UNITS+=zlib
  454. endif
  455. override INSTALL_FPCPACKAGE=y
  456. ifeq ($(FULL_TARGET),i386-linux)
  457. override COMPILER_INCLUDEDIR+=src
  458. endif
  459. ifeq ($(FULL_TARGET),i386-go32v2)
  460. override COMPILER_INCLUDEDIR+=src
  461. endif
  462. ifeq ($(FULL_TARGET),i386-win32)
  463. override COMPILER_INCLUDEDIR+=src
  464. endif
  465. ifeq ($(FULL_TARGET),i386-os2)
  466. override COMPILER_INCLUDEDIR+=src
  467. endif
  468. ifeq ($(FULL_TARGET),i386-freebsd)
  469. override COMPILER_INCLUDEDIR+=src
  470. endif
  471. ifeq ($(FULL_TARGET),i386-beos)
  472. override COMPILER_INCLUDEDIR+=src
  473. endif
  474. ifeq ($(FULL_TARGET),i386-haiku)
  475. override COMPILER_INCLUDEDIR+=src
  476. endif
  477. ifeq ($(FULL_TARGET),i386-netbsd)
  478. override COMPILER_INCLUDEDIR+=src
  479. endif
  480. ifeq ($(FULL_TARGET),i386-solaris)
  481. override COMPILER_INCLUDEDIR+=src
  482. endif
  483. ifeq ($(FULL_TARGET),i386-qnx)
  484. override COMPILER_INCLUDEDIR+=src
  485. endif
  486. ifeq ($(FULL_TARGET),i386-netware)
  487. override COMPILER_INCLUDEDIR+=src
  488. endif
  489. ifeq ($(FULL_TARGET),i386-openbsd)
  490. override COMPILER_INCLUDEDIR+=src
  491. endif
  492. ifeq ($(FULL_TARGET),i386-wdosx)
  493. override COMPILER_INCLUDEDIR+=src
  494. endif
  495. ifeq ($(FULL_TARGET),i386-darwin)
  496. override COMPILER_INCLUDEDIR+=src
  497. endif
  498. ifeq ($(FULL_TARGET),i386-emx)
  499. override COMPILER_INCLUDEDIR+=src
  500. endif
  501. ifeq ($(FULL_TARGET),i386-watcom)
  502. override COMPILER_INCLUDEDIR+=src
  503. endif
  504. ifeq ($(FULL_TARGET),i386-netwlibc)
  505. override COMPILER_INCLUDEDIR+=src
  506. endif
  507. ifeq ($(FULL_TARGET),i386-wince)
  508. override COMPILER_INCLUDEDIR+=src
  509. endif
  510. ifeq ($(FULL_TARGET),i386-embedded)
  511. override COMPILER_INCLUDEDIR+=src
  512. endif
  513. ifeq ($(FULL_TARGET),i386-symbian)
  514. override COMPILER_INCLUDEDIR+=src
  515. endif
  516. ifeq ($(FULL_TARGET),i386-nativent)
  517. override COMPILER_INCLUDEDIR+=src
  518. endif
  519. ifeq ($(FULL_TARGET),i386-iphonesim)
  520. override COMPILER_INCLUDEDIR+=src
  521. endif
  522. ifeq ($(FULL_TARGET),m68k-linux)
  523. override COMPILER_INCLUDEDIR+=src
  524. endif
  525. ifeq ($(FULL_TARGET),m68k-freebsd)
  526. override COMPILER_INCLUDEDIR+=src
  527. endif
  528. ifeq ($(FULL_TARGET),m68k-netbsd)
  529. override COMPILER_INCLUDEDIR+=src
  530. endif
  531. ifeq ($(FULL_TARGET),m68k-amiga)
  532. override COMPILER_INCLUDEDIR+=src
  533. endif
  534. ifeq ($(FULL_TARGET),m68k-atari)
  535. override COMPILER_INCLUDEDIR+=src
  536. endif
  537. ifeq ($(FULL_TARGET),m68k-openbsd)
  538. override COMPILER_INCLUDEDIR+=src
  539. endif
  540. ifeq ($(FULL_TARGET),m68k-palmos)
  541. override COMPILER_INCLUDEDIR+=src
  542. endif
  543. ifeq ($(FULL_TARGET),m68k-embedded)
  544. override COMPILER_INCLUDEDIR+=src
  545. endif
  546. ifeq ($(FULL_TARGET),powerpc-linux)
  547. override COMPILER_INCLUDEDIR+=src
  548. endif
  549. ifeq ($(FULL_TARGET),powerpc-netbsd)
  550. override COMPILER_INCLUDEDIR+=src
  551. endif
  552. ifeq ($(FULL_TARGET),powerpc-amiga)
  553. override COMPILER_INCLUDEDIR+=src
  554. endif
  555. ifeq ($(FULL_TARGET),powerpc-macos)
  556. override COMPILER_INCLUDEDIR+=src
  557. endif
  558. ifeq ($(FULL_TARGET),powerpc-darwin)
  559. override COMPILER_INCLUDEDIR+=src
  560. endif
  561. ifeq ($(FULL_TARGET),powerpc-morphos)
  562. override COMPILER_INCLUDEDIR+=src
  563. endif
  564. ifeq ($(FULL_TARGET),powerpc-embedded)
  565. override COMPILER_INCLUDEDIR+=src
  566. endif
  567. ifeq ($(FULL_TARGET),sparc-linux)
  568. override COMPILER_INCLUDEDIR+=src
  569. endif
  570. ifeq ($(FULL_TARGET),sparc-netbsd)
  571. override COMPILER_INCLUDEDIR+=src
  572. endif
  573. ifeq ($(FULL_TARGET),sparc-solaris)
  574. override COMPILER_INCLUDEDIR+=src
  575. endif
  576. ifeq ($(FULL_TARGET),sparc-embedded)
  577. override COMPILER_INCLUDEDIR+=src
  578. endif
  579. ifeq ($(FULL_TARGET),x86_64-linux)
  580. override COMPILER_INCLUDEDIR+=src
  581. endif
  582. ifeq ($(FULL_TARGET),x86_64-freebsd)
  583. override COMPILER_INCLUDEDIR+=src
  584. endif
  585. ifeq ($(FULL_TARGET),x86_64-solaris)
  586. override COMPILER_INCLUDEDIR+=src
  587. endif
  588. ifeq ($(FULL_TARGET),x86_64-darwin)
  589. override COMPILER_INCLUDEDIR+=src
  590. endif
  591. ifeq ($(FULL_TARGET),x86_64-win64)
  592. override COMPILER_INCLUDEDIR+=src
  593. endif
  594. ifeq ($(FULL_TARGET),x86_64-embedded)
  595. override COMPILER_INCLUDEDIR+=src
  596. endif
  597. ifeq ($(FULL_TARGET),arm-linux)
  598. override COMPILER_INCLUDEDIR+=src
  599. endif
  600. ifeq ($(FULL_TARGET),arm-palmos)
  601. override COMPILER_INCLUDEDIR+=src
  602. endif
  603. ifeq ($(FULL_TARGET),arm-darwin)
  604. override COMPILER_INCLUDEDIR+=src
  605. endif
  606. ifeq ($(FULL_TARGET),arm-wince)
  607. override COMPILER_INCLUDEDIR+=src
  608. endif
  609. ifeq ($(FULL_TARGET),arm-gba)
  610. override COMPILER_INCLUDEDIR+=src
  611. endif
  612. ifeq ($(FULL_TARGET),arm-nds)
  613. override COMPILER_INCLUDEDIR+=src
  614. endif
  615. ifeq ($(FULL_TARGET),arm-embedded)
  616. override COMPILER_INCLUDEDIR+=src
  617. endif
  618. ifeq ($(FULL_TARGET),arm-symbian)
  619. override COMPILER_INCLUDEDIR+=src
  620. endif
  621. ifeq ($(FULL_TARGET),powerpc64-linux)
  622. override COMPILER_INCLUDEDIR+=src
  623. endif
  624. ifeq ($(FULL_TARGET),powerpc64-darwin)
  625. override COMPILER_INCLUDEDIR+=src
  626. endif
  627. ifeq ($(FULL_TARGET),powerpc64-embedded)
  628. override COMPILER_INCLUDEDIR+=src
  629. endif
  630. ifeq ($(FULL_TARGET),avr-embedded)
  631. override COMPILER_INCLUDEDIR+=src
  632. endif
  633. ifeq ($(FULL_TARGET),armeb-linux)
  634. override COMPILER_INCLUDEDIR+=src
  635. endif
  636. ifeq ($(FULL_TARGET),armeb-embedded)
  637. override COMPILER_INCLUDEDIR+=src
  638. endif
  639. ifeq ($(FULL_TARGET),mipsel-linux)
  640. override COMPILER_INCLUDEDIR+=src
  641. endif
  642. ifeq ($(FULL_TARGET),i386-linux)
  643. override COMPILER_SOURCEDIR+=src tests
  644. endif
  645. ifeq ($(FULL_TARGET),i386-go32v2)
  646. override COMPILER_SOURCEDIR+=src tests
  647. endif
  648. ifeq ($(FULL_TARGET),i386-win32)
  649. override COMPILER_SOURCEDIR+=src tests
  650. endif
  651. ifeq ($(FULL_TARGET),i386-os2)
  652. override COMPILER_SOURCEDIR+=src tests
  653. endif
  654. ifeq ($(FULL_TARGET),i386-freebsd)
  655. override COMPILER_SOURCEDIR+=src tests
  656. endif
  657. ifeq ($(FULL_TARGET),i386-beos)
  658. override COMPILER_SOURCEDIR+=src tests
  659. endif
  660. ifeq ($(FULL_TARGET),i386-haiku)
  661. override COMPILER_SOURCEDIR+=src tests
  662. endif
  663. ifeq ($(FULL_TARGET),i386-netbsd)
  664. override COMPILER_SOURCEDIR+=src tests
  665. endif
  666. ifeq ($(FULL_TARGET),i386-solaris)
  667. override COMPILER_SOURCEDIR+=src tests
  668. endif
  669. ifeq ($(FULL_TARGET),i386-qnx)
  670. override COMPILER_SOURCEDIR+=src tests
  671. endif
  672. ifeq ($(FULL_TARGET),i386-netware)
  673. override COMPILER_SOURCEDIR+=src tests
  674. endif
  675. ifeq ($(FULL_TARGET),i386-openbsd)
  676. override COMPILER_SOURCEDIR+=src tests
  677. endif
  678. ifeq ($(FULL_TARGET),i386-wdosx)
  679. override COMPILER_SOURCEDIR+=src tests
  680. endif
  681. ifeq ($(FULL_TARGET),i386-darwin)
  682. override COMPILER_SOURCEDIR+=src tests
  683. endif
  684. ifeq ($(FULL_TARGET),i386-emx)
  685. override COMPILER_SOURCEDIR+=src tests
  686. endif
  687. ifeq ($(FULL_TARGET),i386-watcom)
  688. override COMPILER_SOURCEDIR+=src tests
  689. endif
  690. ifeq ($(FULL_TARGET),i386-netwlibc)
  691. override COMPILER_SOURCEDIR+=src tests
  692. endif
  693. ifeq ($(FULL_TARGET),i386-wince)
  694. override COMPILER_SOURCEDIR+=src tests
  695. endif
  696. ifeq ($(FULL_TARGET),i386-embedded)
  697. override COMPILER_SOURCEDIR+=src tests
  698. endif
  699. ifeq ($(FULL_TARGET),i386-symbian)
  700. override COMPILER_SOURCEDIR+=src tests
  701. endif
  702. ifeq ($(FULL_TARGET),i386-nativent)
  703. override COMPILER_SOURCEDIR+=src tests
  704. endif
  705. ifeq ($(FULL_TARGET),i386-iphonesim)
  706. override COMPILER_SOURCEDIR+=src tests
  707. endif
  708. ifeq ($(FULL_TARGET),m68k-linux)
  709. override COMPILER_SOURCEDIR+=src tests
  710. endif
  711. ifeq ($(FULL_TARGET),m68k-freebsd)
  712. override COMPILER_SOURCEDIR+=src tests
  713. endif
  714. ifeq ($(FULL_TARGET),m68k-netbsd)
  715. override COMPILER_SOURCEDIR+=src tests
  716. endif
  717. ifeq ($(FULL_TARGET),m68k-amiga)
  718. override COMPILER_SOURCEDIR+=src tests
  719. endif
  720. ifeq ($(FULL_TARGET),m68k-atari)
  721. override COMPILER_SOURCEDIR+=src tests
  722. endif
  723. ifeq ($(FULL_TARGET),m68k-openbsd)
  724. override COMPILER_SOURCEDIR+=src tests
  725. endif
  726. ifeq ($(FULL_TARGET),m68k-palmos)
  727. override COMPILER_SOURCEDIR+=src tests
  728. endif
  729. ifeq ($(FULL_TARGET),m68k-embedded)
  730. override COMPILER_SOURCEDIR+=src tests
  731. endif
  732. ifeq ($(FULL_TARGET),powerpc-linux)
  733. override COMPILER_SOURCEDIR+=src tests
  734. endif
  735. ifeq ($(FULL_TARGET),powerpc-netbsd)
  736. override COMPILER_SOURCEDIR+=src tests
  737. endif
  738. ifeq ($(FULL_TARGET),powerpc-amiga)
  739. override COMPILER_SOURCEDIR+=src tests
  740. endif
  741. ifeq ($(FULL_TARGET),powerpc-macos)
  742. override COMPILER_SOURCEDIR+=src tests
  743. endif
  744. ifeq ($(FULL_TARGET),powerpc-darwin)
  745. override COMPILER_SOURCEDIR+=src tests
  746. endif
  747. ifeq ($(FULL_TARGET),powerpc-morphos)
  748. override COMPILER_SOURCEDIR+=src tests
  749. endif
  750. ifeq ($(FULL_TARGET),powerpc-embedded)
  751. override COMPILER_SOURCEDIR+=src tests
  752. endif
  753. ifeq ($(FULL_TARGET),sparc-linux)
  754. override COMPILER_SOURCEDIR+=src tests
  755. endif
  756. ifeq ($(FULL_TARGET),sparc-netbsd)
  757. override COMPILER_SOURCEDIR+=src tests
  758. endif
  759. ifeq ($(FULL_TARGET),sparc-solaris)
  760. override COMPILER_SOURCEDIR+=src tests
  761. endif
  762. ifeq ($(FULL_TARGET),sparc-embedded)
  763. override COMPILER_SOURCEDIR+=src tests
  764. endif
  765. ifeq ($(FULL_TARGET),x86_64-linux)
  766. override COMPILER_SOURCEDIR+=src tests
  767. endif
  768. ifeq ($(FULL_TARGET),x86_64-freebsd)
  769. override COMPILER_SOURCEDIR+=src tests
  770. endif
  771. ifeq ($(FULL_TARGET),x86_64-solaris)
  772. override COMPILER_SOURCEDIR+=src tests
  773. endif
  774. ifeq ($(FULL_TARGET),x86_64-darwin)
  775. override COMPILER_SOURCEDIR+=src tests
  776. endif
  777. ifeq ($(FULL_TARGET),x86_64-win64)
  778. override COMPILER_SOURCEDIR+=src tests
  779. endif
  780. ifeq ($(FULL_TARGET),x86_64-embedded)
  781. override COMPILER_SOURCEDIR+=src tests
  782. endif
  783. ifeq ($(FULL_TARGET),arm-linux)
  784. override COMPILER_SOURCEDIR+=src tests
  785. endif
  786. ifeq ($(FULL_TARGET),arm-palmos)
  787. override COMPILER_SOURCEDIR+=src tests
  788. endif
  789. ifeq ($(FULL_TARGET),arm-darwin)
  790. override COMPILER_SOURCEDIR+=src tests
  791. endif
  792. ifeq ($(FULL_TARGET),arm-wince)
  793. override COMPILER_SOURCEDIR+=src tests
  794. endif
  795. ifeq ($(FULL_TARGET),arm-gba)
  796. override COMPILER_SOURCEDIR+=src tests
  797. endif
  798. ifeq ($(FULL_TARGET),arm-nds)
  799. override COMPILER_SOURCEDIR+=src tests
  800. endif
  801. ifeq ($(FULL_TARGET),arm-embedded)
  802. override COMPILER_SOURCEDIR+=src tests
  803. endif
  804. ifeq ($(FULL_TARGET),arm-symbian)
  805. override COMPILER_SOURCEDIR+=src tests
  806. endif
  807. ifeq ($(FULL_TARGET),powerpc64-linux)
  808. override COMPILER_SOURCEDIR+=src tests
  809. endif
  810. ifeq ($(FULL_TARGET),powerpc64-darwin)
  811. override COMPILER_SOURCEDIR+=src tests
  812. endif
  813. ifeq ($(FULL_TARGET),powerpc64-embedded)
  814. override COMPILER_SOURCEDIR+=src tests
  815. endif
  816. ifeq ($(FULL_TARGET),avr-embedded)
  817. override COMPILER_SOURCEDIR+=src tests
  818. endif
  819. ifeq ($(FULL_TARGET),armeb-linux)
  820. override COMPILER_SOURCEDIR+=src tests
  821. endif
  822. ifeq ($(FULL_TARGET),armeb-embedded)
  823. override COMPILER_SOURCEDIR+=src tests
  824. endif
  825. ifeq ($(FULL_TARGET),mipsel-linux)
  826. override COMPILER_SOURCEDIR+=src tests
  827. endif
  828. ifdef REQUIRE_UNITSDIR
  829. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  830. endif
  831. ifdef REQUIRE_PACKAGESDIR
  832. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  833. endif
  834. ifdef ZIPINSTALL
  835. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  836. UNIXHier=1
  837. endif
  838. else
  839. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  840. UNIXHier=1
  841. endif
  842. endif
  843. ifndef INSTALL_PREFIX
  844. ifdef PREFIX
  845. INSTALL_PREFIX=$(PREFIX)
  846. endif
  847. endif
  848. ifndef INSTALL_PREFIX
  849. ifdef UNIXHier
  850. INSTALL_PREFIX=/usr/local
  851. else
  852. ifdef INSTALL_FPCPACKAGE
  853. INSTALL_BASEDIR:=/pp
  854. else
  855. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  856. endif
  857. endif
  858. endif
  859. export INSTALL_PREFIX
  860. ifdef INSTALL_FPCSUBDIR
  861. export INSTALL_FPCSUBDIR
  862. endif
  863. ifndef DIST_DESTDIR
  864. DIST_DESTDIR:=$(BASEDIR)
  865. endif
  866. export DIST_DESTDIR
  867. ifndef COMPILER_UNITTARGETDIR
  868. ifdef PACKAGEDIR_MAIN
  869. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  870. else
  871. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  872. endif
  873. endif
  874. ifndef COMPILER_TARGETDIR
  875. COMPILER_TARGETDIR=.
  876. endif
  877. ifndef INSTALL_BASEDIR
  878. ifdef UNIXHier
  879. ifdef INSTALL_FPCPACKAGE
  880. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  881. else
  882. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  883. endif
  884. else
  885. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  886. endif
  887. endif
  888. ifndef INSTALL_BINDIR
  889. ifdef UNIXHier
  890. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  891. else
  892. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  893. ifdef INSTALL_FPCPACKAGE
  894. ifdef CROSSCOMPILE
  895. ifdef CROSSINSTALL
  896. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  897. else
  898. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  899. endif
  900. else
  901. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  902. endif
  903. endif
  904. endif
  905. endif
  906. ifndef INSTALL_UNITDIR
  907. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  908. ifdef INSTALL_FPCPACKAGE
  909. ifdef PACKAGE_NAME
  910. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  911. endif
  912. endif
  913. endif
  914. ifndef INSTALL_LIBDIR
  915. ifdef UNIXHier
  916. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  917. else
  918. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  919. endif
  920. endif
  921. ifndef INSTALL_SOURCEDIR
  922. ifdef UNIXHier
  923. ifdef BSDhier
  924. SRCPREFIXDIR=share/src
  925. else
  926. ifdef linuxHier
  927. SRCPREFIXDIR=share/src
  928. else
  929. SRCPREFIXDIR=src
  930. endif
  931. endif
  932. ifdef INSTALL_FPCPACKAGE
  933. ifdef INSTALL_FPCSUBDIR
  934. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  935. else
  936. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  937. endif
  938. else
  939. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  940. endif
  941. else
  942. ifdef INSTALL_FPCPACKAGE
  943. ifdef INSTALL_FPCSUBDIR
  944. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  945. else
  946. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  947. endif
  948. else
  949. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  950. endif
  951. endif
  952. endif
  953. ifndef INSTALL_DOCDIR
  954. ifdef UNIXHier
  955. ifdef BSDhier
  956. DOCPREFIXDIR=share/doc
  957. else
  958. ifdef linuxHier
  959. DOCPREFIXDIR=share/doc
  960. else
  961. DOCPREFIXDIR=doc
  962. endif
  963. endif
  964. ifdef INSTALL_FPCPACKAGE
  965. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  966. else
  967. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  968. endif
  969. else
  970. ifdef INSTALL_FPCPACKAGE
  971. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  972. else
  973. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  974. endif
  975. endif
  976. endif
  977. ifndef INSTALL_EXAMPLEDIR
  978. ifdef UNIXHier
  979. ifdef INSTALL_FPCPACKAGE
  980. ifdef BSDhier
  981. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  982. else
  983. ifdef linuxHier
  984. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  985. else
  986. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  987. endif
  988. endif
  989. else
  990. ifdef BSDhier
  991. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  992. else
  993. ifdef linuxHier
  994. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  995. else
  996. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  997. endif
  998. endif
  999. endif
  1000. else
  1001. ifdef INSTALL_FPCPACKAGE
  1002. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  1003. else
  1004. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  1005. endif
  1006. endif
  1007. endif
  1008. ifndef INSTALL_DATADIR
  1009. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  1010. endif
  1011. ifndef INSTALL_SHAREDDIR
  1012. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  1013. endif
  1014. ifdef CROSSCOMPILE
  1015. ifndef CROSSBINDIR
  1016. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  1017. ifeq ($(CROSSBINDIR),)
  1018. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  1019. endif
  1020. endif
  1021. else
  1022. CROSSBINDIR=
  1023. endif
  1024. ifeq ($(OS_SOURCE),linux)
  1025. ifndef GCCLIBDIR
  1026. ifeq ($(CPU_TARGET),i386)
  1027. ifneq ($(findstring x86_64,$(shell uname -a)),)
  1028. ifeq ($(BINUTILSPREFIX),)
  1029. GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
  1030. endif
  1031. endif
  1032. endif
  1033. ifeq ($(CPU_TARGET),powerpc64)
  1034. ifeq ($(BINUTILSPREFIX),)
  1035. GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
  1036. endif
  1037. endif
  1038. endif
  1039. ifndef GCCLIBDIR
  1040. CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
  1041. ifneq ($(CROSSGCC),)
  1042. GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
  1043. endif
  1044. endif
  1045. ifndef OTHERLIBDIR
  1046. OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
  1047. endif
  1048. endif
  1049. ifdef inUnix
  1050. ifeq ($(OS_SOURCE),netbsd)
  1051. OTHERLIBDIR+=/usr/pkg/lib
  1052. endif
  1053. export GCCLIBDIR OTHERLIB
  1054. endif
  1055. BATCHEXT=.bat
  1056. LOADEREXT=.as
  1057. EXEEXT=.exe
  1058. PPLEXT=.ppl
  1059. PPUEXT=.ppu
  1060. OEXT=.o
  1061. ASMEXT=.s
  1062. SMARTEXT=.sl
  1063. STATICLIBEXT=.a
  1064. SHAREDLIBEXT=.so
  1065. SHAREDLIBPREFIX=libfp
  1066. STATICLIBPREFIX=libp
  1067. IMPORTLIBPREFIX=libimp
  1068. RSTEXT=.rst
  1069. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  1070. ifeq ($(OS_TARGET),go32v1)
  1071. STATICLIBPREFIX=
  1072. SHORTSUFFIX=v1
  1073. endif
  1074. ifeq ($(OS_TARGET),go32v2)
  1075. STATICLIBPREFIX=
  1076. SHORTSUFFIX=dos
  1077. IMPORTLIBPREFIX=
  1078. endif
  1079. ifeq ($(OS_TARGET),watcom)
  1080. STATICLIBPREFIX=
  1081. OEXT=.obj
  1082. ASMEXT=.asm
  1083. SHAREDLIBEXT=.dll
  1084. SHORTSUFFIX=wat
  1085. IMPORTLIBPREFIX=
  1086. endif
  1087. ifeq ($(OS_TARGET),linux)
  1088. BATCHEXT=.sh
  1089. EXEEXT=
  1090. HASSHAREDLIB=1
  1091. SHORTSUFFIX=lnx
  1092. endif
  1093. ifeq ($(OS_TARGET),freebsd)
  1094. BATCHEXT=.sh
  1095. EXEEXT=
  1096. HASSHAREDLIB=1
  1097. SHORTSUFFIX=fbs
  1098. endif
  1099. ifeq ($(OS_TARGET),netbsd)
  1100. BATCHEXT=.sh
  1101. EXEEXT=
  1102. HASSHAREDLIB=1
  1103. SHORTSUFFIX=nbs
  1104. endif
  1105. ifeq ($(OS_TARGET),openbsd)
  1106. BATCHEXT=.sh
  1107. EXEEXT=
  1108. HASSHAREDLIB=1
  1109. SHORTSUFFIX=obs
  1110. endif
  1111. ifeq ($(OS_TARGET),win32)
  1112. SHAREDLIBEXT=.dll
  1113. SHORTSUFFIX=w32
  1114. endif
  1115. ifeq ($(OS_TARGET),os2)
  1116. BATCHEXT=.cmd
  1117. AOUTEXT=.out
  1118. STATICLIBPREFIX=
  1119. SHAREDLIBEXT=.dll
  1120. SHORTSUFFIX=os2
  1121. ECHO=echo
  1122. IMPORTLIBPREFIX=
  1123. endif
  1124. ifeq ($(OS_TARGET),emx)
  1125. BATCHEXT=.cmd
  1126. AOUTEXT=.out
  1127. STATICLIBPREFIX=
  1128. SHAREDLIBEXT=.dll
  1129. SHORTSUFFIX=emx
  1130. ECHO=echo
  1131. IMPORTLIBPREFIX=
  1132. endif
  1133. ifeq ($(OS_TARGET),amiga)
  1134. EXEEXT=
  1135. SHAREDLIBEXT=.library
  1136. SHORTSUFFIX=amg
  1137. endif
  1138. ifeq ($(OS_TARGET),morphos)
  1139. EXEEXT=
  1140. SHAREDLIBEXT=.library
  1141. SHORTSUFFIX=mos
  1142. endif
  1143. ifeq ($(OS_TARGET),atari)
  1144. EXEEXT=.ttp
  1145. SHORTSUFFIX=ata
  1146. endif
  1147. ifeq ($(OS_TARGET),beos)
  1148. BATCHEXT=.sh
  1149. EXEEXT=
  1150. SHORTSUFFIX=be
  1151. endif
  1152. ifeq ($(OS_TARGET),haiku)
  1153. BATCHEXT=.sh
  1154. EXEEXT=
  1155. SHORTSUFFIX=hai
  1156. endif
  1157. ifeq ($(OS_TARGET),solaris)
  1158. BATCHEXT=.sh
  1159. EXEEXT=
  1160. SHORTSUFFIX=sun
  1161. endif
  1162. ifeq ($(OS_TARGET),qnx)
  1163. BATCHEXT=.sh
  1164. EXEEXT=
  1165. SHORTSUFFIX=qnx
  1166. endif
  1167. ifeq ($(OS_TARGET),netware)
  1168. EXEEXT=.nlm
  1169. STATICLIBPREFIX=
  1170. SHORTSUFFIX=nw
  1171. IMPORTLIBPREFIX=imp
  1172. endif
  1173. ifeq ($(OS_TARGET),netwlibc)
  1174. EXEEXT=.nlm
  1175. STATICLIBPREFIX=
  1176. SHORTSUFFIX=nwl
  1177. IMPORTLIBPREFIX=imp
  1178. endif
  1179. ifeq ($(OS_TARGET),macos)
  1180. BATCHEXT=
  1181. EXEEXT=
  1182. DEBUGSYMEXT=.xcoff
  1183. SHORTSUFFIX=mac
  1184. IMPORTLIBPREFIX=imp
  1185. endif
  1186. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  1187. BATCHEXT=.sh
  1188. EXEEXT=
  1189. HASSHAREDLIB=1
  1190. SHORTSUFFIX=dwn
  1191. endif
  1192. ifeq ($(OS_TARGET),gba)
  1193. EXEEXT=.gba
  1194. SHAREDLIBEXT=.so
  1195. SHORTSUFFIX=gba
  1196. endif
  1197. ifeq ($(OS_TARGET),symbian)
  1198. SHAREDLIBEXT=.dll
  1199. SHORTSUFFIX=symbian
  1200. endif
  1201. ifeq ($(OS_TARGET),NativeNT)
  1202. SHAREDLIBEXT=.dll
  1203. SHORTSUFFIX=nativent
  1204. endif
  1205. else
  1206. ifeq ($(OS_TARGET),go32v1)
  1207. PPUEXT=.pp1
  1208. OEXT=.o1
  1209. ASMEXT=.s1
  1210. SMARTEXT=.sl1
  1211. STATICLIBEXT=.a1
  1212. SHAREDLIBEXT=.so1
  1213. STATICLIBPREFIX=
  1214. SHORTSUFFIX=v1
  1215. IMPORTLIBPREFIX=
  1216. endif
  1217. ifeq ($(OS_TARGET),go32v2)
  1218. STATICLIBPREFIX=
  1219. SHORTSUFFIX=dos
  1220. IMPORTLIBPREFIX=
  1221. endif
  1222. ifeq ($(OS_TARGET),watcom)
  1223. STATICLIBPREFIX=
  1224. SHORTSUFFIX=wat
  1225. IMPORTLIBPREFIX=
  1226. endif
  1227. ifeq ($(OS_TARGET),linux)
  1228. BATCHEXT=.sh
  1229. EXEEXT=
  1230. HASSHAREDLIB=1
  1231. SHORTSUFFIX=lnx
  1232. endif
  1233. ifeq ($(OS_TARGET),freebsd)
  1234. BATCHEXT=.sh
  1235. EXEEXT=
  1236. HASSHAREDLIB=1
  1237. SHORTSUFFIX=fbs
  1238. endif
  1239. ifeq ($(OS_TARGET),netbsd)
  1240. BATCHEXT=.sh
  1241. EXEEXT=
  1242. HASSHAREDLIB=1
  1243. SHORTSUFFIX=nbs
  1244. endif
  1245. ifeq ($(OS_TARGET),openbsd)
  1246. BATCHEXT=.sh
  1247. EXEEXT=
  1248. HASSHAREDLIB=1
  1249. SHORTSUFFIX=obs
  1250. endif
  1251. ifeq ($(OS_TARGET),win32)
  1252. PPUEXT=.ppw
  1253. OEXT=.ow
  1254. ASMEXT=.sw
  1255. SMARTEXT=.slw
  1256. STATICLIBEXT=.aw
  1257. SHAREDLIBEXT=.dll
  1258. SHORTSUFFIX=w32
  1259. endif
  1260. ifeq ($(OS_TARGET),os2)
  1261. BATCHEXT=.cmd
  1262. PPUEXT=.ppo
  1263. ASMEXT=.so2
  1264. OEXT=.oo2
  1265. AOUTEXT=.out
  1266. SMARTEXT=.sl2
  1267. STATICLIBPREFIX=
  1268. STATICLIBEXT=.ao2
  1269. SHAREDLIBEXT=.dll
  1270. SHORTSUFFIX=os2
  1271. ECHO=echo
  1272. IMPORTLIBPREFIX=
  1273. endif
  1274. ifeq ($(OS_TARGET),amiga)
  1275. EXEEXT=
  1276. PPUEXT=.ppu
  1277. ASMEXT=.s
  1278. OEXT=.o
  1279. SMARTEXT=.sl
  1280. STATICLIBEXT=.a
  1281. SHAREDLIBEXT=.library
  1282. SHORTSUFFIX=amg
  1283. endif
  1284. ifeq ($(OS_TARGET),atari)
  1285. PPUEXT=.ppu
  1286. ASMEXT=.s
  1287. OEXT=.o
  1288. SMARTEXT=.sl
  1289. STATICLIBEXT=.a
  1290. EXEEXT=.ttp
  1291. SHORTSUFFIX=ata
  1292. endif
  1293. ifeq ($(OS_TARGET),beos)
  1294. BATCHEXT=.sh
  1295. PPUEXT=.ppu
  1296. ASMEXT=.s
  1297. OEXT=.o
  1298. SMARTEXT=.sl
  1299. STATICLIBEXT=.a
  1300. EXEEXT=
  1301. SHORTSUFFIX=be
  1302. endif
  1303. ifeq ($(OS_TARGET),solaris)
  1304. BATCHEXT=.sh
  1305. PPUEXT=.ppu
  1306. ASMEXT=.s
  1307. OEXT=.o
  1308. SMARTEXT=.sl
  1309. STATICLIBEXT=.a
  1310. EXEEXT=
  1311. SHORTSUFFIX=sun
  1312. endif
  1313. ifeq ($(OS_TARGET),qnx)
  1314. BATCHEXT=.sh
  1315. PPUEXT=.ppu
  1316. ASMEXT=.s
  1317. OEXT=.o
  1318. SMARTEXT=.sl
  1319. STATICLIBEXT=.a
  1320. EXEEXT=
  1321. SHORTSUFFIX=qnx
  1322. endif
  1323. ifeq ($(OS_TARGET),netware)
  1324. STATICLIBPREFIX=
  1325. PPUEXT=.ppu
  1326. OEXT=.o
  1327. ASMEXT=.s
  1328. SMARTEXT=.sl
  1329. STATICLIBEXT=.a
  1330. SHAREDLIBEXT=.nlm
  1331. EXEEXT=.nlm
  1332. SHORTSUFFIX=nw
  1333. IMPORTLIBPREFIX=imp
  1334. endif
  1335. ifeq ($(OS_TARGET),netwlibc)
  1336. STATICLIBPREFIX=
  1337. PPUEXT=.ppu
  1338. OEXT=.o
  1339. ASMEXT=.s
  1340. SMARTEXT=.sl
  1341. STATICLIBEXT=.a
  1342. SHAREDLIBEXT=.nlm
  1343. EXEEXT=.nlm
  1344. SHORTSUFFIX=nwl
  1345. IMPORTLIBPREFIX=imp
  1346. endif
  1347. ifeq ($(OS_TARGET),macos)
  1348. BATCHEXT=
  1349. PPUEXT=.ppu
  1350. ASMEXT=.s
  1351. OEXT=.o
  1352. SMARTEXT=.sl
  1353. STATICLIBEXT=.a
  1354. EXEEXT=
  1355. DEBUGSYMEXT=.xcoff
  1356. SHORTSUFFIX=mac
  1357. IMPORTLIBPREFIX=imp
  1358. endif
  1359. endif
  1360. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  1361. FPCMADE=fpcmade.$(SHORTSUFFIX)
  1362. ZIPSUFFIX=$(SHORTSUFFIX)
  1363. ZIPCROSSPREFIX=
  1364. ZIPSOURCESUFFIX=src
  1365. ZIPEXAMPLESUFFIX=exm
  1366. else
  1367. FPCMADE=fpcmade.$(TARGETSUFFIX)
  1368. ZIPSOURCESUFFIX=.source
  1369. ZIPEXAMPLESUFFIX=.examples
  1370. ifdef CROSSCOMPILE
  1371. ZIPSUFFIX=.$(SOURCESUFFIX)
  1372. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  1373. else
  1374. ZIPSUFFIX=.$(TARGETSUFFIX)
  1375. ZIPCROSSPREFIX=
  1376. endif
  1377. endif
  1378. ifndef ECHO
  1379. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  1380. ifeq ($(ECHO),)
  1381. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  1382. ifeq ($(ECHO),)
  1383. ECHO= __missing_command_ECHO
  1384. else
  1385. ECHO:=$(firstword $(ECHO))
  1386. endif
  1387. else
  1388. ECHO:=$(firstword $(ECHO))
  1389. endif
  1390. endif
  1391. export ECHO
  1392. ifndef DATE
  1393. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  1394. ifeq ($(DATE),)
  1395. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  1396. ifeq ($(DATE),)
  1397. DATE= __missing_command_DATE
  1398. else
  1399. DATE:=$(firstword $(DATE))
  1400. endif
  1401. else
  1402. DATE:=$(firstword $(DATE))
  1403. endif
  1404. endif
  1405. export DATE
  1406. ifndef GINSTALL
  1407. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  1408. ifeq ($(GINSTALL),)
  1409. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  1410. ifeq ($(GINSTALL),)
  1411. GINSTALL= __missing_command_GINSTALL
  1412. else
  1413. GINSTALL:=$(firstword $(GINSTALL))
  1414. endif
  1415. else
  1416. GINSTALL:=$(firstword $(GINSTALL))
  1417. endif
  1418. endif
  1419. export GINSTALL
  1420. ifndef CPPROG
  1421. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  1422. ifeq ($(CPPROG),)
  1423. CPPROG= __missing_command_CPPROG
  1424. else
  1425. CPPROG:=$(firstword $(CPPROG))
  1426. endif
  1427. endif
  1428. export CPPROG
  1429. ifndef RMPROG
  1430. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  1431. ifeq ($(RMPROG),)
  1432. RMPROG= __missing_command_RMPROG
  1433. else
  1434. RMPROG:=$(firstword $(RMPROG))
  1435. endif
  1436. endif
  1437. export RMPROG
  1438. ifndef MVPROG
  1439. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  1440. ifeq ($(MVPROG),)
  1441. MVPROG= __missing_command_MVPROG
  1442. else
  1443. MVPROG:=$(firstword $(MVPROG))
  1444. endif
  1445. endif
  1446. export MVPROG
  1447. ifndef MKDIRPROG
  1448. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1449. ifeq ($(MKDIRPROG),)
  1450. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1451. ifeq ($(MKDIRPROG),)
  1452. MKDIRPROG= __missing_command_MKDIRPROG
  1453. else
  1454. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1455. endif
  1456. else
  1457. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1458. endif
  1459. endif
  1460. export MKDIRPROG
  1461. ifndef ECHOREDIR
  1462. ifndef inUnix
  1463. ECHOREDIR=echo
  1464. else
  1465. ECHOREDIR=$(ECHO)
  1466. endif
  1467. endif
  1468. ifndef COPY
  1469. COPY:=$(CPPROG) -fp
  1470. endif
  1471. ifndef COPYTREE
  1472. COPYTREE:=$(CPPROG) -Rfp
  1473. endif
  1474. ifndef MKDIRTREE
  1475. MKDIRTREE:=$(MKDIRPROG) -p
  1476. endif
  1477. ifndef MOVE
  1478. MOVE:=$(MVPROG) -f
  1479. endif
  1480. ifndef DEL
  1481. DEL:=$(RMPROG) -f
  1482. endif
  1483. ifndef DELTREE
  1484. DELTREE:=$(RMPROG) -rf
  1485. endif
  1486. ifndef INSTALL
  1487. ifdef inUnix
  1488. INSTALL:=$(GINSTALL) -c -m 644
  1489. else
  1490. INSTALL:=$(COPY)
  1491. endif
  1492. endif
  1493. ifndef INSTALLEXE
  1494. ifdef inUnix
  1495. INSTALLEXE:=$(GINSTALL) -c -m 755
  1496. else
  1497. INSTALLEXE:=$(COPY)
  1498. endif
  1499. endif
  1500. ifndef MKDIR
  1501. MKDIR:=$(GINSTALL) -m 755 -d
  1502. endif
  1503. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  1504. ifndef PPUMOVE
  1505. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  1506. ifeq ($(PPUMOVE),)
  1507. PPUMOVE= __missing_command_PPUMOVE
  1508. else
  1509. PPUMOVE:=$(firstword $(PPUMOVE))
  1510. endif
  1511. endif
  1512. export PPUMOVE
  1513. ifndef FPCMAKE
  1514. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  1515. ifeq ($(FPCMAKE),)
  1516. FPCMAKE= __missing_command_FPCMAKE
  1517. else
  1518. FPCMAKE:=$(firstword $(FPCMAKE))
  1519. endif
  1520. endif
  1521. export FPCMAKE
  1522. ifndef ZIPPROG
  1523. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  1524. ifeq ($(ZIPPROG),)
  1525. ZIPPROG= __missing_command_ZIPPROG
  1526. else
  1527. ZIPPROG:=$(firstword $(ZIPPROG))
  1528. endif
  1529. endif
  1530. export ZIPPROG
  1531. ifndef TARPROG
  1532. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  1533. ifeq ($(TARPROG),)
  1534. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  1535. ifeq ($(TARPROG),)
  1536. TARPROG= __missing_command_TARPROG
  1537. else
  1538. TARPROG:=$(firstword $(TARPROG))
  1539. endif
  1540. else
  1541. TARPROG:=$(firstword $(TARPROG))
  1542. endif
  1543. endif
  1544. export TARPROG
  1545. ASNAME=$(BINUTILSPREFIX)as
  1546. LDNAME=$(BINUTILSPREFIX)ld
  1547. ARNAME=$(BINUTILSPREFIX)ar
  1548. RCNAME=$(BINUTILSPREFIX)rc
  1549. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  1550. ifeq ($(OS_TARGET),win32)
  1551. ifeq ($(CROSSBINDIR),)
  1552. ASNAME=asw
  1553. LDNAME=ldw
  1554. ARNAME=arw
  1555. endif
  1556. endif
  1557. endif
  1558. ifndef ASPROG
  1559. ifdef CROSSBINDIR
  1560. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  1561. else
  1562. ASPROG=$(ASNAME)
  1563. endif
  1564. endif
  1565. ifndef LDPROG
  1566. ifdef CROSSBINDIR
  1567. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  1568. else
  1569. LDPROG=$(LDNAME)
  1570. endif
  1571. endif
  1572. ifndef RCPROG
  1573. ifdef CROSSBINDIR
  1574. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  1575. else
  1576. RCPROG=$(RCNAME)
  1577. endif
  1578. endif
  1579. ifndef ARPROG
  1580. ifdef CROSSBINDIR
  1581. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  1582. else
  1583. ARPROG=$(ARNAME)
  1584. endif
  1585. endif
  1586. AS=$(ASPROG)
  1587. LD=$(LDPROG)
  1588. RC=$(RCPROG)
  1589. AR=$(ARPROG)
  1590. PPAS=ppas$(SRCBATCHEXT)
  1591. ifdef inUnix
  1592. LDCONFIG=ldconfig
  1593. else
  1594. LDCONFIG=
  1595. endif
  1596. ifdef DATE
  1597. DATESTR:=$(shell $(DATE) +%Y%m%d)
  1598. else
  1599. DATESTR=
  1600. endif
  1601. ifndef UPXPROG
  1602. ifeq ($(OS_TARGET),go32v2)
  1603. UPXPROG:=1
  1604. endif
  1605. ifeq ($(OS_TARGET),win32)
  1606. UPXPROG:=1
  1607. endif
  1608. ifdef UPXPROG
  1609. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  1610. ifeq ($(UPXPROG),)
  1611. UPXPROG=
  1612. else
  1613. UPXPROG:=$(firstword $(UPXPROG))
  1614. endif
  1615. else
  1616. UPXPROG=
  1617. endif
  1618. endif
  1619. export UPXPROG
  1620. ZIPOPT=-9
  1621. ZIPEXT=.zip
  1622. ifeq ($(USETAR),bz2)
  1623. TAROPT=vj
  1624. TAREXT=.tar.bz2
  1625. else
  1626. TAROPT=vz
  1627. TAREXT=.tar.gz
  1628. endif
  1629. override REQUIRE_PACKAGES=rtl
  1630. ifeq ($(FULL_TARGET),i386-linux)
  1631. REQUIRE_PACKAGES_RTL=1
  1632. endif
  1633. ifeq ($(FULL_TARGET),i386-go32v2)
  1634. REQUIRE_PACKAGES_RTL=1
  1635. endif
  1636. ifeq ($(FULL_TARGET),i386-win32)
  1637. REQUIRE_PACKAGES_RTL=1
  1638. endif
  1639. ifeq ($(FULL_TARGET),i386-os2)
  1640. REQUIRE_PACKAGES_RTL=1
  1641. endif
  1642. ifeq ($(FULL_TARGET),i386-freebsd)
  1643. REQUIRE_PACKAGES_RTL=1
  1644. endif
  1645. ifeq ($(FULL_TARGET),i386-beos)
  1646. REQUIRE_PACKAGES_RTL=1
  1647. endif
  1648. ifeq ($(FULL_TARGET),i386-haiku)
  1649. REQUIRE_PACKAGES_RTL=1
  1650. endif
  1651. ifeq ($(FULL_TARGET),i386-netbsd)
  1652. REQUIRE_PACKAGES_RTL=1
  1653. endif
  1654. ifeq ($(FULL_TARGET),i386-solaris)
  1655. REQUIRE_PACKAGES_RTL=1
  1656. endif
  1657. ifeq ($(FULL_TARGET),i386-qnx)
  1658. REQUIRE_PACKAGES_RTL=1
  1659. endif
  1660. ifeq ($(FULL_TARGET),i386-netware)
  1661. REQUIRE_PACKAGES_RTL=1
  1662. endif
  1663. ifeq ($(FULL_TARGET),i386-openbsd)
  1664. REQUIRE_PACKAGES_RTL=1
  1665. endif
  1666. ifeq ($(FULL_TARGET),i386-wdosx)
  1667. REQUIRE_PACKAGES_RTL=1
  1668. endif
  1669. ifeq ($(FULL_TARGET),i386-darwin)
  1670. REQUIRE_PACKAGES_RTL=1
  1671. endif
  1672. ifeq ($(FULL_TARGET),i386-emx)
  1673. REQUIRE_PACKAGES_RTL=1
  1674. endif
  1675. ifeq ($(FULL_TARGET),i386-watcom)
  1676. REQUIRE_PACKAGES_RTL=1
  1677. endif
  1678. ifeq ($(FULL_TARGET),i386-netwlibc)
  1679. REQUIRE_PACKAGES_RTL=1
  1680. endif
  1681. ifeq ($(FULL_TARGET),i386-wince)
  1682. REQUIRE_PACKAGES_RTL=1
  1683. endif
  1684. ifeq ($(FULL_TARGET),i386-embedded)
  1685. REQUIRE_PACKAGES_RTL=1
  1686. endif
  1687. ifeq ($(FULL_TARGET),i386-symbian)
  1688. REQUIRE_PACKAGES_RTL=1
  1689. endif
  1690. ifeq ($(FULL_TARGET),i386-nativent)
  1691. REQUIRE_PACKAGES_RTL=1
  1692. endif
  1693. ifeq ($(FULL_TARGET),i386-iphonesim)
  1694. REQUIRE_PACKAGES_RTL=1
  1695. endif
  1696. ifeq ($(FULL_TARGET),m68k-linux)
  1697. REQUIRE_PACKAGES_RTL=1
  1698. endif
  1699. ifeq ($(FULL_TARGET),m68k-freebsd)
  1700. REQUIRE_PACKAGES_RTL=1
  1701. endif
  1702. ifeq ($(FULL_TARGET),m68k-netbsd)
  1703. REQUIRE_PACKAGES_RTL=1
  1704. endif
  1705. ifeq ($(FULL_TARGET),m68k-amiga)
  1706. REQUIRE_PACKAGES_RTL=1
  1707. endif
  1708. ifeq ($(FULL_TARGET),m68k-atari)
  1709. REQUIRE_PACKAGES_RTL=1
  1710. endif
  1711. ifeq ($(FULL_TARGET),m68k-openbsd)
  1712. REQUIRE_PACKAGES_RTL=1
  1713. endif
  1714. ifeq ($(FULL_TARGET),m68k-palmos)
  1715. REQUIRE_PACKAGES_RTL=1
  1716. endif
  1717. ifeq ($(FULL_TARGET),m68k-embedded)
  1718. REQUIRE_PACKAGES_RTL=1
  1719. endif
  1720. ifeq ($(FULL_TARGET),powerpc-linux)
  1721. REQUIRE_PACKAGES_RTL=1
  1722. endif
  1723. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1724. REQUIRE_PACKAGES_RTL=1
  1725. endif
  1726. ifeq ($(FULL_TARGET),powerpc-amiga)
  1727. REQUIRE_PACKAGES_RTL=1
  1728. endif
  1729. ifeq ($(FULL_TARGET),powerpc-macos)
  1730. REQUIRE_PACKAGES_RTL=1
  1731. endif
  1732. ifeq ($(FULL_TARGET),powerpc-darwin)
  1733. REQUIRE_PACKAGES_RTL=1
  1734. endif
  1735. ifeq ($(FULL_TARGET),powerpc-morphos)
  1736. REQUIRE_PACKAGES_RTL=1
  1737. endif
  1738. ifeq ($(FULL_TARGET),powerpc-embedded)
  1739. REQUIRE_PACKAGES_RTL=1
  1740. endif
  1741. ifeq ($(FULL_TARGET),sparc-linux)
  1742. REQUIRE_PACKAGES_RTL=1
  1743. endif
  1744. ifeq ($(FULL_TARGET),sparc-netbsd)
  1745. REQUIRE_PACKAGES_RTL=1
  1746. endif
  1747. ifeq ($(FULL_TARGET),sparc-solaris)
  1748. REQUIRE_PACKAGES_RTL=1
  1749. endif
  1750. ifeq ($(FULL_TARGET),sparc-embedded)
  1751. REQUIRE_PACKAGES_RTL=1
  1752. endif
  1753. ifeq ($(FULL_TARGET),x86_64-linux)
  1754. REQUIRE_PACKAGES_RTL=1
  1755. endif
  1756. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1757. REQUIRE_PACKAGES_RTL=1
  1758. endif
  1759. ifeq ($(FULL_TARGET),x86_64-solaris)
  1760. REQUIRE_PACKAGES_RTL=1
  1761. endif
  1762. ifeq ($(FULL_TARGET),x86_64-darwin)
  1763. REQUIRE_PACKAGES_RTL=1
  1764. endif
  1765. ifeq ($(FULL_TARGET),x86_64-win64)
  1766. REQUIRE_PACKAGES_RTL=1
  1767. endif
  1768. ifeq ($(FULL_TARGET),x86_64-embedded)
  1769. REQUIRE_PACKAGES_RTL=1
  1770. endif
  1771. ifeq ($(FULL_TARGET),arm-linux)
  1772. REQUIRE_PACKAGES_RTL=1
  1773. endif
  1774. ifeq ($(FULL_TARGET),arm-palmos)
  1775. REQUIRE_PACKAGES_RTL=1
  1776. endif
  1777. ifeq ($(FULL_TARGET),arm-darwin)
  1778. REQUIRE_PACKAGES_RTL=1
  1779. endif
  1780. ifeq ($(FULL_TARGET),arm-wince)
  1781. REQUIRE_PACKAGES_RTL=1
  1782. endif
  1783. ifeq ($(FULL_TARGET),arm-gba)
  1784. REQUIRE_PACKAGES_RTL=1
  1785. endif
  1786. ifeq ($(FULL_TARGET),arm-nds)
  1787. REQUIRE_PACKAGES_RTL=1
  1788. endif
  1789. ifeq ($(FULL_TARGET),arm-embedded)
  1790. REQUIRE_PACKAGES_RTL=1
  1791. endif
  1792. ifeq ($(FULL_TARGET),arm-symbian)
  1793. REQUIRE_PACKAGES_RTL=1
  1794. endif
  1795. ifeq ($(FULL_TARGET),powerpc64-linux)
  1796. REQUIRE_PACKAGES_RTL=1
  1797. endif
  1798. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1799. REQUIRE_PACKAGES_RTL=1
  1800. endif
  1801. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1802. REQUIRE_PACKAGES_RTL=1
  1803. endif
  1804. ifeq ($(FULL_TARGET),avr-embedded)
  1805. REQUIRE_PACKAGES_RTL=1
  1806. endif
  1807. ifeq ($(FULL_TARGET),armeb-linux)
  1808. REQUIRE_PACKAGES_RTL=1
  1809. endif
  1810. ifeq ($(FULL_TARGET),armeb-embedded)
  1811. REQUIRE_PACKAGES_RTL=1
  1812. endif
  1813. ifeq ($(FULL_TARGET),mipsel-linux)
  1814. REQUIRE_PACKAGES_RTL=1
  1815. endif
  1816. ifdef REQUIRE_PACKAGES_RTL
  1817. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  1818. ifneq ($(PACKAGEDIR_RTL),)
  1819. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  1820. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  1821. else
  1822. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  1823. endif
  1824. ifdef CHECKDEPEND
  1825. $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
  1826. $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
  1827. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
  1828. endif
  1829. else
  1830. PACKAGEDIR_RTL=
  1831. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  1832. ifneq ($(UNITDIR_RTL),)
  1833. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  1834. else
  1835. UNITDIR_RTL=
  1836. endif
  1837. endif
  1838. ifdef UNITDIR_RTL
  1839. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  1840. endif
  1841. endif
  1842. ifndef NOCPUDEF
  1843. override FPCOPTDEF=$(ARCH)
  1844. endif
  1845. ifneq ($(OS_TARGET),$(OS_SOURCE))
  1846. override FPCOPT+=-T$(OS_TARGET)
  1847. endif
  1848. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  1849. override FPCOPT+=-P$(ARCH)
  1850. endif
  1851. ifeq ($(OS_SOURCE),openbsd)
  1852. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  1853. endif
  1854. ifndef CROSSBOOTSTRAP
  1855. ifneq ($(BINUTILSPREFIX),)
  1856. override FPCOPT+=-XP$(BINUTILSPREFIX)
  1857. endif
  1858. ifneq ($(BINUTILSPREFIX),)
  1859. override FPCOPT+=-Xr$(RLINKPATH)
  1860. endif
  1861. endif
  1862. ifdef UNITDIR
  1863. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  1864. endif
  1865. ifdef LIBDIR
  1866. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  1867. endif
  1868. ifdef OBJDIR
  1869. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  1870. endif
  1871. ifdef INCDIR
  1872. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  1873. endif
  1874. ifdef LINKSMART
  1875. override FPCOPT+=-XX
  1876. endif
  1877. ifdef CREATESMART
  1878. override FPCOPT+=-CX
  1879. endif
  1880. ifdef DEBUG
  1881. override FPCOPT+=-gl
  1882. override FPCOPTDEF+=DEBUG
  1883. endif
  1884. ifdef RELEASE
  1885. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  1886. ifeq ($(CPU_TARGET),i386)
  1887. FPCCPUOPT:=-OG2p3
  1888. endif
  1889. ifeq ($(CPU_TARGET),powerpc)
  1890. FPCCPUOPT:=-O1r
  1891. endif
  1892. else
  1893. FPCCPUOPT:=-O2
  1894. endif
  1895. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  1896. override FPCOPTDEF+=RELEASE
  1897. endif
  1898. ifdef STRIP
  1899. override FPCOPT+=-Xs
  1900. endif
  1901. ifdef OPTIMIZE
  1902. override FPCOPT+=-O2
  1903. endif
  1904. ifdef VERBOSE
  1905. override FPCOPT+=-vwni
  1906. endif
  1907. ifdef COMPILER_OPTIONS
  1908. override FPCOPT+=$(COMPILER_OPTIONS)
  1909. endif
  1910. ifdef COMPILER_UNITDIR
  1911. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  1912. endif
  1913. ifdef COMPILER_LIBRARYDIR
  1914. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  1915. endif
  1916. ifdef COMPILER_OBJECTDIR
  1917. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  1918. endif
  1919. ifdef COMPILER_INCLUDEDIR
  1920. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1921. endif
  1922. ifdef CROSSBINDIR
  1923. override FPCOPT+=-FD$(CROSSBINDIR)
  1924. endif
  1925. ifdef COMPILER_TARGETDIR
  1926. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1927. ifeq ($(COMPILER_TARGETDIR),.)
  1928. override TARGETDIRPREFIX=
  1929. else
  1930. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1931. endif
  1932. endif
  1933. ifdef COMPILER_UNITTARGETDIR
  1934. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1935. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1936. override UNITTARGETDIRPREFIX=
  1937. else
  1938. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1939. endif
  1940. else
  1941. ifdef COMPILER_TARGETDIR
  1942. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1943. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1944. endif
  1945. endif
  1946. ifdef CREATESHARED
  1947. override FPCOPT+=-Cg
  1948. ifeq ($(CPU_TARGET),i386)
  1949. override FPCOPT+=-Aas
  1950. endif
  1951. endif
  1952. ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
  1953. ifeq ($(OS_TARGET),linux)
  1954. ifeq ($(CPU_TARGET),x86_64)
  1955. override FPCOPT+=-Cg
  1956. endif
  1957. endif
  1958. endif
  1959. ifdef LINKSHARED
  1960. endif
  1961. ifdef GCCLIBDIR
  1962. override FPCOPT+=-Fl$(GCCLIBDIR)
  1963. endif
  1964. ifdef OTHERLIBDIR
  1965. override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
  1966. endif
  1967. ifdef OPT
  1968. override FPCOPT+=$(OPT)
  1969. endif
  1970. ifdef FPCOPTDEF
  1971. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1972. endif
  1973. ifdef CFGFILE
  1974. override FPCOPT+=@$(CFGFILE)
  1975. endif
  1976. ifdef USEENV
  1977. override FPCEXTCMD:=$(FPCOPT)
  1978. override FPCOPT:=!FPCEXTCMD
  1979. export FPCEXTCMD
  1980. endif
  1981. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  1982. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  1983. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  1984. override ACROSSCOMPILE=1
  1985. endif
  1986. ifdef ACROSSCOMPILE
  1987. override FPCOPT+=$(CROSSOPT)
  1988. endif
  1989. override COMPILER:=$(FPC) $(FPCOPT)
  1990. ifeq (,$(findstring -s ,$(COMPILER)))
  1991. EXECPPAS=
  1992. else
  1993. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1994. ifdef RUNBATCH
  1995. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  1996. else
  1997. EXECPPAS:=@$(PPAS)
  1998. endif
  1999. endif
  2000. endif
  2001. .PHONY: fpc_units
  2002. ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
  2003. override ALLTARGET+=fpc_units
  2004. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  2005. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  2006. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  2007. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  2008. endif
  2009. fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
  2010. ifdef TARGET_RSTS
  2011. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  2012. override CLEANRSTFILES+=$(RSTFILES)
  2013. endif
  2014. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  2015. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  2016. @$(ECHOREDIR) Compiled > $(FPCMADE)
  2017. fpc_all: $(FPCMADE)
  2018. fpc_smart:
  2019. $(MAKE) all LINKSMART=1 CREATESMART=1
  2020. fpc_debug:
  2021. $(MAKE) all DEBUG=1
  2022. fpc_release:
  2023. $(MAKE) all RELEASE=1
  2024. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
  2025. $(COMPILER_UNITTARGETDIR):
  2026. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  2027. $(COMPILER_TARGETDIR):
  2028. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  2029. %$(PPUEXT): %.pp
  2030. $(COMPILER) $<
  2031. $(EXECPPAS)
  2032. %$(PPUEXT): %.pas
  2033. $(COMPILER) $<
  2034. $(EXECPPAS)
  2035. %$(EXEEXT): %.pp
  2036. $(COMPILER) $<
  2037. $(EXECPPAS)
  2038. %$(EXEEXT): %.pas
  2039. $(COMPILER) $<
  2040. $(EXECPPAS)
  2041. %$(EXEEXT): %.lpr
  2042. $(COMPILER) $<
  2043. $(EXECPPAS)
  2044. %$(EXEEXT): %.dpr
  2045. $(COMPILER) $<
  2046. $(EXECPPAS)
  2047. %.res: %.rc
  2048. windres -i $< -o $@
  2049. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2050. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2051. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2052. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2053. vpath %.inc $(COMPILER_INCLUDEDIR)
  2054. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  2055. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  2056. .PHONY: fpc_shared
  2057. override INSTALLTARGET+=fpc_shared_install
  2058. ifndef SHARED_LIBVERSION
  2059. SHARED_LIBVERSION=$(FPC_VERSION)
  2060. endif
  2061. ifndef SHARED_LIBNAME
  2062. SHARED_LIBNAME=$(PACKAGE_NAME)
  2063. endif
  2064. ifndef SHARED_FULLNAME
  2065. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  2066. endif
  2067. ifndef SHARED_LIBUNITS
  2068. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  2069. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  2070. endif
  2071. fpc_shared:
  2072. ifdef HASSHAREDLIB
  2073. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  2074. ifneq ($(SHARED_BUILD),n)
  2075. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  2076. endif
  2077. else
  2078. @$(ECHO) Shared Libraries not supported
  2079. endif
  2080. fpc_shared_install:
  2081. ifneq ($(SHARED_BUILD),n)
  2082. ifneq ($(SHARED_LIBUNITS),)
  2083. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  2084. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  2085. endif
  2086. endif
  2087. endif
  2088. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  2089. ifdef INSTALL_UNITS
  2090. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  2091. endif
  2092. ifdef INSTALL_BUILDUNIT
  2093. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  2094. endif
  2095. ifdef INSTALLPPUFILES
  2096. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  2097. ifneq ($(UNITTARGETDIRPREFIX),)
  2098. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
  2099. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
  2100. endif
  2101. override INSTALL_CREATEPACKAGEFPC=1
  2102. endif
  2103. ifdef INSTALLEXEFILES
  2104. ifneq ($(TARGETDIRPREFIX),)
  2105. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  2106. endif
  2107. endif
  2108. fpc_install: all $(INSTALLTARGET)
  2109. ifdef INSTALLEXEFILES
  2110. $(MKDIR) $(INSTALL_BINDIR)
  2111. ifdef UPXPROG
  2112. -$(UPXPROG) $(INSTALLEXEFILES)
  2113. endif
  2114. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  2115. endif
  2116. ifdef INSTALL_CREATEPACKAGEFPC
  2117. ifdef FPCMAKE
  2118. ifdef PACKAGE_VERSION
  2119. ifneq ($(wildcard Makefile.fpc),)
  2120. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  2121. $(MKDIR) $(INSTALL_UNITDIR)
  2122. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  2123. endif
  2124. endif
  2125. endif
  2126. endif
  2127. ifdef INSTALLPPUFILES
  2128. $(MKDIR) $(INSTALL_UNITDIR)
  2129. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  2130. ifneq ($(INSTALLPPULINKFILES),)
  2131. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  2132. endif
  2133. ifneq ($(wildcard $(LIB_FULLNAME)),)
  2134. $(MKDIR) $(INSTALL_LIBDIR)
  2135. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  2136. ifdef inUnix
  2137. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  2138. endif
  2139. endif
  2140. endif
  2141. ifdef INSTALL_FILES
  2142. $(MKDIR) $(INSTALL_DATADIR)
  2143. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  2144. endif
  2145. fpc_sourceinstall: distclean
  2146. $(MKDIR) $(INSTALL_SOURCEDIR)
  2147. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  2148. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  2149. ifdef HASEXAMPLES
  2150. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  2151. endif
  2152. ifdef EXAMPLESOURCEFILES
  2153. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  2154. endif
  2155. ifdef TARGET_EXAMPLEDIRS
  2156. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  2157. endif
  2158. .PHONY: fpc_distinstall
  2159. fpc_distinstall: install exampleinstall
  2160. .PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
  2161. ifndef PACKDIR
  2162. ifndef inUnix
  2163. PACKDIR=$(BASEDIR)/../fpc-pack
  2164. else
  2165. PACKDIR=/tmp/fpc-pack
  2166. endif
  2167. endif
  2168. ifndef ZIPNAME
  2169. ifdef DIST_ZIPNAME
  2170. ZIPNAME=$(DIST_ZIPNAME)
  2171. else
  2172. ZIPNAME=$(PACKAGE_NAME)
  2173. endif
  2174. endif
  2175. ifndef FULLZIPNAME
  2176. FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)
  2177. endif
  2178. ifndef ZIPTARGET
  2179. ifdef DIST_ZIPTARGET
  2180. ZIPTARGET=DIST_ZIPTARGET
  2181. else
  2182. ZIPTARGET=install
  2183. endif
  2184. endif
  2185. ifndef USEZIP
  2186. ifdef inUnix
  2187. USETAR=1
  2188. endif
  2189. endif
  2190. ifndef inUnix
  2191. USEZIPWRAPPER=1
  2192. endif
  2193. ifdef USEZIPWRAPPER
  2194. ZIPPATHSEP=$(PATHSEP)
  2195. ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))
  2196. else
  2197. ZIPPATHSEP=/
  2198. endif
  2199. ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
  2200. ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
  2201. ifdef USETAR
  2202. ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
  2203. ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *
  2204. else
  2205. ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
  2206. ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
  2207. endif
  2208. fpc_zipinstall:
  2209. $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
  2210. $(MKDIR) $(DIST_DESTDIR)
  2211. $(DEL) $(ZIPDESTFILE)
  2212. ifdef USEZIPWRAPPER
  2213. ifneq ($(ECHOREDIR),echo)
  2214. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
  2215. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
  2216. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
  2217. else
  2218. echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
  2219. echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
  2220. echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
  2221. endif
  2222. ifdef inUnix
  2223. /bin/sh $(ZIPWRAPPER)
  2224. else
  2225. ifdef RUNBATCH
  2226. $(RUNBATCH) $(ZIPWRAPPER)
  2227. else
  2228. $(ZIPWRAPPER)
  2229. endif
  2230. endif
  2231. $(DEL) $(ZIPWRAPPER)
  2232. else
  2233. $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
  2234. endif
  2235. $(DELTREE) $(PACKDIR)
  2236. fpc_zipsourceinstall:
  2237. $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX)
  2238. fpc_zipexampleinstall:
  2239. ifdef HASEXAMPLES
  2240. $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX)
  2241. endif
  2242. fpc_zipdistinstall:
  2243. $(MAKE) fpc_zipinstall ZIPTARGET=distinstall
  2244. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  2245. ifdef EXEFILES
  2246. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  2247. endif
  2248. ifdef CLEAN_PROGRAMS
  2249. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  2250. endif
  2251. ifdef CLEAN_UNITS
  2252. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  2253. endif
  2254. ifdef CLEANPPUFILES
  2255. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  2256. ifdef DEBUGSYMEXT
  2257. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  2258. endif
  2259. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  2260. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  2261. endif
  2262. fpc_clean: $(CLEANTARGET)
  2263. ifdef CLEANEXEFILES
  2264. -$(DEL) $(CLEANEXEFILES)
  2265. endif
  2266. ifdef CLEANPPUFILES
  2267. -$(DEL) $(CLEANPPUFILES)
  2268. endif
  2269. ifneq ($(CLEANPPULINKFILES),)
  2270. -$(DEL) $(CLEANPPULINKFILES)
  2271. endif
  2272. ifdef CLEANRSTFILES
  2273. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  2274. endif
  2275. ifdef CLEAN_FILES
  2276. -$(DEL) $(CLEAN_FILES)
  2277. endif
  2278. ifdef LIB_NAME
  2279. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  2280. endif
  2281. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  2282. -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
  2283. fpc_cleanall: $(CLEANTARGET)
  2284. ifdef CLEANEXEFILES
  2285. -$(DEL) $(CLEANEXEFILES)
  2286. endif
  2287. ifdef COMPILER_UNITTARGETDIR
  2288. ifdef CLEANPPUFILES
  2289. -$(DEL) $(CLEANPPUFILES)
  2290. endif
  2291. ifneq ($(CLEANPPULINKFILES),)
  2292. -$(DEL) $(CLEANPPULINKFILES)
  2293. endif
  2294. ifdef CLEANRSTFILES
  2295. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  2296. endif
  2297. endif
  2298. ifdef CLEAN_FILES
  2299. -$(DEL) $(CLEAN_FILES)
  2300. endif
  2301. -$(DELTREE) units
  2302. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  2303. ifneq ($(PPUEXT),.ppu)
  2304. -$(DEL) *.o *.ppu *.a
  2305. endif
  2306. -$(DELTREE) *$(SMARTEXT)
  2307. -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  2308. -$(DEL) *_ppas$(BATCHEXT)
  2309. ifdef AOUTEXT
  2310. -$(DEL) *$(AOUTEXT)
  2311. endif
  2312. ifdef DEBUGSYMEXT
  2313. -$(DEL) *$(DEBUGSYMEXT)
  2314. endif
  2315. fpc_distclean: cleanall
  2316. .PHONY: fpc_baseinfo
  2317. override INFORULES+=fpc_baseinfo
  2318. fpc_baseinfo:
  2319. @$(ECHO)
  2320. @$(ECHO) == Package info ==
  2321. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  2322. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  2323. @$(ECHO)
  2324. @$(ECHO) == Configuration info ==
  2325. @$(ECHO)
  2326. @$(ECHO) FPC.......... $(FPC)
  2327. @$(ECHO) FPC Version.. $(FPC_VERSION)
  2328. @$(ECHO) Source CPU... $(CPU_SOURCE)
  2329. @$(ECHO) Target CPU... $(CPU_TARGET)
  2330. @$(ECHO) Source OS.... $(OS_SOURCE)
  2331. @$(ECHO) Target OS.... $(OS_TARGET)
  2332. @$(ECHO) Full Source.. $(FULL_SOURCE)
  2333. @$(ECHO) Full Target.. $(FULL_TARGET)
  2334. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  2335. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  2336. @$(ECHO)
  2337. @$(ECHO) == Directory info ==
  2338. @$(ECHO)
  2339. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  2340. @$(ECHO)
  2341. @$(ECHO) Basedir......... $(BASEDIR)
  2342. @$(ECHO) FPCDir.......... $(FPCDIR)
  2343. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  2344. @$(ECHO) UnitsDir........ $(UNITSDIR)
  2345. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  2346. @$(ECHO)
  2347. @$(ECHO) GCC library..... $(GCCLIBDIR)
  2348. @$(ECHO) Other library... $(OTHERLIBDIR)
  2349. @$(ECHO)
  2350. @$(ECHO) == Tools info ==
  2351. @$(ECHO)
  2352. @$(ECHO) As........ $(AS)
  2353. @$(ECHO) Ld........ $(LD)
  2354. @$(ECHO) Ar........ $(AR)
  2355. @$(ECHO) Rc........ $(RC)
  2356. @$(ECHO)
  2357. @$(ECHO) Mv........ $(MVPROG)
  2358. @$(ECHO) Cp........ $(CPPROG)
  2359. @$(ECHO) Rm........ $(RMPROG)
  2360. @$(ECHO) GInstall.. $(GINSTALL)
  2361. @$(ECHO) Echo...... $(ECHO)
  2362. @$(ECHO) Shell..... $(SHELL)
  2363. @$(ECHO) Date...... $(DATE)
  2364. @$(ECHO) FPCMake... $(FPCMAKE)
  2365. @$(ECHO) PPUMove... $(PPUMOVE)
  2366. @$(ECHO) Upx....... $(UPXPROG)
  2367. @$(ECHO) Zip....... $(ZIPPROG)
  2368. @$(ECHO)
  2369. @$(ECHO) == Object info ==
  2370. @$(ECHO)
  2371. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  2372. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  2373. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  2374. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  2375. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  2376. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  2377. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  2378. @$(ECHO)
  2379. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  2380. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  2381. @$(ECHO)
  2382. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  2383. @$(ECHO) Install Files....... $(INSTALL_FILES)
  2384. @$(ECHO)
  2385. @$(ECHO) == Install info ==
  2386. @$(ECHO)
  2387. @$(ECHO) DateStr.............. $(DATESTR)
  2388. @$(ECHO) ZipName.............. $(ZIPNAME)
  2389. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  2390. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  2391. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  2392. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  2393. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  2394. @$(ECHO)
  2395. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  2396. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  2397. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  2398. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  2399. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  2400. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  2401. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  2402. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  2403. @$(ECHO)
  2404. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  2405. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  2406. @$(ECHO)
  2407. .PHONY: fpc_info
  2408. fpc_info: $(INFORULES)
  2409. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  2410. fpc_makefile_dirs
  2411. fpc_makefile:
  2412. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  2413. fpc_makefile_sub1:
  2414. ifdef TARGET_DIRS
  2415. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  2416. endif
  2417. ifdef TARGET_EXAMPLEDIRS
  2418. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  2419. endif
  2420. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  2421. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  2422. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  2423. all: fpc_all
  2424. debug: fpc_debug
  2425. smart: fpc_smart
  2426. release: fpc_release
  2427. units: fpc_units
  2428. examples:
  2429. shared: fpc_shared
  2430. install: fpc_install
  2431. sourceinstall: fpc_sourceinstall
  2432. exampleinstall: fpc_exampleinstall
  2433. distinstall: fpc_distinstall
  2434. zipinstall: fpc_zipinstall
  2435. zipsourceinstall: fpc_zipsourceinstall
  2436. zipexampleinstall: fpc_zipexampleinstall
  2437. zipdistinstall: fpc_zipdistinstall
  2438. clean: fpc_clean
  2439. distclean: fpc_distclean
  2440. cleanall: fpc_cleanall
  2441. info: fpc_info
  2442. makefiles: fpc_makefiles
  2443. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  2444. ifneq ($(wildcard fpcmake.loc),)
  2445. include fpcmake.loc
  2446. endif
  2447. .NOTPARALLEL: