Makefile 62 KB

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