Makefile 92 KB

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