Makefile 66 KB

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