Makefile 56 KB

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