Makefile 58 KB

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