Makefile 82 KB

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