Makefile 72 KB

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