Makefile 59 KB

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