Makefile 97 KB

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