Makefile 66 KB

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