Makefile 124 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709
  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 arm-freertos 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-win64 aarch64-android wasm-wasm sparc64-linux riscv32-linux riscv32-embedded riscv64-linux riscv64-embedded xtensa-linux xtensa-embedded xtensa-freertos z80-embedded z80-zxspectrum z80-msxdos
  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=nds
  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. ifeq ($(FULL_TARGET),xtensa-embedded)
  202. ifeq ($(SUBARCH),)
  203. $(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
  204. endif
  205. override FPCOPT+=-Cp$(SUBARCH)
  206. endif
  207. ifeq ($(FULL_TARGET),xtensa-freertos)
  208. ifeq ($(SUBARCH),)
  209. $(error When compiling for xtensa-freertos, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
  210. endif
  211. override FPCOPT+=-Cp$(SUBARCH)
  212. endif
  213. ifeq ($(FULL_TARGET),arm-freertos)
  214. ifeq ($(SUBARCH),)
  215. $(error When compiling for arm-freertos, a sub-architecture (e.g. SUBARCH=armv6m or SUBARCH=armv7em) must be defined)
  216. endif
  217. override FPCOPT+=-Cp$(SUBARCH)
  218. endif
  219. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  220. TARGETSUFFIX=$(OS_TARGET)
  221. SOURCESUFFIX=$(OS_SOURCE)
  222. else
  223. ifneq ($(findstring $(OS_TARGET),$(LIMIT83fs)),)
  224. TARGETSUFFIX=$(OS_TARGET)
  225. else
  226. TARGETSUFFIX=$(FULL_TARGET)
  227. endif
  228. SOURCESUFFIX=$(FULL_SOURCE)
  229. endif
  230. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  231. CROSSCOMPILE=1
  232. endif
  233. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  234. ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
  235. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  236. endif
  237. endif
  238. ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
  239. BSDhier=1
  240. endif
  241. ifeq ($(OS_TARGET),linux)
  242. linuxHier=1
  243. endif
  244. ifndef CROSSCOMPILE
  245. BUILDFULLNATIVE=1
  246. export BUILDFULLNATIVE
  247. endif
  248. ifdef BUILDFULLNATIVE
  249. BUILDNATIVE=1
  250. export BUILDNATIVE
  251. endif
  252. export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
  253. ifdef FPCDIR
  254. override FPCDIR:=$(subst \,/,$(FPCDIR))
  255. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  256. override FPCDIR=wrong
  257. endif
  258. else
  259. override FPCDIR=wrong
  260. endif
  261. ifdef DEFAULT_FPCDIR
  262. ifeq ($(FPCDIR),wrong)
  263. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  264. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  265. override FPCDIR=wrong
  266. endif
  267. endif
  268. endif
  269. ifeq ($(FPCDIR),wrong)
  270. ifdef inUnix
  271. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  272. ifeq ($(wildcard $(FPCDIR)/units),)
  273. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  274. endif
  275. else
  276. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  277. override FPCDIR:=$(FPCDIR)/..
  278. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  279. override FPCDIR:=$(FPCDIR)/..
  280. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  281. override FPCDIR:=$(BASEDIR)
  282. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  283. override FPCDIR=c:/pp
  284. endif
  285. endif
  286. endif
  287. endif
  288. endif
  289. ifndef CROSSBINDIR
  290. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  291. endif
  292. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  293. ifeq ($(OS_SOURCE),darwin)
  294. DARWIN2DARWIN=1
  295. endif
  296. endif
  297. ifndef BINUTILSPREFIX
  298. ifndef CROSSBINDIR
  299. ifdef CROSSCOMPILE
  300. ifneq ($(OS_TARGET),msdos)
  301. ifndef DARWIN2DARWIN
  302. ifneq ($(CPU_TARGET),jvm)
  303. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  304. ifeq ($(OS_TARGET),android)
  305. ifeq ($(CPU_TARGET),arm)
  306. BINUTILSPREFIX=arm-linux-androideabi-
  307. else
  308. ifeq ($(CPU_TARGET),i386)
  309. BINUTILSPREFIX=i686-linux-android-
  310. else
  311. BINUTILSPREFIX=$(CPU_TARGET)-linux-android-
  312. endif
  313. endif
  314. endif
  315. endif
  316. endif
  317. else
  318. BINUTILSPREFIX=$(OS_TARGET)-
  319. endif
  320. endif
  321. endif
  322. endif
  323. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  324. ifeq ($(UNITSDIR),)
  325. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  326. endif
  327. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
  328. ifndef FPCFPMAKE
  329. ifdef CROSSCOMPILE
  330. ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
  331. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  332. ifneq ($(FPCPROG),)
  333. FPCPROG:=$(firstword $(FPCPROG))
  334. FPCFPMAKE:=$(shell $(FPCPROG) -PB)
  335. ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
  336. FPCFPMAKE:=$(firstword $(FPCPROG))
  337. endif
  338. else
  339. override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  340. endif
  341. else
  342. FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
  343. FPMAKE_SKIP_CONFIG=-n
  344. export FPCFPMAKE
  345. export FPMAKE_SKIP_CONFIG
  346. endif
  347. else
  348. FPMAKE_SKIP_CONFIG=-n
  349. FPCFPMAKE=$(FPC)
  350. endif
  351. endif
  352. BIN = bin
  353. BUILD = build
  354. DATA = data
  355. FILESYSTEM = filesystem
  356. GFX = gfx
  357. INC = inc
  358. AUDIO_FILES = $(foreach dir, $(notdir $(wildcard audio/*.*)), $(CURDIR)/audio/$(dir))
  359. GFX_FILES = $(foreach dir, $(GFX), $(notdir $(wildcard $(dir)/*.bmp $(dir)/*.png)))
  360. BIN_FILES = $(foreach dir, $(DATA), $(notdir $(wildcard $(dir)/*)))
  361. GBFS_FILES = $(foreach dir, GBFS, $(notdir $(wildcard $(dir)/*)))
  362. ifeq ($(FULL_TARGET),i386-linux)
  363. override TARGET_PROGRAMS+=AnsiConsole
  364. endif
  365. ifeq ($(FULL_TARGET),i386-go32v2)
  366. override TARGET_PROGRAMS+=AnsiConsole
  367. endif
  368. ifeq ($(FULL_TARGET),i386-win32)
  369. override TARGET_PROGRAMS+=AnsiConsole
  370. endif
  371. ifeq ($(FULL_TARGET),i386-os2)
  372. override TARGET_PROGRAMS+=AnsiConsole
  373. endif
  374. ifeq ($(FULL_TARGET),i386-freebsd)
  375. override TARGET_PROGRAMS+=AnsiConsole
  376. endif
  377. ifeq ($(FULL_TARGET),i386-beos)
  378. override TARGET_PROGRAMS+=AnsiConsole
  379. endif
  380. ifeq ($(FULL_TARGET),i386-haiku)
  381. override TARGET_PROGRAMS+=AnsiConsole
  382. endif
  383. ifeq ($(FULL_TARGET),i386-netbsd)
  384. override TARGET_PROGRAMS+=AnsiConsole
  385. endif
  386. ifeq ($(FULL_TARGET),i386-solaris)
  387. override TARGET_PROGRAMS+=AnsiConsole
  388. endif
  389. ifeq ($(FULL_TARGET),i386-netware)
  390. override TARGET_PROGRAMS+=AnsiConsole
  391. endif
  392. ifeq ($(FULL_TARGET),i386-openbsd)
  393. override TARGET_PROGRAMS+=AnsiConsole
  394. endif
  395. ifeq ($(FULL_TARGET),i386-wdosx)
  396. override TARGET_PROGRAMS+=AnsiConsole
  397. endif
  398. ifeq ($(FULL_TARGET),i386-darwin)
  399. override TARGET_PROGRAMS+=AnsiConsole
  400. endif
  401. ifeq ($(FULL_TARGET),i386-emx)
  402. override TARGET_PROGRAMS+=AnsiConsole
  403. endif
  404. ifeq ($(FULL_TARGET),i386-watcom)
  405. override TARGET_PROGRAMS+=AnsiConsole
  406. endif
  407. ifeq ($(FULL_TARGET),i386-netwlibc)
  408. override TARGET_PROGRAMS+=AnsiConsole
  409. endif
  410. ifeq ($(FULL_TARGET),i386-wince)
  411. override TARGET_PROGRAMS+=AnsiConsole
  412. endif
  413. ifeq ($(FULL_TARGET),i386-embedded)
  414. override TARGET_PROGRAMS+=AnsiConsole
  415. endif
  416. ifeq ($(FULL_TARGET),i386-symbian)
  417. override TARGET_PROGRAMS+=AnsiConsole
  418. endif
  419. ifeq ($(FULL_TARGET),i386-nativent)
  420. override TARGET_PROGRAMS+=AnsiConsole
  421. endif
  422. ifeq ($(FULL_TARGET),i386-iphonesim)
  423. override TARGET_PROGRAMS+=AnsiConsole
  424. endif
  425. ifeq ($(FULL_TARGET),i386-android)
  426. override TARGET_PROGRAMS+=AnsiConsole
  427. endif
  428. ifeq ($(FULL_TARGET),i386-aros)
  429. override TARGET_PROGRAMS+=AnsiConsole
  430. endif
  431. ifeq ($(FULL_TARGET),m68k-linux)
  432. override TARGET_PROGRAMS+=AnsiConsole
  433. endif
  434. ifeq ($(FULL_TARGET),m68k-netbsd)
  435. override TARGET_PROGRAMS+=AnsiConsole
  436. endif
  437. ifeq ($(FULL_TARGET),m68k-amiga)
  438. override TARGET_PROGRAMS+=AnsiConsole
  439. endif
  440. ifeq ($(FULL_TARGET),m68k-atari)
  441. override TARGET_PROGRAMS+=AnsiConsole
  442. endif
  443. ifeq ($(FULL_TARGET),m68k-palmos)
  444. override TARGET_PROGRAMS+=AnsiConsole
  445. endif
  446. ifeq ($(FULL_TARGET),m68k-macos)
  447. override TARGET_PROGRAMS+=AnsiConsole
  448. endif
  449. ifeq ($(FULL_TARGET),m68k-embedded)
  450. override TARGET_PROGRAMS+=AnsiConsole
  451. endif
  452. ifeq ($(FULL_TARGET),powerpc-linux)
  453. override TARGET_PROGRAMS+=AnsiConsole
  454. endif
  455. ifeq ($(FULL_TARGET),powerpc-netbsd)
  456. override TARGET_PROGRAMS+=AnsiConsole
  457. endif
  458. ifeq ($(FULL_TARGET),powerpc-amiga)
  459. override TARGET_PROGRAMS+=AnsiConsole
  460. endif
  461. ifeq ($(FULL_TARGET),powerpc-macos)
  462. override TARGET_PROGRAMS+=AnsiConsole
  463. endif
  464. ifeq ($(FULL_TARGET),powerpc-darwin)
  465. override TARGET_PROGRAMS+=AnsiConsole
  466. endif
  467. ifeq ($(FULL_TARGET),powerpc-morphos)
  468. override TARGET_PROGRAMS+=AnsiConsole
  469. endif
  470. ifeq ($(FULL_TARGET),powerpc-embedded)
  471. override TARGET_PROGRAMS+=AnsiConsole
  472. endif
  473. ifeq ($(FULL_TARGET),powerpc-wii)
  474. override TARGET_PROGRAMS+=AnsiConsole
  475. endif
  476. ifeq ($(FULL_TARGET),powerpc-aix)
  477. override TARGET_PROGRAMS+=AnsiConsole
  478. endif
  479. ifeq ($(FULL_TARGET),sparc-linux)
  480. override TARGET_PROGRAMS+=AnsiConsole
  481. endif
  482. ifeq ($(FULL_TARGET),sparc-netbsd)
  483. override TARGET_PROGRAMS+=AnsiConsole
  484. endif
  485. ifeq ($(FULL_TARGET),sparc-solaris)
  486. override TARGET_PROGRAMS+=AnsiConsole
  487. endif
  488. ifeq ($(FULL_TARGET),sparc-embedded)
  489. override TARGET_PROGRAMS+=AnsiConsole
  490. endif
  491. ifeq ($(FULL_TARGET),x86_64-linux)
  492. override TARGET_PROGRAMS+=AnsiConsole
  493. endif
  494. ifeq ($(FULL_TARGET),x86_64-freebsd)
  495. override TARGET_PROGRAMS+=AnsiConsole
  496. endif
  497. ifeq ($(FULL_TARGET),x86_64-haiku)
  498. override TARGET_PROGRAMS+=AnsiConsole
  499. endif
  500. ifeq ($(FULL_TARGET),x86_64-netbsd)
  501. override TARGET_PROGRAMS+=AnsiConsole
  502. endif
  503. ifeq ($(FULL_TARGET),x86_64-solaris)
  504. override TARGET_PROGRAMS+=AnsiConsole
  505. endif
  506. ifeq ($(FULL_TARGET),x86_64-openbsd)
  507. override TARGET_PROGRAMS+=AnsiConsole
  508. endif
  509. ifeq ($(FULL_TARGET),x86_64-darwin)
  510. override TARGET_PROGRAMS+=AnsiConsole
  511. endif
  512. ifeq ($(FULL_TARGET),x86_64-win64)
  513. override TARGET_PROGRAMS+=AnsiConsole
  514. endif
  515. ifeq ($(FULL_TARGET),x86_64-embedded)
  516. override TARGET_PROGRAMS+=AnsiConsole
  517. endif
  518. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  519. override TARGET_PROGRAMS+=AnsiConsole
  520. endif
  521. ifeq ($(FULL_TARGET),x86_64-android)
  522. override TARGET_PROGRAMS+=AnsiConsole
  523. endif
  524. ifeq ($(FULL_TARGET),x86_64-aros)
  525. override TARGET_PROGRAMS+=AnsiConsole
  526. endif
  527. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  528. override TARGET_PROGRAMS+=AnsiConsole
  529. endif
  530. ifeq ($(FULL_TARGET),arm-linux)
  531. override TARGET_PROGRAMS+=AnsiConsole
  532. endif
  533. ifeq ($(FULL_TARGET),arm-netbsd)
  534. override TARGET_PROGRAMS+=AnsiConsole
  535. endif
  536. ifeq ($(FULL_TARGET),arm-palmos)
  537. override TARGET_PROGRAMS+=AnsiConsole
  538. endif
  539. ifeq ($(FULL_TARGET),arm-darwin)
  540. override TARGET_PROGRAMS+=AnsiConsole
  541. endif
  542. ifeq ($(FULL_TARGET),arm-wince)
  543. override TARGET_PROGRAMS+=AnsiConsole
  544. endif
  545. ifeq ($(FULL_TARGET),arm-gba)
  546. override TARGET_PROGRAMS+=AnsiConsole
  547. endif
  548. ifeq ($(FULL_TARGET),arm-nds)
  549. override TARGET_PROGRAMS+=AnsiConsole
  550. endif
  551. ifeq ($(FULL_TARGET),arm-embedded)
  552. override TARGET_PROGRAMS+=AnsiConsole
  553. endif
  554. ifeq ($(FULL_TARGET),arm-symbian)
  555. override TARGET_PROGRAMS+=AnsiConsole
  556. endif
  557. ifeq ($(FULL_TARGET),arm-android)
  558. override TARGET_PROGRAMS+=AnsiConsole
  559. endif
  560. ifeq ($(FULL_TARGET),arm-aros)
  561. override TARGET_PROGRAMS+=AnsiConsole
  562. endif
  563. ifeq ($(FULL_TARGET),arm-freertos)
  564. override TARGET_PROGRAMS+=AnsiConsole
  565. endif
  566. ifeq ($(FULL_TARGET),powerpc64-linux)
  567. override TARGET_PROGRAMS+=AnsiConsole
  568. endif
  569. ifeq ($(FULL_TARGET),powerpc64-darwin)
  570. override TARGET_PROGRAMS+=AnsiConsole
  571. endif
  572. ifeq ($(FULL_TARGET),powerpc64-embedded)
  573. override TARGET_PROGRAMS+=AnsiConsole
  574. endif
  575. ifeq ($(FULL_TARGET),powerpc64-aix)
  576. override TARGET_PROGRAMS+=AnsiConsole
  577. endif
  578. ifeq ($(FULL_TARGET),avr-embedded)
  579. override TARGET_PROGRAMS+=AnsiConsole
  580. endif
  581. ifeq ($(FULL_TARGET),armeb-linux)
  582. override TARGET_PROGRAMS+=AnsiConsole
  583. endif
  584. ifeq ($(FULL_TARGET),armeb-embedded)
  585. override TARGET_PROGRAMS+=AnsiConsole
  586. endif
  587. ifeq ($(FULL_TARGET),mips-linux)
  588. override TARGET_PROGRAMS+=AnsiConsole
  589. endif
  590. ifeq ($(FULL_TARGET),mipsel-linux)
  591. override TARGET_PROGRAMS+=AnsiConsole
  592. endif
  593. ifeq ($(FULL_TARGET),mipsel-embedded)
  594. override TARGET_PROGRAMS+=AnsiConsole
  595. endif
  596. ifeq ($(FULL_TARGET),mipsel-android)
  597. override TARGET_PROGRAMS+=AnsiConsole
  598. endif
  599. ifeq ($(FULL_TARGET),jvm-java)
  600. override TARGET_PROGRAMS+=AnsiConsole
  601. endif
  602. ifeq ($(FULL_TARGET),jvm-android)
  603. override TARGET_PROGRAMS+=AnsiConsole
  604. endif
  605. ifeq ($(FULL_TARGET),i8086-embedded)
  606. override TARGET_PROGRAMS+=AnsiConsole
  607. endif
  608. ifeq ($(FULL_TARGET),i8086-msdos)
  609. override TARGET_PROGRAMS+=AnsiConsole
  610. endif
  611. ifeq ($(FULL_TARGET),i8086-win16)
  612. override TARGET_PROGRAMS+=AnsiConsole
  613. endif
  614. ifeq ($(FULL_TARGET),aarch64-linux)
  615. override TARGET_PROGRAMS+=AnsiConsole
  616. endif
  617. ifeq ($(FULL_TARGET),aarch64-darwin)
  618. override TARGET_PROGRAMS+=AnsiConsole
  619. endif
  620. ifeq ($(FULL_TARGET),aarch64-win64)
  621. override TARGET_PROGRAMS+=AnsiConsole
  622. endif
  623. ifeq ($(FULL_TARGET),aarch64-android)
  624. override TARGET_PROGRAMS+=AnsiConsole
  625. endif
  626. ifeq ($(FULL_TARGET),wasm-wasm)
  627. override TARGET_PROGRAMS+=AnsiConsole
  628. endif
  629. ifeq ($(FULL_TARGET),sparc64-linux)
  630. override TARGET_PROGRAMS+=AnsiConsole
  631. endif
  632. ifeq ($(FULL_TARGET),riscv32-linux)
  633. override TARGET_PROGRAMS+=AnsiConsole
  634. endif
  635. ifeq ($(FULL_TARGET),riscv32-embedded)
  636. override TARGET_PROGRAMS+=AnsiConsole
  637. endif
  638. ifeq ($(FULL_TARGET),riscv64-linux)
  639. override TARGET_PROGRAMS+=AnsiConsole
  640. endif
  641. ifeq ($(FULL_TARGET),riscv64-embedded)
  642. override TARGET_PROGRAMS+=AnsiConsole
  643. endif
  644. ifeq ($(FULL_TARGET),xtensa-linux)
  645. override TARGET_PROGRAMS+=AnsiConsole
  646. endif
  647. ifeq ($(FULL_TARGET),xtensa-embedded)
  648. override TARGET_PROGRAMS+=AnsiConsole
  649. endif
  650. ifeq ($(FULL_TARGET),xtensa-freertos)
  651. override TARGET_PROGRAMS+=AnsiConsole
  652. endif
  653. ifeq ($(FULL_TARGET),z80-embedded)
  654. override TARGET_PROGRAMS+=AnsiConsole
  655. endif
  656. ifeq ($(FULL_TARGET),z80-zxspectrum)
  657. override TARGET_PROGRAMS+=AnsiConsole
  658. endif
  659. ifeq ($(FULL_TARGET),z80-msxdos)
  660. override TARGET_PROGRAMS+=AnsiConsole
  661. endif
  662. ifeq ($(FULL_TARGET),i386-linux)
  663. override CLEAN_UNITS+=*
  664. endif
  665. ifeq ($(FULL_TARGET),i386-go32v2)
  666. override CLEAN_UNITS+=*
  667. endif
  668. ifeq ($(FULL_TARGET),i386-win32)
  669. override CLEAN_UNITS+=*
  670. endif
  671. ifeq ($(FULL_TARGET),i386-os2)
  672. override CLEAN_UNITS+=*
  673. endif
  674. ifeq ($(FULL_TARGET),i386-freebsd)
  675. override CLEAN_UNITS+=*
  676. endif
  677. ifeq ($(FULL_TARGET),i386-beos)
  678. override CLEAN_UNITS+=*
  679. endif
  680. ifeq ($(FULL_TARGET),i386-haiku)
  681. override CLEAN_UNITS+=*
  682. endif
  683. ifeq ($(FULL_TARGET),i386-netbsd)
  684. override CLEAN_UNITS+=*
  685. endif
  686. ifeq ($(FULL_TARGET),i386-solaris)
  687. override CLEAN_UNITS+=*
  688. endif
  689. ifeq ($(FULL_TARGET),i386-netware)
  690. override CLEAN_UNITS+=*
  691. endif
  692. ifeq ($(FULL_TARGET),i386-openbsd)
  693. override CLEAN_UNITS+=*
  694. endif
  695. ifeq ($(FULL_TARGET),i386-wdosx)
  696. override CLEAN_UNITS+=*
  697. endif
  698. ifeq ($(FULL_TARGET),i386-darwin)
  699. override CLEAN_UNITS+=*
  700. endif
  701. ifeq ($(FULL_TARGET),i386-emx)
  702. override CLEAN_UNITS+=*
  703. endif
  704. ifeq ($(FULL_TARGET),i386-watcom)
  705. override CLEAN_UNITS+=*
  706. endif
  707. ifeq ($(FULL_TARGET),i386-netwlibc)
  708. override CLEAN_UNITS+=*
  709. endif
  710. ifeq ($(FULL_TARGET),i386-wince)
  711. override CLEAN_UNITS+=*
  712. endif
  713. ifeq ($(FULL_TARGET),i386-embedded)
  714. override CLEAN_UNITS+=*
  715. endif
  716. ifeq ($(FULL_TARGET),i386-symbian)
  717. override CLEAN_UNITS+=*
  718. endif
  719. ifeq ($(FULL_TARGET),i386-nativent)
  720. override CLEAN_UNITS+=*
  721. endif
  722. ifeq ($(FULL_TARGET),i386-iphonesim)
  723. override CLEAN_UNITS+=*
  724. endif
  725. ifeq ($(FULL_TARGET),i386-android)
  726. override CLEAN_UNITS+=*
  727. endif
  728. ifeq ($(FULL_TARGET),i386-aros)
  729. override CLEAN_UNITS+=*
  730. endif
  731. ifeq ($(FULL_TARGET),m68k-linux)
  732. override CLEAN_UNITS+=*
  733. endif
  734. ifeq ($(FULL_TARGET),m68k-netbsd)
  735. override CLEAN_UNITS+=*
  736. endif
  737. ifeq ($(FULL_TARGET),m68k-amiga)
  738. override CLEAN_UNITS+=*
  739. endif
  740. ifeq ($(FULL_TARGET),m68k-atari)
  741. override CLEAN_UNITS+=*
  742. endif
  743. ifeq ($(FULL_TARGET),m68k-palmos)
  744. override CLEAN_UNITS+=*
  745. endif
  746. ifeq ($(FULL_TARGET),m68k-macos)
  747. override CLEAN_UNITS+=*
  748. endif
  749. ifeq ($(FULL_TARGET),m68k-embedded)
  750. override CLEAN_UNITS+=*
  751. endif
  752. ifeq ($(FULL_TARGET),powerpc-linux)
  753. override CLEAN_UNITS+=*
  754. endif
  755. ifeq ($(FULL_TARGET),powerpc-netbsd)
  756. override CLEAN_UNITS+=*
  757. endif
  758. ifeq ($(FULL_TARGET),powerpc-amiga)
  759. override CLEAN_UNITS+=*
  760. endif
  761. ifeq ($(FULL_TARGET),powerpc-macos)
  762. override CLEAN_UNITS+=*
  763. endif
  764. ifeq ($(FULL_TARGET),powerpc-darwin)
  765. override CLEAN_UNITS+=*
  766. endif
  767. ifeq ($(FULL_TARGET),powerpc-morphos)
  768. override CLEAN_UNITS+=*
  769. endif
  770. ifeq ($(FULL_TARGET),powerpc-embedded)
  771. override CLEAN_UNITS+=*
  772. endif
  773. ifeq ($(FULL_TARGET),powerpc-wii)
  774. override CLEAN_UNITS+=*
  775. endif
  776. ifeq ($(FULL_TARGET),powerpc-aix)
  777. override CLEAN_UNITS+=*
  778. endif
  779. ifeq ($(FULL_TARGET),sparc-linux)
  780. override CLEAN_UNITS+=*
  781. endif
  782. ifeq ($(FULL_TARGET),sparc-netbsd)
  783. override CLEAN_UNITS+=*
  784. endif
  785. ifeq ($(FULL_TARGET),sparc-solaris)
  786. override CLEAN_UNITS+=*
  787. endif
  788. ifeq ($(FULL_TARGET),sparc-embedded)
  789. override CLEAN_UNITS+=*
  790. endif
  791. ifeq ($(FULL_TARGET),x86_64-linux)
  792. override CLEAN_UNITS+=*
  793. endif
  794. ifeq ($(FULL_TARGET),x86_64-freebsd)
  795. override CLEAN_UNITS+=*
  796. endif
  797. ifeq ($(FULL_TARGET),x86_64-haiku)
  798. override CLEAN_UNITS+=*
  799. endif
  800. ifeq ($(FULL_TARGET),x86_64-netbsd)
  801. override CLEAN_UNITS+=*
  802. endif
  803. ifeq ($(FULL_TARGET),x86_64-solaris)
  804. override CLEAN_UNITS+=*
  805. endif
  806. ifeq ($(FULL_TARGET),x86_64-openbsd)
  807. override CLEAN_UNITS+=*
  808. endif
  809. ifeq ($(FULL_TARGET),x86_64-darwin)
  810. override CLEAN_UNITS+=*
  811. endif
  812. ifeq ($(FULL_TARGET),x86_64-win64)
  813. override CLEAN_UNITS+=*
  814. endif
  815. ifeq ($(FULL_TARGET),x86_64-embedded)
  816. override CLEAN_UNITS+=*
  817. endif
  818. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  819. override CLEAN_UNITS+=*
  820. endif
  821. ifeq ($(FULL_TARGET),x86_64-android)
  822. override CLEAN_UNITS+=*
  823. endif
  824. ifeq ($(FULL_TARGET),x86_64-aros)
  825. override CLEAN_UNITS+=*
  826. endif
  827. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  828. override CLEAN_UNITS+=*
  829. endif
  830. ifeq ($(FULL_TARGET),arm-linux)
  831. override CLEAN_UNITS+=*
  832. endif
  833. ifeq ($(FULL_TARGET),arm-netbsd)
  834. override CLEAN_UNITS+=*
  835. endif
  836. ifeq ($(FULL_TARGET),arm-palmos)
  837. override CLEAN_UNITS+=*
  838. endif
  839. ifeq ($(FULL_TARGET),arm-darwin)
  840. override CLEAN_UNITS+=*
  841. endif
  842. ifeq ($(FULL_TARGET),arm-wince)
  843. override CLEAN_UNITS+=*
  844. endif
  845. ifeq ($(FULL_TARGET),arm-gba)
  846. override CLEAN_UNITS+=*
  847. endif
  848. ifeq ($(FULL_TARGET),arm-nds)
  849. override CLEAN_UNITS+=*
  850. endif
  851. ifeq ($(FULL_TARGET),arm-embedded)
  852. override CLEAN_UNITS+=*
  853. endif
  854. ifeq ($(FULL_TARGET),arm-symbian)
  855. override CLEAN_UNITS+=*
  856. endif
  857. ifeq ($(FULL_TARGET),arm-android)
  858. override CLEAN_UNITS+=*
  859. endif
  860. ifeq ($(FULL_TARGET),arm-aros)
  861. override CLEAN_UNITS+=*
  862. endif
  863. ifeq ($(FULL_TARGET),arm-freertos)
  864. override CLEAN_UNITS+=*
  865. endif
  866. ifeq ($(FULL_TARGET),powerpc64-linux)
  867. override CLEAN_UNITS+=*
  868. endif
  869. ifeq ($(FULL_TARGET),powerpc64-darwin)
  870. override CLEAN_UNITS+=*
  871. endif
  872. ifeq ($(FULL_TARGET),powerpc64-embedded)
  873. override CLEAN_UNITS+=*
  874. endif
  875. ifeq ($(FULL_TARGET),powerpc64-aix)
  876. override CLEAN_UNITS+=*
  877. endif
  878. ifeq ($(FULL_TARGET),avr-embedded)
  879. override CLEAN_UNITS+=*
  880. endif
  881. ifeq ($(FULL_TARGET),armeb-linux)
  882. override CLEAN_UNITS+=*
  883. endif
  884. ifeq ($(FULL_TARGET),armeb-embedded)
  885. override CLEAN_UNITS+=*
  886. endif
  887. ifeq ($(FULL_TARGET),mips-linux)
  888. override CLEAN_UNITS+=*
  889. endif
  890. ifeq ($(FULL_TARGET),mipsel-linux)
  891. override CLEAN_UNITS+=*
  892. endif
  893. ifeq ($(FULL_TARGET),mipsel-embedded)
  894. override CLEAN_UNITS+=*
  895. endif
  896. ifeq ($(FULL_TARGET),mipsel-android)
  897. override CLEAN_UNITS+=*
  898. endif
  899. ifeq ($(FULL_TARGET),jvm-java)
  900. override CLEAN_UNITS+=*
  901. endif
  902. ifeq ($(FULL_TARGET),jvm-android)
  903. override CLEAN_UNITS+=*
  904. endif
  905. ifeq ($(FULL_TARGET),i8086-embedded)
  906. override CLEAN_UNITS+=*
  907. endif
  908. ifeq ($(FULL_TARGET),i8086-msdos)
  909. override CLEAN_UNITS+=*
  910. endif
  911. ifeq ($(FULL_TARGET),i8086-win16)
  912. override CLEAN_UNITS+=*
  913. endif
  914. ifeq ($(FULL_TARGET),aarch64-linux)
  915. override CLEAN_UNITS+=*
  916. endif
  917. ifeq ($(FULL_TARGET),aarch64-darwin)
  918. override CLEAN_UNITS+=*
  919. endif
  920. ifeq ($(FULL_TARGET),aarch64-win64)
  921. override CLEAN_UNITS+=*
  922. endif
  923. ifeq ($(FULL_TARGET),aarch64-android)
  924. override CLEAN_UNITS+=*
  925. endif
  926. ifeq ($(FULL_TARGET),wasm-wasm)
  927. override CLEAN_UNITS+=*
  928. endif
  929. ifeq ($(FULL_TARGET),sparc64-linux)
  930. override CLEAN_UNITS+=*
  931. endif
  932. ifeq ($(FULL_TARGET),riscv32-linux)
  933. override CLEAN_UNITS+=*
  934. endif
  935. ifeq ($(FULL_TARGET),riscv32-embedded)
  936. override CLEAN_UNITS+=*
  937. endif
  938. ifeq ($(FULL_TARGET),riscv64-linux)
  939. override CLEAN_UNITS+=*
  940. endif
  941. ifeq ($(FULL_TARGET),riscv64-embedded)
  942. override CLEAN_UNITS+=*
  943. endif
  944. ifeq ($(FULL_TARGET),xtensa-linux)
  945. override CLEAN_UNITS+=*
  946. endif
  947. ifeq ($(FULL_TARGET),xtensa-embedded)
  948. override CLEAN_UNITS+=*
  949. endif
  950. ifeq ($(FULL_TARGET),xtensa-freertos)
  951. override CLEAN_UNITS+=*
  952. endif
  953. ifeq ($(FULL_TARGET),z80-embedded)
  954. override CLEAN_UNITS+=*
  955. endif
  956. ifeq ($(FULL_TARGET),z80-zxspectrum)
  957. override CLEAN_UNITS+=*
  958. endif
  959. ifeq ($(FULL_TARGET),z80-msxdos)
  960. override CLEAN_UNITS+=*
  961. endif
  962. ifeq ($(FULL_TARGET),i386-linux)
  963. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  964. endif
  965. ifeq ($(FULL_TARGET),i386-go32v2)
  966. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  967. endif
  968. ifeq ($(FULL_TARGET),i386-win32)
  969. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  970. endif
  971. ifeq ($(FULL_TARGET),i386-os2)
  972. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  973. endif
  974. ifeq ($(FULL_TARGET),i386-freebsd)
  975. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  976. endif
  977. ifeq ($(FULL_TARGET),i386-beos)
  978. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  979. endif
  980. ifeq ($(FULL_TARGET),i386-haiku)
  981. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  982. endif
  983. ifeq ($(FULL_TARGET),i386-netbsd)
  984. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  985. endif
  986. ifeq ($(FULL_TARGET),i386-solaris)
  987. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  988. endif
  989. ifeq ($(FULL_TARGET),i386-netware)
  990. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  991. endif
  992. ifeq ($(FULL_TARGET),i386-openbsd)
  993. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  994. endif
  995. ifeq ($(FULL_TARGET),i386-wdosx)
  996. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  997. endif
  998. ifeq ($(FULL_TARGET),i386-darwin)
  999. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1000. endif
  1001. ifeq ($(FULL_TARGET),i386-emx)
  1002. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1003. endif
  1004. ifeq ($(FULL_TARGET),i386-watcom)
  1005. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1006. endif
  1007. ifeq ($(FULL_TARGET),i386-netwlibc)
  1008. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1009. endif
  1010. ifeq ($(FULL_TARGET),i386-wince)
  1011. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1012. endif
  1013. ifeq ($(FULL_TARGET),i386-embedded)
  1014. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1015. endif
  1016. ifeq ($(FULL_TARGET),i386-symbian)
  1017. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1018. endif
  1019. ifeq ($(FULL_TARGET),i386-nativent)
  1020. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1021. endif
  1022. ifeq ($(FULL_TARGET),i386-iphonesim)
  1023. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1024. endif
  1025. ifeq ($(FULL_TARGET),i386-android)
  1026. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1027. endif
  1028. ifeq ($(FULL_TARGET),i386-aros)
  1029. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1030. endif
  1031. ifeq ($(FULL_TARGET),m68k-linux)
  1032. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1033. endif
  1034. ifeq ($(FULL_TARGET),m68k-netbsd)
  1035. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1036. endif
  1037. ifeq ($(FULL_TARGET),m68k-amiga)
  1038. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1039. endif
  1040. ifeq ($(FULL_TARGET),m68k-atari)
  1041. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1042. endif
  1043. ifeq ($(FULL_TARGET),m68k-palmos)
  1044. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1045. endif
  1046. ifeq ($(FULL_TARGET),m68k-macos)
  1047. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1048. endif
  1049. ifeq ($(FULL_TARGET),m68k-embedded)
  1050. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1051. endif
  1052. ifeq ($(FULL_TARGET),powerpc-linux)
  1053. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1054. endif
  1055. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1056. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1057. endif
  1058. ifeq ($(FULL_TARGET),powerpc-amiga)
  1059. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1060. endif
  1061. ifeq ($(FULL_TARGET),powerpc-macos)
  1062. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1063. endif
  1064. ifeq ($(FULL_TARGET),powerpc-darwin)
  1065. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1066. endif
  1067. ifeq ($(FULL_TARGET),powerpc-morphos)
  1068. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1069. endif
  1070. ifeq ($(FULL_TARGET),powerpc-embedded)
  1071. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1072. endif
  1073. ifeq ($(FULL_TARGET),powerpc-wii)
  1074. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1075. endif
  1076. ifeq ($(FULL_TARGET),powerpc-aix)
  1077. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1078. endif
  1079. ifeq ($(FULL_TARGET),sparc-linux)
  1080. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1081. endif
  1082. ifeq ($(FULL_TARGET),sparc-netbsd)
  1083. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1084. endif
  1085. ifeq ($(FULL_TARGET),sparc-solaris)
  1086. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1087. endif
  1088. ifeq ($(FULL_TARGET),sparc-embedded)
  1089. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1090. endif
  1091. ifeq ($(FULL_TARGET),x86_64-linux)
  1092. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1093. endif
  1094. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1095. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1096. endif
  1097. ifeq ($(FULL_TARGET),x86_64-haiku)
  1098. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1099. endif
  1100. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1101. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1102. endif
  1103. ifeq ($(FULL_TARGET),x86_64-solaris)
  1104. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1105. endif
  1106. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1107. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1108. endif
  1109. ifeq ($(FULL_TARGET),x86_64-darwin)
  1110. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1111. endif
  1112. ifeq ($(FULL_TARGET),x86_64-win64)
  1113. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1114. endif
  1115. ifeq ($(FULL_TARGET),x86_64-embedded)
  1116. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1117. endif
  1118. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1119. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1120. endif
  1121. ifeq ($(FULL_TARGET),x86_64-android)
  1122. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1123. endif
  1124. ifeq ($(FULL_TARGET),x86_64-aros)
  1125. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1126. endif
  1127. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1128. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1129. endif
  1130. ifeq ($(FULL_TARGET),arm-linux)
  1131. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1132. endif
  1133. ifeq ($(FULL_TARGET),arm-netbsd)
  1134. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1135. endif
  1136. ifeq ($(FULL_TARGET),arm-palmos)
  1137. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1138. endif
  1139. ifeq ($(FULL_TARGET),arm-darwin)
  1140. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1141. endif
  1142. ifeq ($(FULL_TARGET),arm-wince)
  1143. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1144. endif
  1145. ifeq ($(FULL_TARGET),arm-gba)
  1146. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1147. endif
  1148. ifeq ($(FULL_TARGET),arm-nds)
  1149. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1150. endif
  1151. ifeq ($(FULL_TARGET),arm-embedded)
  1152. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1153. endif
  1154. ifeq ($(FULL_TARGET),arm-symbian)
  1155. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1156. endif
  1157. ifeq ($(FULL_TARGET),arm-android)
  1158. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1159. endif
  1160. ifeq ($(FULL_TARGET),arm-aros)
  1161. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1162. endif
  1163. ifeq ($(FULL_TARGET),arm-freertos)
  1164. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1165. endif
  1166. ifeq ($(FULL_TARGET),powerpc64-linux)
  1167. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1168. endif
  1169. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1170. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1171. endif
  1172. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1173. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1174. endif
  1175. ifeq ($(FULL_TARGET),powerpc64-aix)
  1176. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1177. endif
  1178. ifeq ($(FULL_TARGET),avr-embedded)
  1179. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1180. endif
  1181. ifeq ($(FULL_TARGET),armeb-linux)
  1182. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1183. endif
  1184. ifeq ($(FULL_TARGET),armeb-embedded)
  1185. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1186. endif
  1187. ifeq ($(FULL_TARGET),mips-linux)
  1188. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1189. endif
  1190. ifeq ($(FULL_TARGET),mipsel-linux)
  1191. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1192. endif
  1193. ifeq ($(FULL_TARGET),mipsel-embedded)
  1194. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1195. endif
  1196. ifeq ($(FULL_TARGET),mipsel-android)
  1197. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1198. endif
  1199. ifeq ($(FULL_TARGET),jvm-java)
  1200. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1201. endif
  1202. ifeq ($(FULL_TARGET),jvm-android)
  1203. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1204. endif
  1205. ifeq ($(FULL_TARGET),i8086-embedded)
  1206. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1207. endif
  1208. ifeq ($(FULL_TARGET),i8086-msdos)
  1209. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1210. endif
  1211. ifeq ($(FULL_TARGET),i8086-win16)
  1212. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1213. endif
  1214. ifeq ($(FULL_TARGET),aarch64-linux)
  1215. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1216. endif
  1217. ifeq ($(FULL_TARGET),aarch64-darwin)
  1218. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1219. endif
  1220. ifeq ($(FULL_TARGET),aarch64-win64)
  1221. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1222. endif
  1223. ifeq ($(FULL_TARGET),aarch64-android)
  1224. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1225. endif
  1226. ifeq ($(FULL_TARGET),wasm-wasm)
  1227. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1228. endif
  1229. ifeq ($(FULL_TARGET),sparc64-linux)
  1230. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1231. endif
  1232. ifeq ($(FULL_TARGET),riscv32-linux)
  1233. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1234. endif
  1235. ifeq ($(FULL_TARGET),riscv32-embedded)
  1236. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1237. endif
  1238. ifeq ($(FULL_TARGET),riscv64-linux)
  1239. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1240. endif
  1241. ifeq ($(FULL_TARGET),riscv64-embedded)
  1242. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1243. endif
  1244. ifeq ($(FULL_TARGET),xtensa-linux)
  1245. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1246. endif
  1247. ifeq ($(FULL_TARGET),xtensa-embedded)
  1248. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1249. endif
  1250. ifeq ($(FULL_TARGET),xtensa-freertos)
  1251. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1252. endif
  1253. ifeq ($(FULL_TARGET),z80-embedded)
  1254. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1255. endif
  1256. ifeq ($(FULL_TARGET),z80-zxspectrum)
  1257. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1258. endif
  1259. ifeq ($(FULL_TARGET),z80-msxdos)
  1260. override CLEAN_FILES+=*.elf *.o *.s *.nds *.nef *.h *.bin *.map $(BUILD)/* $(INC)/* $(BIN)/*
  1261. endif
  1262. override INSTALL_FPCPACKAGE=y
  1263. ifeq ($(FULL_TARGET),i386-linux)
  1264. override COMPILER_OPTIONS+=-Xm
  1265. endif
  1266. ifeq ($(FULL_TARGET),i386-go32v2)
  1267. override COMPILER_OPTIONS+=-Xm
  1268. endif
  1269. ifeq ($(FULL_TARGET),i386-win32)
  1270. override COMPILER_OPTIONS+=-Xm
  1271. endif
  1272. ifeq ($(FULL_TARGET),i386-os2)
  1273. override COMPILER_OPTIONS+=-Xm
  1274. endif
  1275. ifeq ($(FULL_TARGET),i386-freebsd)
  1276. override COMPILER_OPTIONS+=-Xm
  1277. endif
  1278. ifeq ($(FULL_TARGET),i386-beos)
  1279. override COMPILER_OPTIONS+=-Xm
  1280. endif
  1281. ifeq ($(FULL_TARGET),i386-haiku)
  1282. override COMPILER_OPTIONS+=-Xm
  1283. endif
  1284. ifeq ($(FULL_TARGET),i386-netbsd)
  1285. override COMPILER_OPTIONS+=-Xm
  1286. endif
  1287. ifeq ($(FULL_TARGET),i386-solaris)
  1288. override COMPILER_OPTIONS+=-Xm
  1289. endif
  1290. ifeq ($(FULL_TARGET),i386-netware)
  1291. override COMPILER_OPTIONS+=-Xm
  1292. endif
  1293. ifeq ($(FULL_TARGET),i386-openbsd)
  1294. override COMPILER_OPTIONS+=-Xm
  1295. endif
  1296. ifeq ($(FULL_TARGET),i386-wdosx)
  1297. override COMPILER_OPTIONS+=-Xm
  1298. endif
  1299. ifeq ($(FULL_TARGET),i386-darwin)
  1300. override COMPILER_OPTIONS+=-Xm
  1301. endif
  1302. ifeq ($(FULL_TARGET),i386-emx)
  1303. override COMPILER_OPTIONS+=-Xm
  1304. endif
  1305. ifeq ($(FULL_TARGET),i386-watcom)
  1306. override COMPILER_OPTIONS+=-Xm
  1307. endif
  1308. ifeq ($(FULL_TARGET),i386-netwlibc)
  1309. override COMPILER_OPTIONS+=-Xm
  1310. endif
  1311. ifeq ($(FULL_TARGET),i386-wince)
  1312. override COMPILER_OPTIONS+=-Xm
  1313. endif
  1314. ifeq ($(FULL_TARGET),i386-embedded)
  1315. override COMPILER_OPTIONS+=-Xm
  1316. endif
  1317. ifeq ($(FULL_TARGET),i386-symbian)
  1318. override COMPILER_OPTIONS+=-Xm
  1319. endif
  1320. ifeq ($(FULL_TARGET),i386-nativent)
  1321. override COMPILER_OPTIONS+=-Xm
  1322. endif
  1323. ifeq ($(FULL_TARGET),i386-iphonesim)
  1324. override COMPILER_OPTIONS+=-Xm
  1325. endif
  1326. ifeq ($(FULL_TARGET),i386-android)
  1327. override COMPILER_OPTIONS+=-Xm
  1328. endif
  1329. ifeq ($(FULL_TARGET),i386-aros)
  1330. override COMPILER_OPTIONS+=-Xm
  1331. endif
  1332. ifeq ($(FULL_TARGET),m68k-linux)
  1333. override COMPILER_OPTIONS+=-Xm
  1334. endif
  1335. ifeq ($(FULL_TARGET),m68k-netbsd)
  1336. override COMPILER_OPTIONS+=-Xm
  1337. endif
  1338. ifeq ($(FULL_TARGET),m68k-amiga)
  1339. override COMPILER_OPTIONS+=-Xm
  1340. endif
  1341. ifeq ($(FULL_TARGET),m68k-atari)
  1342. override COMPILER_OPTIONS+=-Xm
  1343. endif
  1344. ifeq ($(FULL_TARGET),m68k-palmos)
  1345. override COMPILER_OPTIONS+=-Xm
  1346. endif
  1347. ifeq ($(FULL_TARGET),m68k-macos)
  1348. override COMPILER_OPTIONS+=-Xm
  1349. endif
  1350. ifeq ($(FULL_TARGET),m68k-embedded)
  1351. override COMPILER_OPTIONS+=-Xm
  1352. endif
  1353. ifeq ($(FULL_TARGET),powerpc-linux)
  1354. override COMPILER_OPTIONS+=-Xm
  1355. endif
  1356. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1357. override COMPILER_OPTIONS+=-Xm
  1358. endif
  1359. ifeq ($(FULL_TARGET),powerpc-amiga)
  1360. override COMPILER_OPTIONS+=-Xm
  1361. endif
  1362. ifeq ($(FULL_TARGET),powerpc-macos)
  1363. override COMPILER_OPTIONS+=-Xm
  1364. endif
  1365. ifeq ($(FULL_TARGET),powerpc-darwin)
  1366. override COMPILER_OPTIONS+=-Xm
  1367. endif
  1368. ifeq ($(FULL_TARGET),powerpc-morphos)
  1369. override COMPILER_OPTIONS+=-Xm
  1370. endif
  1371. ifeq ($(FULL_TARGET),powerpc-embedded)
  1372. override COMPILER_OPTIONS+=-Xm
  1373. endif
  1374. ifeq ($(FULL_TARGET),powerpc-wii)
  1375. override COMPILER_OPTIONS+=-Xm
  1376. endif
  1377. ifeq ($(FULL_TARGET),powerpc-aix)
  1378. override COMPILER_OPTIONS+=-Xm
  1379. endif
  1380. ifeq ($(FULL_TARGET),sparc-linux)
  1381. override COMPILER_OPTIONS+=-Xm
  1382. endif
  1383. ifeq ($(FULL_TARGET),sparc-netbsd)
  1384. override COMPILER_OPTIONS+=-Xm
  1385. endif
  1386. ifeq ($(FULL_TARGET),sparc-solaris)
  1387. override COMPILER_OPTIONS+=-Xm
  1388. endif
  1389. ifeq ($(FULL_TARGET),sparc-embedded)
  1390. override COMPILER_OPTIONS+=-Xm
  1391. endif
  1392. ifeq ($(FULL_TARGET),x86_64-linux)
  1393. override COMPILER_OPTIONS+=-Xm
  1394. endif
  1395. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1396. override COMPILER_OPTIONS+=-Xm
  1397. endif
  1398. ifeq ($(FULL_TARGET),x86_64-haiku)
  1399. override COMPILER_OPTIONS+=-Xm
  1400. endif
  1401. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1402. override COMPILER_OPTIONS+=-Xm
  1403. endif
  1404. ifeq ($(FULL_TARGET),x86_64-solaris)
  1405. override COMPILER_OPTIONS+=-Xm
  1406. endif
  1407. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1408. override COMPILER_OPTIONS+=-Xm
  1409. endif
  1410. ifeq ($(FULL_TARGET),x86_64-darwin)
  1411. override COMPILER_OPTIONS+=-Xm
  1412. endif
  1413. ifeq ($(FULL_TARGET),x86_64-win64)
  1414. override COMPILER_OPTIONS+=-Xm
  1415. endif
  1416. ifeq ($(FULL_TARGET),x86_64-embedded)
  1417. override COMPILER_OPTIONS+=-Xm
  1418. endif
  1419. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1420. override COMPILER_OPTIONS+=-Xm
  1421. endif
  1422. ifeq ($(FULL_TARGET),x86_64-android)
  1423. override COMPILER_OPTIONS+=-Xm
  1424. endif
  1425. ifeq ($(FULL_TARGET),x86_64-aros)
  1426. override COMPILER_OPTIONS+=-Xm
  1427. endif
  1428. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1429. override COMPILER_OPTIONS+=-Xm
  1430. endif
  1431. ifeq ($(FULL_TARGET),arm-linux)
  1432. override COMPILER_OPTIONS+=-Xm
  1433. endif
  1434. ifeq ($(FULL_TARGET),arm-netbsd)
  1435. override COMPILER_OPTIONS+=-Xm
  1436. endif
  1437. ifeq ($(FULL_TARGET),arm-palmos)
  1438. override COMPILER_OPTIONS+=-Xm
  1439. endif
  1440. ifeq ($(FULL_TARGET),arm-darwin)
  1441. override COMPILER_OPTIONS+=-Xm
  1442. endif
  1443. ifeq ($(FULL_TARGET),arm-wince)
  1444. override COMPILER_OPTIONS+=-Xm
  1445. endif
  1446. ifeq ($(FULL_TARGET),arm-gba)
  1447. override COMPILER_OPTIONS+=-Xm
  1448. endif
  1449. ifeq ($(FULL_TARGET),arm-nds)
  1450. override COMPILER_OPTIONS+=-Xm
  1451. endif
  1452. ifeq ($(FULL_TARGET),arm-embedded)
  1453. override COMPILER_OPTIONS+=-Xm
  1454. endif
  1455. ifeq ($(FULL_TARGET),arm-symbian)
  1456. override COMPILER_OPTIONS+=-Xm
  1457. endif
  1458. ifeq ($(FULL_TARGET),arm-android)
  1459. override COMPILER_OPTIONS+=-Xm
  1460. endif
  1461. ifeq ($(FULL_TARGET),arm-aros)
  1462. override COMPILER_OPTIONS+=-Xm
  1463. endif
  1464. ifeq ($(FULL_TARGET),arm-freertos)
  1465. override COMPILER_OPTIONS+=-Xm
  1466. endif
  1467. ifeq ($(FULL_TARGET),powerpc64-linux)
  1468. override COMPILER_OPTIONS+=-Xm
  1469. endif
  1470. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1471. override COMPILER_OPTIONS+=-Xm
  1472. endif
  1473. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1474. override COMPILER_OPTIONS+=-Xm
  1475. endif
  1476. ifeq ($(FULL_TARGET),powerpc64-aix)
  1477. override COMPILER_OPTIONS+=-Xm
  1478. endif
  1479. ifeq ($(FULL_TARGET),avr-embedded)
  1480. override COMPILER_OPTIONS+=-Xm
  1481. endif
  1482. ifeq ($(FULL_TARGET),armeb-linux)
  1483. override COMPILER_OPTIONS+=-Xm
  1484. endif
  1485. ifeq ($(FULL_TARGET),armeb-embedded)
  1486. override COMPILER_OPTIONS+=-Xm
  1487. endif
  1488. ifeq ($(FULL_TARGET),mips-linux)
  1489. override COMPILER_OPTIONS+=-Xm
  1490. endif
  1491. ifeq ($(FULL_TARGET),mipsel-linux)
  1492. override COMPILER_OPTIONS+=-Xm
  1493. endif
  1494. ifeq ($(FULL_TARGET),mipsel-embedded)
  1495. override COMPILER_OPTIONS+=-Xm
  1496. endif
  1497. ifeq ($(FULL_TARGET),mipsel-android)
  1498. override COMPILER_OPTIONS+=-Xm
  1499. endif
  1500. ifeq ($(FULL_TARGET),jvm-java)
  1501. override COMPILER_OPTIONS+=-Xm
  1502. endif
  1503. ifeq ($(FULL_TARGET),jvm-android)
  1504. override COMPILER_OPTIONS+=-Xm
  1505. endif
  1506. ifeq ($(FULL_TARGET),i8086-embedded)
  1507. override COMPILER_OPTIONS+=-Xm
  1508. endif
  1509. ifeq ($(FULL_TARGET),i8086-msdos)
  1510. override COMPILER_OPTIONS+=-Xm
  1511. endif
  1512. ifeq ($(FULL_TARGET),i8086-win16)
  1513. override COMPILER_OPTIONS+=-Xm
  1514. endif
  1515. ifeq ($(FULL_TARGET),aarch64-linux)
  1516. override COMPILER_OPTIONS+=-Xm
  1517. endif
  1518. ifeq ($(FULL_TARGET),aarch64-darwin)
  1519. override COMPILER_OPTIONS+=-Xm
  1520. endif
  1521. ifeq ($(FULL_TARGET),aarch64-win64)
  1522. override COMPILER_OPTIONS+=-Xm
  1523. endif
  1524. ifeq ($(FULL_TARGET),aarch64-android)
  1525. override COMPILER_OPTIONS+=-Xm
  1526. endif
  1527. ifeq ($(FULL_TARGET),wasm-wasm)
  1528. override COMPILER_OPTIONS+=-Xm
  1529. endif
  1530. ifeq ($(FULL_TARGET),sparc64-linux)
  1531. override COMPILER_OPTIONS+=-Xm
  1532. endif
  1533. ifeq ($(FULL_TARGET),riscv32-linux)
  1534. override COMPILER_OPTIONS+=-Xm
  1535. endif
  1536. ifeq ($(FULL_TARGET),riscv32-embedded)
  1537. override COMPILER_OPTIONS+=-Xm
  1538. endif
  1539. ifeq ($(FULL_TARGET),riscv64-linux)
  1540. override COMPILER_OPTIONS+=-Xm
  1541. endif
  1542. ifeq ($(FULL_TARGET),riscv64-embedded)
  1543. override COMPILER_OPTIONS+=-Xm
  1544. endif
  1545. ifeq ($(FULL_TARGET),xtensa-linux)
  1546. override COMPILER_OPTIONS+=-Xm
  1547. endif
  1548. ifeq ($(FULL_TARGET),xtensa-embedded)
  1549. override COMPILER_OPTIONS+=-Xm
  1550. endif
  1551. ifeq ($(FULL_TARGET),xtensa-freertos)
  1552. override COMPILER_OPTIONS+=-Xm
  1553. endif
  1554. ifeq ($(FULL_TARGET),z80-embedded)
  1555. override COMPILER_OPTIONS+=-Xm
  1556. endif
  1557. ifeq ($(FULL_TARGET),z80-zxspectrum)
  1558. override COMPILER_OPTIONS+=-Xm
  1559. endif
  1560. ifeq ($(FULL_TARGET),z80-msxdos)
  1561. override COMPILER_OPTIONS+=-Xm
  1562. endif
  1563. ifeq ($(FULL_TARGET),i386-linux)
  1564. override COMPILER_TARGETDIR+=$(BIN)
  1565. endif
  1566. ifeq ($(FULL_TARGET),i386-go32v2)
  1567. override COMPILER_TARGETDIR+=$(BIN)
  1568. endif
  1569. ifeq ($(FULL_TARGET),i386-win32)
  1570. override COMPILER_TARGETDIR+=$(BIN)
  1571. endif
  1572. ifeq ($(FULL_TARGET),i386-os2)
  1573. override COMPILER_TARGETDIR+=$(BIN)
  1574. endif
  1575. ifeq ($(FULL_TARGET),i386-freebsd)
  1576. override COMPILER_TARGETDIR+=$(BIN)
  1577. endif
  1578. ifeq ($(FULL_TARGET),i386-beos)
  1579. override COMPILER_TARGETDIR+=$(BIN)
  1580. endif
  1581. ifeq ($(FULL_TARGET),i386-haiku)
  1582. override COMPILER_TARGETDIR+=$(BIN)
  1583. endif
  1584. ifeq ($(FULL_TARGET),i386-netbsd)
  1585. override COMPILER_TARGETDIR+=$(BIN)
  1586. endif
  1587. ifeq ($(FULL_TARGET),i386-solaris)
  1588. override COMPILER_TARGETDIR+=$(BIN)
  1589. endif
  1590. ifeq ($(FULL_TARGET),i386-netware)
  1591. override COMPILER_TARGETDIR+=$(BIN)
  1592. endif
  1593. ifeq ($(FULL_TARGET),i386-openbsd)
  1594. override COMPILER_TARGETDIR+=$(BIN)
  1595. endif
  1596. ifeq ($(FULL_TARGET),i386-wdosx)
  1597. override COMPILER_TARGETDIR+=$(BIN)
  1598. endif
  1599. ifeq ($(FULL_TARGET),i386-darwin)
  1600. override COMPILER_TARGETDIR+=$(BIN)
  1601. endif
  1602. ifeq ($(FULL_TARGET),i386-emx)
  1603. override COMPILER_TARGETDIR+=$(BIN)
  1604. endif
  1605. ifeq ($(FULL_TARGET),i386-watcom)
  1606. override COMPILER_TARGETDIR+=$(BIN)
  1607. endif
  1608. ifeq ($(FULL_TARGET),i386-netwlibc)
  1609. override COMPILER_TARGETDIR+=$(BIN)
  1610. endif
  1611. ifeq ($(FULL_TARGET),i386-wince)
  1612. override COMPILER_TARGETDIR+=$(BIN)
  1613. endif
  1614. ifeq ($(FULL_TARGET),i386-embedded)
  1615. override COMPILER_TARGETDIR+=$(BIN)
  1616. endif
  1617. ifeq ($(FULL_TARGET),i386-symbian)
  1618. override COMPILER_TARGETDIR+=$(BIN)
  1619. endif
  1620. ifeq ($(FULL_TARGET),i386-nativent)
  1621. override COMPILER_TARGETDIR+=$(BIN)
  1622. endif
  1623. ifeq ($(FULL_TARGET),i386-iphonesim)
  1624. override COMPILER_TARGETDIR+=$(BIN)
  1625. endif
  1626. ifeq ($(FULL_TARGET),i386-android)
  1627. override COMPILER_TARGETDIR+=$(BIN)
  1628. endif
  1629. ifeq ($(FULL_TARGET),i386-aros)
  1630. override COMPILER_TARGETDIR+=$(BIN)
  1631. endif
  1632. ifeq ($(FULL_TARGET),m68k-linux)
  1633. override COMPILER_TARGETDIR+=$(BIN)
  1634. endif
  1635. ifeq ($(FULL_TARGET),m68k-netbsd)
  1636. override COMPILER_TARGETDIR+=$(BIN)
  1637. endif
  1638. ifeq ($(FULL_TARGET),m68k-amiga)
  1639. override COMPILER_TARGETDIR+=$(BIN)
  1640. endif
  1641. ifeq ($(FULL_TARGET),m68k-atari)
  1642. override COMPILER_TARGETDIR+=$(BIN)
  1643. endif
  1644. ifeq ($(FULL_TARGET),m68k-palmos)
  1645. override COMPILER_TARGETDIR+=$(BIN)
  1646. endif
  1647. ifeq ($(FULL_TARGET),m68k-macos)
  1648. override COMPILER_TARGETDIR+=$(BIN)
  1649. endif
  1650. ifeq ($(FULL_TARGET),m68k-embedded)
  1651. override COMPILER_TARGETDIR+=$(BIN)
  1652. endif
  1653. ifeq ($(FULL_TARGET),powerpc-linux)
  1654. override COMPILER_TARGETDIR+=$(BIN)
  1655. endif
  1656. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1657. override COMPILER_TARGETDIR+=$(BIN)
  1658. endif
  1659. ifeq ($(FULL_TARGET),powerpc-amiga)
  1660. override COMPILER_TARGETDIR+=$(BIN)
  1661. endif
  1662. ifeq ($(FULL_TARGET),powerpc-macos)
  1663. override COMPILER_TARGETDIR+=$(BIN)
  1664. endif
  1665. ifeq ($(FULL_TARGET),powerpc-darwin)
  1666. override COMPILER_TARGETDIR+=$(BIN)
  1667. endif
  1668. ifeq ($(FULL_TARGET),powerpc-morphos)
  1669. override COMPILER_TARGETDIR+=$(BIN)
  1670. endif
  1671. ifeq ($(FULL_TARGET),powerpc-embedded)
  1672. override COMPILER_TARGETDIR+=$(BIN)
  1673. endif
  1674. ifeq ($(FULL_TARGET),powerpc-wii)
  1675. override COMPILER_TARGETDIR+=$(BIN)
  1676. endif
  1677. ifeq ($(FULL_TARGET),powerpc-aix)
  1678. override COMPILER_TARGETDIR+=$(BIN)
  1679. endif
  1680. ifeq ($(FULL_TARGET),sparc-linux)
  1681. override COMPILER_TARGETDIR+=$(BIN)
  1682. endif
  1683. ifeq ($(FULL_TARGET),sparc-netbsd)
  1684. override COMPILER_TARGETDIR+=$(BIN)
  1685. endif
  1686. ifeq ($(FULL_TARGET),sparc-solaris)
  1687. override COMPILER_TARGETDIR+=$(BIN)
  1688. endif
  1689. ifeq ($(FULL_TARGET),sparc-embedded)
  1690. override COMPILER_TARGETDIR+=$(BIN)
  1691. endif
  1692. ifeq ($(FULL_TARGET),x86_64-linux)
  1693. override COMPILER_TARGETDIR+=$(BIN)
  1694. endif
  1695. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1696. override COMPILER_TARGETDIR+=$(BIN)
  1697. endif
  1698. ifeq ($(FULL_TARGET),x86_64-haiku)
  1699. override COMPILER_TARGETDIR+=$(BIN)
  1700. endif
  1701. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1702. override COMPILER_TARGETDIR+=$(BIN)
  1703. endif
  1704. ifeq ($(FULL_TARGET),x86_64-solaris)
  1705. override COMPILER_TARGETDIR+=$(BIN)
  1706. endif
  1707. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1708. override COMPILER_TARGETDIR+=$(BIN)
  1709. endif
  1710. ifeq ($(FULL_TARGET),x86_64-darwin)
  1711. override COMPILER_TARGETDIR+=$(BIN)
  1712. endif
  1713. ifeq ($(FULL_TARGET),x86_64-win64)
  1714. override COMPILER_TARGETDIR+=$(BIN)
  1715. endif
  1716. ifeq ($(FULL_TARGET),x86_64-embedded)
  1717. override COMPILER_TARGETDIR+=$(BIN)
  1718. endif
  1719. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1720. override COMPILER_TARGETDIR+=$(BIN)
  1721. endif
  1722. ifeq ($(FULL_TARGET),x86_64-android)
  1723. override COMPILER_TARGETDIR+=$(BIN)
  1724. endif
  1725. ifeq ($(FULL_TARGET),x86_64-aros)
  1726. override COMPILER_TARGETDIR+=$(BIN)
  1727. endif
  1728. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1729. override COMPILER_TARGETDIR+=$(BIN)
  1730. endif
  1731. ifeq ($(FULL_TARGET),arm-linux)
  1732. override COMPILER_TARGETDIR+=$(BIN)
  1733. endif
  1734. ifeq ($(FULL_TARGET),arm-netbsd)
  1735. override COMPILER_TARGETDIR+=$(BIN)
  1736. endif
  1737. ifeq ($(FULL_TARGET),arm-palmos)
  1738. override COMPILER_TARGETDIR+=$(BIN)
  1739. endif
  1740. ifeq ($(FULL_TARGET),arm-darwin)
  1741. override COMPILER_TARGETDIR+=$(BIN)
  1742. endif
  1743. ifeq ($(FULL_TARGET),arm-wince)
  1744. override COMPILER_TARGETDIR+=$(BIN)
  1745. endif
  1746. ifeq ($(FULL_TARGET),arm-gba)
  1747. override COMPILER_TARGETDIR+=$(BIN)
  1748. endif
  1749. ifeq ($(FULL_TARGET),arm-nds)
  1750. override COMPILER_TARGETDIR+=$(BIN)
  1751. endif
  1752. ifeq ($(FULL_TARGET),arm-embedded)
  1753. override COMPILER_TARGETDIR+=$(BIN)
  1754. endif
  1755. ifeq ($(FULL_TARGET),arm-symbian)
  1756. override COMPILER_TARGETDIR+=$(BIN)
  1757. endif
  1758. ifeq ($(FULL_TARGET),arm-android)
  1759. override COMPILER_TARGETDIR+=$(BIN)
  1760. endif
  1761. ifeq ($(FULL_TARGET),arm-aros)
  1762. override COMPILER_TARGETDIR+=$(BIN)
  1763. endif
  1764. ifeq ($(FULL_TARGET),arm-freertos)
  1765. override COMPILER_TARGETDIR+=$(BIN)
  1766. endif
  1767. ifeq ($(FULL_TARGET),powerpc64-linux)
  1768. override COMPILER_TARGETDIR+=$(BIN)
  1769. endif
  1770. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1771. override COMPILER_TARGETDIR+=$(BIN)
  1772. endif
  1773. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1774. override COMPILER_TARGETDIR+=$(BIN)
  1775. endif
  1776. ifeq ($(FULL_TARGET),powerpc64-aix)
  1777. override COMPILER_TARGETDIR+=$(BIN)
  1778. endif
  1779. ifeq ($(FULL_TARGET),avr-embedded)
  1780. override COMPILER_TARGETDIR+=$(BIN)
  1781. endif
  1782. ifeq ($(FULL_TARGET),armeb-linux)
  1783. override COMPILER_TARGETDIR+=$(BIN)
  1784. endif
  1785. ifeq ($(FULL_TARGET),armeb-embedded)
  1786. override COMPILER_TARGETDIR+=$(BIN)
  1787. endif
  1788. ifeq ($(FULL_TARGET),mips-linux)
  1789. override COMPILER_TARGETDIR+=$(BIN)
  1790. endif
  1791. ifeq ($(FULL_TARGET),mipsel-linux)
  1792. override COMPILER_TARGETDIR+=$(BIN)
  1793. endif
  1794. ifeq ($(FULL_TARGET),mipsel-embedded)
  1795. override COMPILER_TARGETDIR+=$(BIN)
  1796. endif
  1797. ifeq ($(FULL_TARGET),mipsel-android)
  1798. override COMPILER_TARGETDIR+=$(BIN)
  1799. endif
  1800. ifeq ($(FULL_TARGET),jvm-java)
  1801. override COMPILER_TARGETDIR+=$(BIN)
  1802. endif
  1803. ifeq ($(FULL_TARGET),jvm-android)
  1804. override COMPILER_TARGETDIR+=$(BIN)
  1805. endif
  1806. ifeq ($(FULL_TARGET),i8086-embedded)
  1807. override COMPILER_TARGETDIR+=$(BIN)
  1808. endif
  1809. ifeq ($(FULL_TARGET),i8086-msdos)
  1810. override COMPILER_TARGETDIR+=$(BIN)
  1811. endif
  1812. ifeq ($(FULL_TARGET),i8086-win16)
  1813. override COMPILER_TARGETDIR+=$(BIN)
  1814. endif
  1815. ifeq ($(FULL_TARGET),aarch64-linux)
  1816. override COMPILER_TARGETDIR+=$(BIN)
  1817. endif
  1818. ifeq ($(FULL_TARGET),aarch64-darwin)
  1819. override COMPILER_TARGETDIR+=$(BIN)
  1820. endif
  1821. ifeq ($(FULL_TARGET),aarch64-win64)
  1822. override COMPILER_TARGETDIR+=$(BIN)
  1823. endif
  1824. ifeq ($(FULL_TARGET),aarch64-android)
  1825. override COMPILER_TARGETDIR+=$(BIN)
  1826. endif
  1827. ifeq ($(FULL_TARGET),wasm-wasm)
  1828. override COMPILER_TARGETDIR+=$(BIN)
  1829. endif
  1830. ifeq ($(FULL_TARGET),sparc64-linux)
  1831. override COMPILER_TARGETDIR+=$(BIN)
  1832. endif
  1833. ifeq ($(FULL_TARGET),riscv32-linux)
  1834. override COMPILER_TARGETDIR+=$(BIN)
  1835. endif
  1836. ifeq ($(FULL_TARGET),riscv32-embedded)
  1837. override COMPILER_TARGETDIR+=$(BIN)
  1838. endif
  1839. ifeq ($(FULL_TARGET),riscv64-linux)
  1840. override COMPILER_TARGETDIR+=$(BIN)
  1841. endif
  1842. ifeq ($(FULL_TARGET),riscv64-embedded)
  1843. override COMPILER_TARGETDIR+=$(BIN)
  1844. endif
  1845. ifeq ($(FULL_TARGET),xtensa-linux)
  1846. override COMPILER_TARGETDIR+=$(BIN)
  1847. endif
  1848. ifeq ($(FULL_TARGET),xtensa-embedded)
  1849. override COMPILER_TARGETDIR+=$(BIN)
  1850. endif
  1851. ifeq ($(FULL_TARGET),xtensa-freertos)
  1852. override COMPILER_TARGETDIR+=$(BIN)
  1853. endif
  1854. ifeq ($(FULL_TARGET),z80-embedded)
  1855. override COMPILER_TARGETDIR+=$(BIN)
  1856. endif
  1857. ifeq ($(FULL_TARGET),z80-zxspectrum)
  1858. override COMPILER_TARGETDIR+=$(BIN)
  1859. endif
  1860. ifeq ($(FULL_TARGET),z80-msxdos)
  1861. override COMPILER_TARGETDIR+=$(BIN)
  1862. endif
  1863. ifeq ($(FULL_TARGET),i386-linux)
  1864. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1865. endif
  1866. ifeq ($(FULL_TARGET),i386-go32v2)
  1867. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1868. endif
  1869. ifeq ($(FULL_TARGET),i386-win32)
  1870. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1871. endif
  1872. ifeq ($(FULL_TARGET),i386-os2)
  1873. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1874. endif
  1875. ifeq ($(FULL_TARGET),i386-freebsd)
  1876. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1877. endif
  1878. ifeq ($(FULL_TARGET),i386-beos)
  1879. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1880. endif
  1881. ifeq ($(FULL_TARGET),i386-haiku)
  1882. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1883. endif
  1884. ifeq ($(FULL_TARGET),i386-netbsd)
  1885. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1886. endif
  1887. ifeq ($(FULL_TARGET),i386-solaris)
  1888. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1889. endif
  1890. ifeq ($(FULL_TARGET),i386-netware)
  1891. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1892. endif
  1893. ifeq ($(FULL_TARGET),i386-openbsd)
  1894. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1895. endif
  1896. ifeq ($(FULL_TARGET),i386-wdosx)
  1897. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1898. endif
  1899. ifeq ($(FULL_TARGET),i386-darwin)
  1900. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1901. endif
  1902. ifeq ($(FULL_TARGET),i386-emx)
  1903. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1904. endif
  1905. ifeq ($(FULL_TARGET),i386-watcom)
  1906. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1907. endif
  1908. ifeq ($(FULL_TARGET),i386-netwlibc)
  1909. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1910. endif
  1911. ifeq ($(FULL_TARGET),i386-wince)
  1912. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1913. endif
  1914. ifeq ($(FULL_TARGET),i386-embedded)
  1915. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1916. endif
  1917. ifeq ($(FULL_TARGET),i386-symbian)
  1918. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1919. endif
  1920. ifeq ($(FULL_TARGET),i386-nativent)
  1921. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1922. endif
  1923. ifeq ($(FULL_TARGET),i386-iphonesim)
  1924. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1925. endif
  1926. ifeq ($(FULL_TARGET),i386-android)
  1927. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1928. endif
  1929. ifeq ($(FULL_TARGET),i386-aros)
  1930. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1931. endif
  1932. ifeq ($(FULL_TARGET),m68k-linux)
  1933. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1934. endif
  1935. ifeq ($(FULL_TARGET),m68k-netbsd)
  1936. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1937. endif
  1938. ifeq ($(FULL_TARGET),m68k-amiga)
  1939. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1940. endif
  1941. ifeq ($(FULL_TARGET),m68k-atari)
  1942. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1943. endif
  1944. ifeq ($(FULL_TARGET),m68k-palmos)
  1945. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1946. endif
  1947. ifeq ($(FULL_TARGET),m68k-macos)
  1948. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1949. endif
  1950. ifeq ($(FULL_TARGET),m68k-embedded)
  1951. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1952. endif
  1953. ifeq ($(FULL_TARGET),powerpc-linux)
  1954. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1955. endif
  1956. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1957. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1958. endif
  1959. ifeq ($(FULL_TARGET),powerpc-amiga)
  1960. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1961. endif
  1962. ifeq ($(FULL_TARGET),powerpc-macos)
  1963. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1964. endif
  1965. ifeq ($(FULL_TARGET),powerpc-darwin)
  1966. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1967. endif
  1968. ifeq ($(FULL_TARGET),powerpc-morphos)
  1969. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1970. endif
  1971. ifeq ($(FULL_TARGET),powerpc-embedded)
  1972. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1973. endif
  1974. ifeq ($(FULL_TARGET),powerpc-wii)
  1975. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1976. endif
  1977. ifeq ($(FULL_TARGET),powerpc-aix)
  1978. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1979. endif
  1980. ifeq ($(FULL_TARGET),sparc-linux)
  1981. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1982. endif
  1983. ifeq ($(FULL_TARGET),sparc-netbsd)
  1984. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1985. endif
  1986. ifeq ($(FULL_TARGET),sparc-solaris)
  1987. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1988. endif
  1989. ifeq ($(FULL_TARGET),sparc-embedded)
  1990. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1991. endif
  1992. ifeq ($(FULL_TARGET),x86_64-linux)
  1993. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1994. endif
  1995. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1996. override COMPILER_UNITTARGETDIR+=$(BUILD)
  1997. endif
  1998. ifeq ($(FULL_TARGET),x86_64-haiku)
  1999. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2000. endif
  2001. ifeq ($(FULL_TARGET),x86_64-netbsd)
  2002. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2003. endif
  2004. ifeq ($(FULL_TARGET),x86_64-solaris)
  2005. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2006. endif
  2007. ifeq ($(FULL_TARGET),x86_64-openbsd)
  2008. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2009. endif
  2010. ifeq ($(FULL_TARGET),x86_64-darwin)
  2011. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2012. endif
  2013. ifeq ($(FULL_TARGET),x86_64-win64)
  2014. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2015. endif
  2016. ifeq ($(FULL_TARGET),x86_64-embedded)
  2017. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2018. endif
  2019. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  2020. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2021. endif
  2022. ifeq ($(FULL_TARGET),x86_64-android)
  2023. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2024. endif
  2025. ifeq ($(FULL_TARGET),x86_64-aros)
  2026. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2027. endif
  2028. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  2029. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2030. endif
  2031. ifeq ($(FULL_TARGET),arm-linux)
  2032. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2033. endif
  2034. ifeq ($(FULL_TARGET),arm-netbsd)
  2035. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2036. endif
  2037. ifeq ($(FULL_TARGET),arm-palmos)
  2038. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2039. endif
  2040. ifeq ($(FULL_TARGET),arm-darwin)
  2041. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2042. endif
  2043. ifeq ($(FULL_TARGET),arm-wince)
  2044. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2045. endif
  2046. ifeq ($(FULL_TARGET),arm-gba)
  2047. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2048. endif
  2049. ifeq ($(FULL_TARGET),arm-nds)
  2050. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2051. endif
  2052. ifeq ($(FULL_TARGET),arm-embedded)
  2053. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2054. endif
  2055. ifeq ($(FULL_TARGET),arm-symbian)
  2056. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2057. endif
  2058. ifeq ($(FULL_TARGET),arm-android)
  2059. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2060. endif
  2061. ifeq ($(FULL_TARGET),arm-aros)
  2062. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2063. endif
  2064. ifeq ($(FULL_TARGET),arm-freertos)
  2065. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2066. endif
  2067. ifeq ($(FULL_TARGET),powerpc64-linux)
  2068. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2069. endif
  2070. ifeq ($(FULL_TARGET),powerpc64-darwin)
  2071. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2072. endif
  2073. ifeq ($(FULL_TARGET),powerpc64-embedded)
  2074. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2075. endif
  2076. ifeq ($(FULL_TARGET),powerpc64-aix)
  2077. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2078. endif
  2079. ifeq ($(FULL_TARGET),avr-embedded)
  2080. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2081. endif
  2082. ifeq ($(FULL_TARGET),armeb-linux)
  2083. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2084. endif
  2085. ifeq ($(FULL_TARGET),armeb-embedded)
  2086. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2087. endif
  2088. ifeq ($(FULL_TARGET),mips-linux)
  2089. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2090. endif
  2091. ifeq ($(FULL_TARGET),mipsel-linux)
  2092. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2093. endif
  2094. ifeq ($(FULL_TARGET),mipsel-embedded)
  2095. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2096. endif
  2097. ifeq ($(FULL_TARGET),mipsel-android)
  2098. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2099. endif
  2100. ifeq ($(FULL_TARGET),jvm-java)
  2101. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2102. endif
  2103. ifeq ($(FULL_TARGET),jvm-android)
  2104. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2105. endif
  2106. ifeq ($(FULL_TARGET),i8086-embedded)
  2107. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2108. endif
  2109. ifeq ($(FULL_TARGET),i8086-msdos)
  2110. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2111. endif
  2112. ifeq ($(FULL_TARGET),i8086-win16)
  2113. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2114. endif
  2115. ifeq ($(FULL_TARGET),aarch64-linux)
  2116. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2117. endif
  2118. ifeq ($(FULL_TARGET),aarch64-darwin)
  2119. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2120. endif
  2121. ifeq ($(FULL_TARGET),aarch64-win64)
  2122. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2123. endif
  2124. ifeq ($(FULL_TARGET),aarch64-android)
  2125. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2126. endif
  2127. ifeq ($(FULL_TARGET),wasm-wasm)
  2128. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2129. endif
  2130. ifeq ($(FULL_TARGET),sparc64-linux)
  2131. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2132. endif
  2133. ifeq ($(FULL_TARGET),riscv32-linux)
  2134. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2135. endif
  2136. ifeq ($(FULL_TARGET),riscv32-embedded)
  2137. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2138. endif
  2139. ifeq ($(FULL_TARGET),riscv64-linux)
  2140. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2141. endif
  2142. ifeq ($(FULL_TARGET),riscv64-embedded)
  2143. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2144. endif
  2145. ifeq ($(FULL_TARGET),xtensa-linux)
  2146. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2147. endif
  2148. ifeq ($(FULL_TARGET),xtensa-embedded)
  2149. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2150. endif
  2151. ifeq ($(FULL_TARGET),xtensa-freertos)
  2152. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2153. endif
  2154. ifeq ($(FULL_TARGET),z80-embedded)
  2155. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2156. endif
  2157. ifeq ($(FULL_TARGET),z80-zxspectrum)
  2158. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2159. endif
  2160. ifeq ($(FULL_TARGET),z80-msxdos)
  2161. override COMPILER_UNITTARGETDIR+=$(BUILD)
  2162. endif
  2163. ifdef REQUIRE_UNITSDIR
  2164. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  2165. endif
  2166. ifdef REQUIRE_PACKAGESDIR
  2167. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  2168. endif
  2169. ifdef ZIPINSTALL
  2170. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  2171. UNIXHier=1
  2172. endif
  2173. else
  2174. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  2175. UNIXHier=1
  2176. endif
  2177. endif
  2178. ifndef INSTALL_PREFIX
  2179. ifdef PREFIX
  2180. INSTALL_PREFIX=$(PREFIX)
  2181. endif
  2182. endif
  2183. ifndef INSTALL_PREFIX
  2184. ifdef UNIXHier
  2185. INSTALL_PREFIX=/usr/local
  2186. else
  2187. ifdef INSTALL_FPCPACKAGE
  2188. INSTALL_BASEDIR:=/pp
  2189. else
  2190. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  2191. endif
  2192. endif
  2193. endif
  2194. export INSTALL_PREFIX
  2195. ifdef INSTALL_FPCSUBDIR
  2196. export INSTALL_FPCSUBDIR
  2197. endif
  2198. ifndef DIST_DESTDIR
  2199. DIST_DESTDIR:=$(BASEDIR)
  2200. endif
  2201. export DIST_DESTDIR
  2202. ifndef COMPILER_UNITTARGETDIR
  2203. ifdef PACKAGEDIR_MAIN
  2204. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  2205. else
  2206. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  2207. endif
  2208. endif
  2209. ifndef COMPILER_TARGETDIR
  2210. COMPILER_TARGETDIR=.
  2211. endif
  2212. ifndef INSTALL_BASEDIR
  2213. ifdef UNIXHier
  2214. ifdef INSTALL_FPCPACKAGE
  2215. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  2216. else
  2217. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  2218. endif
  2219. else
  2220. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  2221. endif
  2222. endif
  2223. ifndef INSTALL_BINDIR
  2224. ifdef UNIXHier
  2225. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  2226. else
  2227. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  2228. ifdef INSTALL_FPCPACKAGE
  2229. ifdef CROSSCOMPILE
  2230. ifdef CROSSINSTALL
  2231. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  2232. else
  2233. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  2234. endif
  2235. else
  2236. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  2237. endif
  2238. endif
  2239. endif
  2240. endif
  2241. ifndef INSTALL_UNITDIR
  2242. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  2243. ifdef INSTALL_FPCPACKAGE
  2244. ifdef PACKAGE_NAME
  2245. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  2246. endif
  2247. endif
  2248. endif
  2249. ifndef INSTALL_LIBDIR
  2250. ifdef UNIXHier
  2251. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  2252. else
  2253. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  2254. endif
  2255. endif
  2256. ifndef INSTALL_SOURCEDIR
  2257. ifdef UNIXHier
  2258. ifdef BSDhier
  2259. SRCPREFIXDIR=share/src
  2260. else
  2261. ifdef linuxHier
  2262. SRCPREFIXDIR=share/src
  2263. else
  2264. SRCPREFIXDIR=src
  2265. endif
  2266. endif
  2267. ifdef INSTALL_FPCPACKAGE
  2268. ifdef INSTALL_FPCSUBDIR
  2269. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  2270. else
  2271. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  2272. endif
  2273. else
  2274. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2275. endif
  2276. else
  2277. ifdef INSTALL_FPCPACKAGE
  2278. ifdef INSTALL_FPCSUBDIR
  2279. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  2280. else
  2281. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  2282. endif
  2283. else
  2284. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  2285. endif
  2286. endif
  2287. endif
  2288. ifndef INSTALL_DOCDIR
  2289. ifdef UNIXHier
  2290. ifdef BSDhier
  2291. DOCPREFIXDIR=share/doc
  2292. else
  2293. ifdef linuxHier
  2294. DOCPREFIXDIR=share/doc
  2295. else
  2296. DOCPREFIXDIR=doc
  2297. endif
  2298. endif
  2299. ifdef INSTALL_FPCPACKAGE
  2300. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  2301. else
  2302. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2303. endif
  2304. else
  2305. ifdef INSTALL_FPCPACKAGE
  2306. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  2307. else
  2308. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  2309. endif
  2310. endif
  2311. endif
  2312. ifndef INSTALL_EXAMPLEDIR
  2313. ifdef UNIXHier
  2314. ifdef INSTALL_FPCPACKAGE
  2315. ifdef BSDhier
  2316. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  2317. else
  2318. ifdef linuxHier
  2319. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  2320. else
  2321. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  2322. endif
  2323. endif
  2324. else
  2325. ifdef BSDhier
  2326. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2327. else
  2328. ifdef linuxHier
  2329. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2330. else
  2331. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2332. endif
  2333. endif
  2334. endif
  2335. else
  2336. ifdef INSTALL_FPCPACKAGE
  2337. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  2338. else
  2339. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  2340. endif
  2341. endif
  2342. endif
  2343. ifndef INSTALL_DATADIR
  2344. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  2345. endif
  2346. ifndef INSTALL_SHAREDDIR
  2347. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  2348. endif
  2349. ifdef CROSSCOMPILE
  2350. ifndef CROSSBINDIR
  2351. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  2352. ifeq ($(CROSSBINDIR),)
  2353. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  2354. endif
  2355. endif
  2356. else
  2357. CROSSBINDIR=
  2358. endif
  2359. ifeq ($(OS_SOURCE),linux)
  2360. ifndef GCCLIBDIR
  2361. ifeq ($(CPU_TARGET),i386)
  2362. ifneq ($(findstring x86_64,$(shell uname -a)),)
  2363. ifeq ($(BINUTILSPREFIX),)
  2364. GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
  2365. else
  2366. CROSSGCCOPT=-m32
  2367. endif
  2368. endif
  2369. endif
  2370. ifeq ($(CPU_TARGET),powerpc64)
  2371. ifeq ($(BINUTILSPREFIX),)
  2372. GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
  2373. else
  2374. CROSSGCCOPT=-m64
  2375. endif
  2376. endif
  2377. ifeq ($(CPU_TARGET),sparc)
  2378. ifneq ($(findstring sparc64,$(shell uname -a)),)
  2379. ifeq ($(BINUTILSPREFIX),)
  2380. GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
  2381. else
  2382. CROSSGCCOPT=-m32
  2383. endif
  2384. endif
  2385. endif
  2386. endif
  2387. ifdef FPCFPMAKE
  2388. FPCFPMAKE_CPU_TARGET=$(shell $(FPCFPMAKE) -iTP)
  2389. ifeq ($(CPU_TARGET),$(FPCFPMAKE_CPU_TARGET))
  2390. FPCMAKEGCCLIBDIR:=$(GCCLIBDIR)
  2391. endif
  2392. endif
  2393. ifndef FPCMAKEGCCLIBDIR
  2394. FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
  2395. endif
  2396. ifndef GCCLIBDIR
  2397. CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
  2398. ifneq ($(CROSSGCC),)
  2399. GCCLIBDIR:=$(shell dirname `$(CROSSGCC) $(CROSSGCCOPT) -print-libgcc-file-name`)
  2400. endif
  2401. endif
  2402. endif
  2403. ifdef inUnix
  2404. ifeq ($(OS_SOURCE),netbsd)
  2405. OTHERLIBDIR:=/usr/pkg/lib
  2406. endif
  2407. export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
  2408. endif
  2409. BATCHEXT=.bat
  2410. LOADEREXT=.as
  2411. EXEEXT=.exe
  2412. PPLEXT=.ppl
  2413. PPUEXT=.ppu
  2414. OEXT=.o
  2415. LTOEXT=.bc
  2416. ASMEXT=.s
  2417. SMARTEXT=.sl
  2418. STATICLIBEXT=.a
  2419. SHAREDLIBEXT=.so
  2420. SHAREDLIBPREFIX=libfp
  2421. STATICLIBPREFIX=libp
  2422. IMPORTLIBPREFIX=libimp
  2423. RSTEXT=.rst
  2424. EXEDBGEXT=.dbg
  2425. ifeq ($(OS_TARGET),go32v1)
  2426. STATICLIBPREFIX=
  2427. SHORTSUFFIX=v1
  2428. endif
  2429. ifeq ($(OS_TARGET),go32v2)
  2430. STATICLIBPREFIX=
  2431. SHORTSUFFIX=dos
  2432. IMPORTLIBPREFIX=
  2433. endif
  2434. ifeq ($(OS_TARGET),watcom)
  2435. STATICLIBPREFIX=
  2436. OEXT=.obj
  2437. ASMEXT=.asm
  2438. SHAREDLIBEXT=.dll
  2439. SHORTSUFFIX=wat
  2440. IMPORTLIBPREFIX=
  2441. endif
  2442. ifneq ($(CPU_TARGET),jvm)
  2443. ifeq ($(OS_TARGET),android)
  2444. BATCHEXT=.sh
  2445. EXEEXT=
  2446. HASSHAREDLIB=1
  2447. SHORTSUFFIX=lnx
  2448. endif
  2449. endif
  2450. ifeq ($(OS_TARGET),linux)
  2451. BATCHEXT=.sh
  2452. EXEEXT=
  2453. HASSHAREDLIB=1
  2454. SHORTSUFFIX=lnx
  2455. endif
  2456. ifeq ($(OS_TARGET),dragonfly)
  2457. BATCHEXT=.sh
  2458. EXEEXT=
  2459. HASSHAREDLIB=1
  2460. SHORTSUFFIX=df
  2461. endif
  2462. ifeq ($(OS_TARGET),freebsd)
  2463. BATCHEXT=.sh
  2464. EXEEXT=
  2465. HASSHAREDLIB=1
  2466. SHORTSUFFIX=fbs
  2467. endif
  2468. ifeq ($(OS_TARGET),netbsd)
  2469. BATCHEXT=.sh
  2470. EXEEXT=
  2471. HASSHAREDLIB=1
  2472. SHORTSUFFIX=nbs
  2473. endif
  2474. ifeq ($(OS_TARGET),openbsd)
  2475. BATCHEXT=.sh
  2476. EXEEXT=
  2477. HASSHAREDLIB=1
  2478. SHORTSUFFIX=obs
  2479. endif
  2480. ifeq ($(OS_TARGET),win32)
  2481. SHAREDLIBEXT=.dll
  2482. SHORTSUFFIX=w32
  2483. endif
  2484. ifeq ($(OS_TARGET),os2)
  2485. BATCHEXT=.cmd
  2486. AOUTEXT=.out
  2487. STATICLIBPREFIX=
  2488. SHAREDLIBEXT=.dll
  2489. SHORTSUFFIX=os2
  2490. ECHO=echo
  2491. IMPORTLIBPREFIX=
  2492. endif
  2493. ifeq ($(OS_TARGET),emx)
  2494. BATCHEXT=.cmd
  2495. AOUTEXT=.out
  2496. STATICLIBPREFIX=
  2497. SHAREDLIBEXT=.dll
  2498. SHORTSUFFIX=emx
  2499. ECHO=echo
  2500. IMPORTLIBPREFIX=
  2501. endif
  2502. ifeq ($(OS_TARGET),amiga)
  2503. EXEEXT=
  2504. SHAREDLIBEXT=.library
  2505. SHORTSUFFIX=amg
  2506. endif
  2507. ifeq ($(OS_TARGET),aros)
  2508. EXEEXT=
  2509. SHAREDLIBEXT=.library
  2510. SHORTSUFFIX=aros
  2511. endif
  2512. ifeq ($(OS_TARGET),morphos)
  2513. EXEEXT=
  2514. SHAREDLIBEXT=.library
  2515. SHORTSUFFIX=mos
  2516. endif
  2517. ifeq ($(OS_TARGET),atari)
  2518. EXEEXT=.ttp
  2519. SHORTSUFFIX=ata
  2520. endif
  2521. ifeq ($(OS_TARGET),beos)
  2522. BATCHEXT=.sh
  2523. EXEEXT=
  2524. SHORTSUFFIX=be
  2525. endif
  2526. ifeq ($(OS_TARGET),haiku)
  2527. BATCHEXT=.sh
  2528. EXEEXT=
  2529. SHORTSUFFIX=hai
  2530. endif
  2531. ifeq ($(OS_TARGET),solaris)
  2532. BATCHEXT=.sh
  2533. EXEEXT=
  2534. SHORTSUFFIX=sun
  2535. endif
  2536. ifeq ($(OS_TARGET),qnx)
  2537. BATCHEXT=.sh
  2538. EXEEXT=
  2539. SHORTSUFFIX=qnx
  2540. endif
  2541. ifeq ($(OS_TARGET),netware)
  2542. EXEEXT=.nlm
  2543. STATICLIBPREFIX=
  2544. SHORTSUFFIX=nw
  2545. IMPORTLIBPREFIX=imp
  2546. endif
  2547. ifeq ($(OS_TARGET),netwlibc)
  2548. EXEEXT=.nlm
  2549. STATICLIBPREFIX=
  2550. SHORTSUFFIX=nwl
  2551. IMPORTLIBPREFIX=imp
  2552. endif
  2553. ifeq ($(OS_TARGET),macos)
  2554. BATCHEXT=
  2555. EXEEXT=
  2556. DEBUGSYMEXT=.xcoff
  2557. SHORTSUFFIX=mac
  2558. IMPORTLIBPREFIX=imp
  2559. endif
  2560. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  2561. BATCHEXT=.sh
  2562. EXEEXT=
  2563. HASSHAREDLIB=1
  2564. SHORTSUFFIX=dwn
  2565. EXEDBGEXT=.dSYM
  2566. endif
  2567. ifeq ($(OS_TARGET),gba)
  2568. EXEEXT=.gba
  2569. SHAREDLIBEXT=.so
  2570. SHORTSUFFIX=gba
  2571. endif
  2572. ifeq ($(OS_TARGET),symbian)
  2573. SHAREDLIBEXT=.dll
  2574. SHORTSUFFIX=symbian
  2575. endif
  2576. ifeq ($(OS_TARGET),NativeNT)
  2577. SHAREDLIBEXT=.dll
  2578. SHORTSUFFIX=nativent
  2579. endif
  2580. ifeq ($(OS_TARGET),wii)
  2581. EXEEXT=.dol
  2582. SHAREDLIBEXT=.so
  2583. SHORTSUFFIX=wii
  2584. endif
  2585. ifeq ($(OS_TARGET),aix)
  2586. BATCHEXT=.sh
  2587. EXEEXT=
  2588. SHAREDLIBEXT=.a
  2589. SHORTSUFFIX=aix
  2590. endif
  2591. ifeq ($(OS_TARGET),java)
  2592. OEXT=.class
  2593. ASMEXT=.j
  2594. SHAREDLIBEXT=.jar
  2595. SHORTSUFFIX=java
  2596. endif
  2597. ifeq ($(CPU_TARGET),jvm)
  2598. ifeq ($(OS_TARGET),android)
  2599. OEXT=.class
  2600. ASMEXT=.j
  2601. SHAREDLIBEXT=.jar
  2602. SHORTSUFFIX=android
  2603. endif
  2604. endif
  2605. ifeq ($(OS_TARGET),msdos)
  2606. STATICLIBPREFIX=
  2607. STATICLIBEXT=.a
  2608. SHORTSUFFIX=d16
  2609. endif
  2610. ifeq ($(OS_TARGET),msxdos)
  2611. STATICLIBPREFIX=
  2612. STATICLIBEXT=.a
  2613. SHORTSUFFIX=msd
  2614. endif
  2615. ifeq ($(OS_TARGET),embedded)
  2616. ifeq ($(CPU_TARGET),i8086)
  2617. STATICLIBPREFIX=
  2618. STATICLIBEXT=.a
  2619. else
  2620. EXEEXT=.bin
  2621. endif
  2622. ifeq ($(CPU_TARGET),z80)
  2623. OEXT=.rel
  2624. endif
  2625. SHORTSUFFIX=emb
  2626. endif
  2627. ifeq ($(OS_TARGET),win16)
  2628. STATICLIBPREFIX=
  2629. STATICLIBEXT=.a
  2630. SHAREDLIBEXT=.dll
  2631. SHORTSUFFIX=w16
  2632. endif
  2633. ifeq ($(OS_TARGET),zxspectrum)
  2634. OEXT=.rel
  2635. endif
  2636. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  2637. FPCMADE=fpcmade.$(SHORTSUFFIX)
  2638. ZIPSUFFIX=$(SHORTSUFFIX)
  2639. ZIPCROSSPREFIX=
  2640. ZIPSOURCESUFFIX=src
  2641. ZIPEXAMPLESUFFIX=exm
  2642. else
  2643. FPCMADE=fpcmade.$(TARGETSUFFIX)
  2644. ZIPSOURCESUFFIX=.source
  2645. ZIPEXAMPLESUFFIX=.examples
  2646. ifdef CROSSCOMPILE
  2647. ZIPSUFFIX=.$(SOURCESUFFIX)
  2648. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  2649. else
  2650. ZIPSUFFIX=.$(TARGETSUFFIX)
  2651. ZIPCROSSPREFIX=
  2652. endif
  2653. endif
  2654. ifndef ECHO
  2655. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  2656. ifeq ($(ECHO),)
  2657. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  2658. ifeq ($(ECHO),)
  2659. ECHO= __missing_command_ECHO
  2660. else
  2661. ECHO:=$(firstword $(ECHO))
  2662. endif
  2663. else
  2664. ECHO:=$(firstword $(ECHO))
  2665. endif
  2666. endif
  2667. export ECHO
  2668. ifndef DATE
  2669. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  2670. ifeq ($(DATE),)
  2671. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  2672. ifeq ($(DATE),)
  2673. DATE= __missing_command_DATE
  2674. else
  2675. DATE:=$(firstword $(DATE))
  2676. endif
  2677. else
  2678. DATE:=$(firstword $(DATE))
  2679. endif
  2680. endif
  2681. export DATE
  2682. ifndef GINSTALL
  2683. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  2684. ifeq ($(GINSTALL),)
  2685. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  2686. ifeq ($(GINSTALL),)
  2687. GINSTALL= __missing_command_GINSTALL
  2688. else
  2689. GINSTALL:=$(firstword $(GINSTALL))
  2690. endif
  2691. else
  2692. GINSTALL:=$(firstword $(GINSTALL))
  2693. endif
  2694. endif
  2695. export GINSTALL
  2696. ifndef CPPROG
  2697. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  2698. ifeq ($(CPPROG),)
  2699. CPPROG= __missing_command_CPPROG
  2700. else
  2701. CPPROG:=$(firstword $(CPPROG))
  2702. endif
  2703. endif
  2704. export CPPROG
  2705. ifndef RMPROG
  2706. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  2707. ifeq ($(RMPROG),)
  2708. RMPROG= __missing_command_RMPROG
  2709. else
  2710. RMPROG:=$(firstword $(RMPROG))
  2711. endif
  2712. endif
  2713. export RMPROG
  2714. ifndef MVPROG
  2715. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  2716. ifeq ($(MVPROG),)
  2717. MVPROG= __missing_command_MVPROG
  2718. else
  2719. MVPROG:=$(firstword $(MVPROG))
  2720. endif
  2721. endif
  2722. export MVPROG
  2723. ifndef MKDIRPROG
  2724. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2725. ifeq ($(MKDIRPROG),)
  2726. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2727. ifeq ($(MKDIRPROG),)
  2728. MKDIRPROG= __missing_command_MKDIRPROG
  2729. else
  2730. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2731. endif
  2732. else
  2733. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2734. endif
  2735. endif
  2736. export MKDIRPROG
  2737. ifndef ECHOREDIR
  2738. ifndef inUnix
  2739. ECHOREDIR=echo
  2740. else
  2741. ECHOREDIR=$(ECHO)
  2742. endif
  2743. endif
  2744. ifndef COPY
  2745. COPY:=$(CPPROG) -fp
  2746. endif
  2747. ifndef COPYTREE
  2748. COPYTREE:=$(CPPROG) -Rfp
  2749. endif
  2750. ifndef MKDIRTREE
  2751. MKDIRTREE:=$(MKDIRPROG) -p
  2752. endif
  2753. ifndef MOVE
  2754. MOVE:=$(MVPROG) -f
  2755. endif
  2756. ifndef DEL
  2757. DEL:=$(RMPROG) -f
  2758. endif
  2759. ifndef DELTREE
  2760. DELTREE:=$(RMPROG) -rf
  2761. endif
  2762. ifndef INSTALL
  2763. ifdef inUnix
  2764. INSTALL:=$(GINSTALL) -c -m 644
  2765. else
  2766. INSTALL:=$(COPY)
  2767. endif
  2768. endif
  2769. ifndef INSTALLEXE
  2770. ifdef inUnix
  2771. INSTALLEXE:=$(GINSTALL) -c -m 755
  2772. else
  2773. INSTALLEXE:=$(COPY)
  2774. endif
  2775. endif
  2776. ifndef MKDIR
  2777. MKDIR:=$(GINSTALL) -m 755 -d
  2778. endif
  2779. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  2780. ifndef PPUMOVE
  2781. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  2782. ifeq ($(PPUMOVE),)
  2783. PPUMOVE= __missing_command_PPUMOVE
  2784. else
  2785. PPUMOVE:=$(firstword $(PPUMOVE))
  2786. endif
  2787. endif
  2788. export PPUMOVE
  2789. ifndef FPCMAKE
  2790. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  2791. ifeq ($(FPCMAKE),)
  2792. FPCMAKE= __missing_command_FPCMAKE
  2793. else
  2794. FPCMAKE:=$(firstword $(FPCMAKE))
  2795. endif
  2796. endif
  2797. export FPCMAKE
  2798. ifndef ZIPPROG
  2799. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  2800. ifeq ($(ZIPPROG),)
  2801. ZIPPROG= __missing_command_ZIPPROG
  2802. else
  2803. ZIPPROG:=$(firstword $(ZIPPROG))
  2804. endif
  2805. endif
  2806. export ZIPPROG
  2807. ifndef TARPROG
  2808. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  2809. ifeq ($(TARPROG),)
  2810. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  2811. ifeq ($(TARPROG),)
  2812. TARPROG= __missing_command_TARPROG
  2813. else
  2814. TARPROG:=$(firstword $(TARPROG))
  2815. endif
  2816. else
  2817. TARPROG:=$(firstword $(TARPROG))
  2818. endif
  2819. endif
  2820. export TARPROG
  2821. ASNAME=$(BINUTILSPREFIX)as
  2822. LDNAME=$(BINUTILSPREFIX)ld
  2823. ARNAME=$(BINUTILSPREFIX)ar
  2824. RCNAME=$(BINUTILSPREFIX)rc
  2825. NASMNAME=$(BINUTILSPREFIX)nasm
  2826. ifndef ASPROG
  2827. ifdef CROSSBINDIR
  2828. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  2829. else
  2830. ASPROG=$(ASNAME)
  2831. endif
  2832. endif
  2833. ifndef LDPROG
  2834. ifdef CROSSBINDIR
  2835. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  2836. else
  2837. LDPROG=$(LDNAME)
  2838. endif
  2839. endif
  2840. ifndef RCPROG
  2841. ifdef CROSSBINDIR
  2842. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  2843. else
  2844. RCPROG=$(RCNAME)
  2845. endif
  2846. endif
  2847. ifndef ARPROG
  2848. ifdef CROSSBINDIR
  2849. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  2850. else
  2851. ARPROG=$(ARNAME)
  2852. endif
  2853. endif
  2854. ifndef NASMPROG
  2855. ifdef CROSSBINDIR
  2856. NASMPROG=$(CROSSBINDIR)/$(NASMNAME)$(SRCEXEEXT)
  2857. else
  2858. NASMPROG=$(NASMNAME)
  2859. endif
  2860. endif
  2861. AS=$(ASPROG)
  2862. LD=$(LDPROG)
  2863. RC=$(RCPROG)
  2864. AR=$(ARPROG)
  2865. NASM=$(NASMPROG)
  2866. ifdef inUnix
  2867. PPAS=./ppas$(SRCBATCHEXT)
  2868. else
  2869. PPAS=ppas$(SRCBATCHEXT)
  2870. endif
  2871. ifdef inUnix
  2872. LDCONFIG=ldconfig
  2873. else
  2874. LDCONFIG=
  2875. endif
  2876. ifdef DATE
  2877. DATESTR:=$(shell $(DATE) +%Y%m%d)
  2878. else
  2879. DATESTR=
  2880. endif
  2881. ZIPOPT=-9
  2882. ZIPEXT=.zip
  2883. ifeq ($(USETAR),bz2)
  2884. TAROPT=vj
  2885. TAREXT=.tar.bz2
  2886. else
  2887. TAROPT=vz
  2888. TAREXT=.tar.gz
  2889. endif
  2890. override REQUIRE_PACKAGES=libndsfpc
  2891. ifeq ($(FULL_TARGET),i386-linux)
  2892. REQUIRE_PACKAGES_RTL=1
  2893. REQUIRE_PACKAGES_PASZLIB=1
  2894. REQUIRE_PACKAGES_FCL-PROCESS=1
  2895. REQUIRE_PACKAGES_HASH=1
  2896. REQUIRE_PACKAGES_LIBTAR=1
  2897. REQUIRE_PACKAGES_FPMKUNIT=1
  2898. REQUIRE_PACKAGES_LIBNDSFPC=1
  2899. endif
  2900. ifeq ($(FULL_TARGET),i386-go32v2)
  2901. REQUIRE_PACKAGES_RTL=1
  2902. REQUIRE_PACKAGES_PASZLIB=1
  2903. REQUIRE_PACKAGES_FCL-PROCESS=1
  2904. REQUIRE_PACKAGES_HASH=1
  2905. REQUIRE_PACKAGES_LIBTAR=1
  2906. REQUIRE_PACKAGES_FPMKUNIT=1
  2907. REQUIRE_PACKAGES_LIBNDSFPC=1
  2908. endif
  2909. ifeq ($(FULL_TARGET),i386-win32)
  2910. REQUIRE_PACKAGES_RTL=1
  2911. REQUIRE_PACKAGES_PASZLIB=1
  2912. REQUIRE_PACKAGES_FCL-PROCESS=1
  2913. REQUIRE_PACKAGES_HASH=1
  2914. REQUIRE_PACKAGES_LIBTAR=1
  2915. REQUIRE_PACKAGES_FPMKUNIT=1
  2916. REQUIRE_PACKAGES_LIBNDSFPC=1
  2917. endif
  2918. ifeq ($(FULL_TARGET),i386-os2)
  2919. REQUIRE_PACKAGES_RTL=1
  2920. REQUIRE_PACKAGES_PASZLIB=1
  2921. REQUIRE_PACKAGES_FCL-PROCESS=1
  2922. REQUIRE_PACKAGES_HASH=1
  2923. REQUIRE_PACKAGES_LIBTAR=1
  2924. REQUIRE_PACKAGES_FPMKUNIT=1
  2925. REQUIRE_PACKAGES_LIBNDSFPC=1
  2926. endif
  2927. ifeq ($(FULL_TARGET),i386-freebsd)
  2928. REQUIRE_PACKAGES_RTL=1
  2929. REQUIRE_PACKAGES_PASZLIB=1
  2930. REQUIRE_PACKAGES_FCL-PROCESS=1
  2931. REQUIRE_PACKAGES_HASH=1
  2932. REQUIRE_PACKAGES_LIBTAR=1
  2933. REQUIRE_PACKAGES_FPMKUNIT=1
  2934. REQUIRE_PACKAGES_LIBNDSFPC=1
  2935. endif
  2936. ifeq ($(FULL_TARGET),i386-beos)
  2937. REQUIRE_PACKAGES_RTL=1
  2938. REQUIRE_PACKAGES_PASZLIB=1
  2939. REQUIRE_PACKAGES_FCL-PROCESS=1
  2940. REQUIRE_PACKAGES_HASH=1
  2941. REQUIRE_PACKAGES_LIBTAR=1
  2942. REQUIRE_PACKAGES_FPMKUNIT=1
  2943. REQUIRE_PACKAGES_LIBNDSFPC=1
  2944. endif
  2945. ifeq ($(FULL_TARGET),i386-haiku)
  2946. REQUIRE_PACKAGES_RTL=1
  2947. REQUIRE_PACKAGES_PASZLIB=1
  2948. REQUIRE_PACKAGES_FCL-PROCESS=1
  2949. REQUIRE_PACKAGES_HASH=1
  2950. REQUIRE_PACKAGES_LIBTAR=1
  2951. REQUIRE_PACKAGES_FPMKUNIT=1
  2952. REQUIRE_PACKAGES_LIBNDSFPC=1
  2953. endif
  2954. ifeq ($(FULL_TARGET),i386-netbsd)
  2955. REQUIRE_PACKAGES_RTL=1
  2956. REQUIRE_PACKAGES_PASZLIB=1
  2957. REQUIRE_PACKAGES_FCL-PROCESS=1
  2958. REQUIRE_PACKAGES_HASH=1
  2959. REQUIRE_PACKAGES_LIBTAR=1
  2960. REQUIRE_PACKAGES_FPMKUNIT=1
  2961. REQUIRE_PACKAGES_LIBNDSFPC=1
  2962. endif
  2963. ifeq ($(FULL_TARGET),i386-solaris)
  2964. REQUIRE_PACKAGES_RTL=1
  2965. REQUIRE_PACKAGES_PASZLIB=1
  2966. REQUIRE_PACKAGES_FCL-PROCESS=1
  2967. REQUIRE_PACKAGES_HASH=1
  2968. REQUIRE_PACKAGES_LIBTAR=1
  2969. REQUIRE_PACKAGES_FPMKUNIT=1
  2970. REQUIRE_PACKAGES_LIBNDSFPC=1
  2971. endif
  2972. ifeq ($(FULL_TARGET),i386-netware)
  2973. REQUIRE_PACKAGES_RTL=1
  2974. REQUIRE_PACKAGES_PASZLIB=1
  2975. REQUIRE_PACKAGES_FCL-PROCESS=1
  2976. REQUIRE_PACKAGES_HASH=1
  2977. REQUIRE_PACKAGES_LIBTAR=1
  2978. REQUIRE_PACKAGES_FPMKUNIT=1
  2979. REQUIRE_PACKAGES_LIBNDSFPC=1
  2980. endif
  2981. ifeq ($(FULL_TARGET),i386-openbsd)
  2982. REQUIRE_PACKAGES_RTL=1
  2983. REQUIRE_PACKAGES_PASZLIB=1
  2984. REQUIRE_PACKAGES_FCL-PROCESS=1
  2985. REQUIRE_PACKAGES_HASH=1
  2986. REQUIRE_PACKAGES_LIBTAR=1
  2987. REQUIRE_PACKAGES_FPMKUNIT=1
  2988. REQUIRE_PACKAGES_LIBNDSFPC=1
  2989. endif
  2990. ifeq ($(FULL_TARGET),i386-wdosx)
  2991. REQUIRE_PACKAGES_RTL=1
  2992. REQUIRE_PACKAGES_PASZLIB=1
  2993. REQUIRE_PACKAGES_FCL-PROCESS=1
  2994. REQUIRE_PACKAGES_HASH=1
  2995. REQUIRE_PACKAGES_LIBTAR=1
  2996. REQUIRE_PACKAGES_FPMKUNIT=1
  2997. REQUIRE_PACKAGES_LIBNDSFPC=1
  2998. endif
  2999. ifeq ($(FULL_TARGET),i386-darwin)
  3000. REQUIRE_PACKAGES_RTL=1
  3001. REQUIRE_PACKAGES_PASZLIB=1
  3002. REQUIRE_PACKAGES_FCL-PROCESS=1
  3003. REQUIRE_PACKAGES_HASH=1
  3004. REQUIRE_PACKAGES_LIBTAR=1
  3005. REQUIRE_PACKAGES_FPMKUNIT=1
  3006. REQUIRE_PACKAGES_LIBNDSFPC=1
  3007. endif
  3008. ifeq ($(FULL_TARGET),i386-emx)
  3009. REQUIRE_PACKAGES_RTL=1
  3010. REQUIRE_PACKAGES_PASZLIB=1
  3011. REQUIRE_PACKAGES_FCL-PROCESS=1
  3012. REQUIRE_PACKAGES_HASH=1
  3013. REQUIRE_PACKAGES_LIBTAR=1
  3014. REQUIRE_PACKAGES_FPMKUNIT=1
  3015. REQUIRE_PACKAGES_LIBNDSFPC=1
  3016. endif
  3017. ifeq ($(FULL_TARGET),i386-watcom)
  3018. REQUIRE_PACKAGES_RTL=1
  3019. REQUIRE_PACKAGES_PASZLIB=1
  3020. REQUIRE_PACKAGES_FCL-PROCESS=1
  3021. REQUIRE_PACKAGES_HASH=1
  3022. REQUIRE_PACKAGES_LIBTAR=1
  3023. REQUIRE_PACKAGES_FPMKUNIT=1
  3024. REQUIRE_PACKAGES_LIBNDSFPC=1
  3025. endif
  3026. ifeq ($(FULL_TARGET),i386-netwlibc)
  3027. REQUIRE_PACKAGES_RTL=1
  3028. REQUIRE_PACKAGES_PASZLIB=1
  3029. REQUIRE_PACKAGES_FCL-PROCESS=1
  3030. REQUIRE_PACKAGES_HASH=1
  3031. REQUIRE_PACKAGES_LIBTAR=1
  3032. REQUIRE_PACKAGES_FPMKUNIT=1
  3033. REQUIRE_PACKAGES_LIBNDSFPC=1
  3034. endif
  3035. ifeq ($(FULL_TARGET),i386-wince)
  3036. REQUIRE_PACKAGES_RTL=1
  3037. REQUIRE_PACKAGES_PASZLIB=1
  3038. REQUIRE_PACKAGES_FCL-PROCESS=1
  3039. REQUIRE_PACKAGES_HASH=1
  3040. REQUIRE_PACKAGES_LIBTAR=1
  3041. REQUIRE_PACKAGES_FPMKUNIT=1
  3042. REQUIRE_PACKAGES_LIBNDSFPC=1
  3043. endif
  3044. ifeq ($(FULL_TARGET),i386-embedded)
  3045. REQUIRE_PACKAGES_RTL=1
  3046. REQUIRE_PACKAGES_PASZLIB=1
  3047. REQUIRE_PACKAGES_FCL-PROCESS=1
  3048. REQUIRE_PACKAGES_HASH=1
  3049. REQUIRE_PACKAGES_LIBTAR=1
  3050. REQUIRE_PACKAGES_FPMKUNIT=1
  3051. REQUIRE_PACKAGES_LIBNDSFPC=1
  3052. endif
  3053. ifeq ($(FULL_TARGET),i386-symbian)
  3054. REQUIRE_PACKAGES_RTL=1
  3055. REQUIRE_PACKAGES_PASZLIB=1
  3056. REQUIRE_PACKAGES_FCL-PROCESS=1
  3057. REQUIRE_PACKAGES_HASH=1
  3058. REQUIRE_PACKAGES_LIBTAR=1
  3059. REQUIRE_PACKAGES_FPMKUNIT=1
  3060. REQUIRE_PACKAGES_LIBNDSFPC=1
  3061. endif
  3062. ifeq ($(FULL_TARGET),i386-nativent)
  3063. REQUIRE_PACKAGES_RTL=1
  3064. REQUIRE_PACKAGES_PASZLIB=1
  3065. REQUIRE_PACKAGES_FCL-PROCESS=1
  3066. REQUIRE_PACKAGES_HASH=1
  3067. REQUIRE_PACKAGES_LIBTAR=1
  3068. REQUIRE_PACKAGES_FPMKUNIT=1
  3069. REQUIRE_PACKAGES_LIBNDSFPC=1
  3070. endif
  3071. ifeq ($(FULL_TARGET),i386-iphonesim)
  3072. REQUIRE_PACKAGES_RTL=1
  3073. REQUIRE_PACKAGES_PASZLIB=1
  3074. REQUIRE_PACKAGES_FCL-PROCESS=1
  3075. REQUIRE_PACKAGES_HASH=1
  3076. REQUIRE_PACKAGES_LIBTAR=1
  3077. REQUIRE_PACKAGES_FPMKUNIT=1
  3078. REQUIRE_PACKAGES_LIBNDSFPC=1
  3079. endif
  3080. ifeq ($(FULL_TARGET),i386-android)
  3081. REQUIRE_PACKAGES_RTL=1
  3082. REQUIRE_PACKAGES_PASZLIB=1
  3083. REQUIRE_PACKAGES_FCL-PROCESS=1
  3084. REQUIRE_PACKAGES_HASH=1
  3085. REQUIRE_PACKAGES_LIBTAR=1
  3086. REQUIRE_PACKAGES_FPMKUNIT=1
  3087. REQUIRE_PACKAGES_LIBNDSFPC=1
  3088. endif
  3089. ifeq ($(FULL_TARGET),i386-aros)
  3090. REQUIRE_PACKAGES_RTL=1
  3091. REQUIRE_PACKAGES_PASZLIB=1
  3092. REQUIRE_PACKAGES_FCL-PROCESS=1
  3093. REQUIRE_PACKAGES_HASH=1
  3094. REQUIRE_PACKAGES_LIBTAR=1
  3095. REQUIRE_PACKAGES_FPMKUNIT=1
  3096. REQUIRE_PACKAGES_LIBNDSFPC=1
  3097. endif
  3098. ifeq ($(FULL_TARGET),m68k-linux)
  3099. REQUIRE_PACKAGES_RTL=1
  3100. REQUIRE_PACKAGES_PASZLIB=1
  3101. REQUIRE_PACKAGES_FCL-PROCESS=1
  3102. REQUIRE_PACKAGES_HASH=1
  3103. REQUIRE_PACKAGES_LIBTAR=1
  3104. REQUIRE_PACKAGES_FPMKUNIT=1
  3105. REQUIRE_PACKAGES_LIBNDSFPC=1
  3106. endif
  3107. ifeq ($(FULL_TARGET),m68k-netbsd)
  3108. REQUIRE_PACKAGES_RTL=1
  3109. REQUIRE_PACKAGES_PASZLIB=1
  3110. REQUIRE_PACKAGES_FCL-PROCESS=1
  3111. REQUIRE_PACKAGES_HASH=1
  3112. REQUIRE_PACKAGES_LIBTAR=1
  3113. REQUIRE_PACKAGES_FPMKUNIT=1
  3114. REQUIRE_PACKAGES_LIBNDSFPC=1
  3115. endif
  3116. ifeq ($(FULL_TARGET),m68k-amiga)
  3117. REQUIRE_PACKAGES_RTL=1
  3118. REQUIRE_PACKAGES_PASZLIB=1
  3119. REQUIRE_PACKAGES_FCL-PROCESS=1
  3120. REQUIRE_PACKAGES_HASH=1
  3121. REQUIRE_PACKAGES_LIBTAR=1
  3122. REQUIRE_PACKAGES_FPMKUNIT=1
  3123. REQUIRE_PACKAGES_LIBNDSFPC=1
  3124. endif
  3125. ifeq ($(FULL_TARGET),m68k-atari)
  3126. REQUIRE_PACKAGES_RTL=1
  3127. REQUIRE_PACKAGES_PASZLIB=1
  3128. REQUIRE_PACKAGES_FCL-PROCESS=1
  3129. REQUIRE_PACKAGES_HASH=1
  3130. REQUIRE_PACKAGES_LIBTAR=1
  3131. REQUIRE_PACKAGES_FPMKUNIT=1
  3132. REQUIRE_PACKAGES_LIBNDSFPC=1
  3133. endif
  3134. ifeq ($(FULL_TARGET),m68k-palmos)
  3135. REQUIRE_PACKAGES_RTL=1
  3136. REQUIRE_PACKAGES_PASZLIB=1
  3137. REQUIRE_PACKAGES_FCL-PROCESS=1
  3138. REQUIRE_PACKAGES_HASH=1
  3139. REQUIRE_PACKAGES_LIBTAR=1
  3140. REQUIRE_PACKAGES_FPMKUNIT=1
  3141. REQUIRE_PACKAGES_LIBNDSFPC=1
  3142. endif
  3143. ifeq ($(FULL_TARGET),m68k-macos)
  3144. REQUIRE_PACKAGES_RTL=1
  3145. REQUIRE_PACKAGES_PASZLIB=1
  3146. REQUIRE_PACKAGES_FCL-PROCESS=1
  3147. REQUIRE_PACKAGES_HASH=1
  3148. REQUIRE_PACKAGES_LIBTAR=1
  3149. REQUIRE_PACKAGES_FPMKUNIT=1
  3150. REQUIRE_PACKAGES_LIBNDSFPC=1
  3151. endif
  3152. ifeq ($(FULL_TARGET),m68k-embedded)
  3153. REQUIRE_PACKAGES_RTL=1
  3154. REQUIRE_PACKAGES_PASZLIB=1
  3155. REQUIRE_PACKAGES_FCL-PROCESS=1
  3156. REQUIRE_PACKAGES_HASH=1
  3157. REQUIRE_PACKAGES_LIBTAR=1
  3158. REQUIRE_PACKAGES_FPMKUNIT=1
  3159. REQUIRE_PACKAGES_LIBNDSFPC=1
  3160. endif
  3161. ifeq ($(FULL_TARGET),powerpc-linux)
  3162. REQUIRE_PACKAGES_RTL=1
  3163. REQUIRE_PACKAGES_PASZLIB=1
  3164. REQUIRE_PACKAGES_FCL-PROCESS=1
  3165. REQUIRE_PACKAGES_HASH=1
  3166. REQUIRE_PACKAGES_LIBTAR=1
  3167. REQUIRE_PACKAGES_FPMKUNIT=1
  3168. REQUIRE_PACKAGES_LIBNDSFPC=1
  3169. endif
  3170. ifeq ($(FULL_TARGET),powerpc-netbsd)
  3171. REQUIRE_PACKAGES_RTL=1
  3172. REQUIRE_PACKAGES_PASZLIB=1
  3173. REQUIRE_PACKAGES_FCL-PROCESS=1
  3174. REQUIRE_PACKAGES_HASH=1
  3175. REQUIRE_PACKAGES_LIBTAR=1
  3176. REQUIRE_PACKAGES_FPMKUNIT=1
  3177. REQUIRE_PACKAGES_LIBNDSFPC=1
  3178. endif
  3179. ifeq ($(FULL_TARGET),powerpc-amiga)
  3180. REQUIRE_PACKAGES_RTL=1
  3181. REQUIRE_PACKAGES_PASZLIB=1
  3182. REQUIRE_PACKAGES_FCL-PROCESS=1
  3183. REQUIRE_PACKAGES_HASH=1
  3184. REQUIRE_PACKAGES_LIBTAR=1
  3185. REQUIRE_PACKAGES_FPMKUNIT=1
  3186. REQUIRE_PACKAGES_LIBNDSFPC=1
  3187. endif
  3188. ifeq ($(FULL_TARGET),powerpc-macos)
  3189. REQUIRE_PACKAGES_RTL=1
  3190. REQUIRE_PACKAGES_PASZLIB=1
  3191. REQUIRE_PACKAGES_FCL-PROCESS=1
  3192. REQUIRE_PACKAGES_HASH=1
  3193. REQUIRE_PACKAGES_LIBTAR=1
  3194. REQUIRE_PACKAGES_FPMKUNIT=1
  3195. REQUIRE_PACKAGES_LIBNDSFPC=1
  3196. endif
  3197. ifeq ($(FULL_TARGET),powerpc-darwin)
  3198. REQUIRE_PACKAGES_RTL=1
  3199. REQUIRE_PACKAGES_PASZLIB=1
  3200. REQUIRE_PACKAGES_FCL-PROCESS=1
  3201. REQUIRE_PACKAGES_HASH=1
  3202. REQUIRE_PACKAGES_LIBTAR=1
  3203. REQUIRE_PACKAGES_FPMKUNIT=1
  3204. REQUIRE_PACKAGES_LIBNDSFPC=1
  3205. endif
  3206. ifeq ($(FULL_TARGET),powerpc-morphos)
  3207. REQUIRE_PACKAGES_RTL=1
  3208. REQUIRE_PACKAGES_PASZLIB=1
  3209. REQUIRE_PACKAGES_FCL-PROCESS=1
  3210. REQUIRE_PACKAGES_HASH=1
  3211. REQUIRE_PACKAGES_LIBTAR=1
  3212. REQUIRE_PACKAGES_FPMKUNIT=1
  3213. REQUIRE_PACKAGES_LIBNDSFPC=1
  3214. endif
  3215. ifeq ($(FULL_TARGET),powerpc-embedded)
  3216. REQUIRE_PACKAGES_RTL=1
  3217. REQUIRE_PACKAGES_PASZLIB=1
  3218. REQUIRE_PACKAGES_FCL-PROCESS=1
  3219. REQUIRE_PACKAGES_HASH=1
  3220. REQUIRE_PACKAGES_LIBTAR=1
  3221. REQUIRE_PACKAGES_FPMKUNIT=1
  3222. REQUIRE_PACKAGES_LIBNDSFPC=1
  3223. endif
  3224. ifeq ($(FULL_TARGET),powerpc-wii)
  3225. REQUIRE_PACKAGES_RTL=1
  3226. REQUIRE_PACKAGES_PASZLIB=1
  3227. REQUIRE_PACKAGES_FCL-PROCESS=1
  3228. REQUIRE_PACKAGES_HASH=1
  3229. REQUIRE_PACKAGES_LIBTAR=1
  3230. REQUIRE_PACKAGES_FPMKUNIT=1
  3231. REQUIRE_PACKAGES_LIBNDSFPC=1
  3232. endif
  3233. ifeq ($(FULL_TARGET),powerpc-aix)
  3234. REQUIRE_PACKAGES_RTL=1
  3235. REQUIRE_PACKAGES_PASZLIB=1
  3236. REQUIRE_PACKAGES_FCL-PROCESS=1
  3237. REQUIRE_PACKAGES_HASH=1
  3238. REQUIRE_PACKAGES_LIBTAR=1
  3239. REQUIRE_PACKAGES_FPMKUNIT=1
  3240. REQUIRE_PACKAGES_LIBNDSFPC=1
  3241. endif
  3242. ifeq ($(FULL_TARGET),sparc-linux)
  3243. REQUIRE_PACKAGES_RTL=1
  3244. REQUIRE_PACKAGES_PASZLIB=1
  3245. REQUIRE_PACKAGES_FCL-PROCESS=1
  3246. REQUIRE_PACKAGES_HASH=1
  3247. REQUIRE_PACKAGES_LIBTAR=1
  3248. REQUIRE_PACKAGES_FPMKUNIT=1
  3249. REQUIRE_PACKAGES_LIBNDSFPC=1
  3250. endif
  3251. ifeq ($(FULL_TARGET),sparc-netbsd)
  3252. REQUIRE_PACKAGES_RTL=1
  3253. REQUIRE_PACKAGES_PASZLIB=1
  3254. REQUIRE_PACKAGES_FCL-PROCESS=1
  3255. REQUIRE_PACKAGES_HASH=1
  3256. REQUIRE_PACKAGES_LIBTAR=1
  3257. REQUIRE_PACKAGES_FPMKUNIT=1
  3258. REQUIRE_PACKAGES_LIBNDSFPC=1
  3259. endif
  3260. ifeq ($(FULL_TARGET),sparc-solaris)
  3261. REQUIRE_PACKAGES_RTL=1
  3262. REQUIRE_PACKAGES_PASZLIB=1
  3263. REQUIRE_PACKAGES_FCL-PROCESS=1
  3264. REQUIRE_PACKAGES_HASH=1
  3265. REQUIRE_PACKAGES_LIBTAR=1
  3266. REQUIRE_PACKAGES_FPMKUNIT=1
  3267. REQUIRE_PACKAGES_LIBNDSFPC=1
  3268. endif
  3269. ifeq ($(FULL_TARGET),sparc-embedded)
  3270. REQUIRE_PACKAGES_RTL=1
  3271. REQUIRE_PACKAGES_PASZLIB=1
  3272. REQUIRE_PACKAGES_FCL-PROCESS=1
  3273. REQUIRE_PACKAGES_HASH=1
  3274. REQUIRE_PACKAGES_LIBTAR=1
  3275. REQUIRE_PACKAGES_FPMKUNIT=1
  3276. REQUIRE_PACKAGES_LIBNDSFPC=1
  3277. endif
  3278. ifeq ($(FULL_TARGET),x86_64-linux)
  3279. REQUIRE_PACKAGES_RTL=1
  3280. REQUIRE_PACKAGES_PASZLIB=1
  3281. REQUIRE_PACKAGES_FCL-PROCESS=1
  3282. REQUIRE_PACKAGES_HASH=1
  3283. REQUIRE_PACKAGES_LIBTAR=1
  3284. REQUIRE_PACKAGES_FPMKUNIT=1
  3285. REQUIRE_PACKAGES_LIBNDSFPC=1
  3286. endif
  3287. ifeq ($(FULL_TARGET),x86_64-freebsd)
  3288. REQUIRE_PACKAGES_RTL=1
  3289. REQUIRE_PACKAGES_PASZLIB=1
  3290. REQUIRE_PACKAGES_FCL-PROCESS=1
  3291. REQUIRE_PACKAGES_HASH=1
  3292. REQUIRE_PACKAGES_LIBTAR=1
  3293. REQUIRE_PACKAGES_FPMKUNIT=1
  3294. REQUIRE_PACKAGES_LIBNDSFPC=1
  3295. endif
  3296. ifeq ($(FULL_TARGET),x86_64-haiku)
  3297. REQUIRE_PACKAGES_RTL=1
  3298. REQUIRE_PACKAGES_PASZLIB=1
  3299. REQUIRE_PACKAGES_FCL-PROCESS=1
  3300. REQUIRE_PACKAGES_HASH=1
  3301. REQUIRE_PACKAGES_LIBTAR=1
  3302. REQUIRE_PACKAGES_FPMKUNIT=1
  3303. REQUIRE_PACKAGES_LIBNDSFPC=1
  3304. endif
  3305. ifeq ($(FULL_TARGET),x86_64-netbsd)
  3306. REQUIRE_PACKAGES_RTL=1
  3307. REQUIRE_PACKAGES_PASZLIB=1
  3308. REQUIRE_PACKAGES_FCL-PROCESS=1
  3309. REQUIRE_PACKAGES_HASH=1
  3310. REQUIRE_PACKAGES_LIBTAR=1
  3311. REQUIRE_PACKAGES_FPMKUNIT=1
  3312. REQUIRE_PACKAGES_LIBNDSFPC=1
  3313. endif
  3314. ifeq ($(FULL_TARGET),x86_64-solaris)
  3315. REQUIRE_PACKAGES_RTL=1
  3316. REQUIRE_PACKAGES_PASZLIB=1
  3317. REQUIRE_PACKAGES_FCL-PROCESS=1
  3318. REQUIRE_PACKAGES_HASH=1
  3319. REQUIRE_PACKAGES_LIBTAR=1
  3320. REQUIRE_PACKAGES_FPMKUNIT=1
  3321. REQUIRE_PACKAGES_LIBNDSFPC=1
  3322. endif
  3323. ifeq ($(FULL_TARGET),x86_64-openbsd)
  3324. REQUIRE_PACKAGES_RTL=1
  3325. REQUIRE_PACKAGES_PASZLIB=1
  3326. REQUIRE_PACKAGES_FCL-PROCESS=1
  3327. REQUIRE_PACKAGES_HASH=1
  3328. REQUIRE_PACKAGES_LIBTAR=1
  3329. REQUIRE_PACKAGES_FPMKUNIT=1
  3330. REQUIRE_PACKAGES_LIBNDSFPC=1
  3331. endif
  3332. ifeq ($(FULL_TARGET),x86_64-darwin)
  3333. REQUIRE_PACKAGES_RTL=1
  3334. REQUIRE_PACKAGES_PASZLIB=1
  3335. REQUIRE_PACKAGES_FCL-PROCESS=1
  3336. REQUIRE_PACKAGES_HASH=1
  3337. REQUIRE_PACKAGES_LIBTAR=1
  3338. REQUIRE_PACKAGES_FPMKUNIT=1
  3339. REQUIRE_PACKAGES_LIBNDSFPC=1
  3340. endif
  3341. ifeq ($(FULL_TARGET),x86_64-win64)
  3342. REQUIRE_PACKAGES_RTL=1
  3343. REQUIRE_PACKAGES_PASZLIB=1
  3344. REQUIRE_PACKAGES_FCL-PROCESS=1
  3345. REQUIRE_PACKAGES_HASH=1
  3346. REQUIRE_PACKAGES_LIBTAR=1
  3347. REQUIRE_PACKAGES_FPMKUNIT=1
  3348. REQUIRE_PACKAGES_LIBNDSFPC=1
  3349. endif
  3350. ifeq ($(FULL_TARGET),x86_64-embedded)
  3351. REQUIRE_PACKAGES_RTL=1
  3352. REQUIRE_PACKAGES_PASZLIB=1
  3353. REQUIRE_PACKAGES_FCL-PROCESS=1
  3354. REQUIRE_PACKAGES_HASH=1
  3355. REQUIRE_PACKAGES_LIBTAR=1
  3356. REQUIRE_PACKAGES_FPMKUNIT=1
  3357. REQUIRE_PACKAGES_LIBNDSFPC=1
  3358. endif
  3359. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  3360. REQUIRE_PACKAGES_RTL=1
  3361. REQUIRE_PACKAGES_PASZLIB=1
  3362. REQUIRE_PACKAGES_FCL-PROCESS=1
  3363. REQUIRE_PACKAGES_HASH=1
  3364. REQUIRE_PACKAGES_LIBTAR=1
  3365. REQUIRE_PACKAGES_FPMKUNIT=1
  3366. REQUIRE_PACKAGES_LIBNDSFPC=1
  3367. endif
  3368. ifeq ($(FULL_TARGET),x86_64-android)
  3369. REQUIRE_PACKAGES_RTL=1
  3370. REQUIRE_PACKAGES_PASZLIB=1
  3371. REQUIRE_PACKAGES_FCL-PROCESS=1
  3372. REQUIRE_PACKAGES_HASH=1
  3373. REQUIRE_PACKAGES_LIBTAR=1
  3374. REQUIRE_PACKAGES_FPMKUNIT=1
  3375. REQUIRE_PACKAGES_LIBNDSFPC=1
  3376. endif
  3377. ifeq ($(FULL_TARGET),x86_64-aros)
  3378. REQUIRE_PACKAGES_RTL=1
  3379. REQUIRE_PACKAGES_PASZLIB=1
  3380. REQUIRE_PACKAGES_FCL-PROCESS=1
  3381. REQUIRE_PACKAGES_HASH=1
  3382. REQUIRE_PACKAGES_LIBTAR=1
  3383. REQUIRE_PACKAGES_FPMKUNIT=1
  3384. REQUIRE_PACKAGES_LIBNDSFPC=1
  3385. endif
  3386. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  3387. REQUIRE_PACKAGES_RTL=1
  3388. REQUIRE_PACKAGES_PASZLIB=1
  3389. REQUIRE_PACKAGES_FCL-PROCESS=1
  3390. REQUIRE_PACKAGES_HASH=1
  3391. REQUIRE_PACKAGES_LIBTAR=1
  3392. REQUIRE_PACKAGES_FPMKUNIT=1
  3393. REQUIRE_PACKAGES_LIBNDSFPC=1
  3394. endif
  3395. ifeq ($(FULL_TARGET),arm-linux)
  3396. REQUIRE_PACKAGES_RTL=1
  3397. REQUIRE_PACKAGES_PASZLIB=1
  3398. REQUIRE_PACKAGES_FCL-PROCESS=1
  3399. REQUIRE_PACKAGES_HASH=1
  3400. REQUIRE_PACKAGES_LIBTAR=1
  3401. REQUIRE_PACKAGES_FPMKUNIT=1
  3402. REQUIRE_PACKAGES_LIBNDSFPC=1
  3403. endif
  3404. ifeq ($(FULL_TARGET),arm-netbsd)
  3405. REQUIRE_PACKAGES_RTL=1
  3406. REQUIRE_PACKAGES_PASZLIB=1
  3407. REQUIRE_PACKAGES_FCL-PROCESS=1
  3408. REQUIRE_PACKAGES_HASH=1
  3409. REQUIRE_PACKAGES_LIBTAR=1
  3410. REQUIRE_PACKAGES_FPMKUNIT=1
  3411. REQUIRE_PACKAGES_LIBNDSFPC=1
  3412. endif
  3413. ifeq ($(FULL_TARGET),arm-palmos)
  3414. REQUIRE_PACKAGES_RTL=1
  3415. REQUIRE_PACKAGES_PASZLIB=1
  3416. REQUIRE_PACKAGES_FCL-PROCESS=1
  3417. REQUIRE_PACKAGES_HASH=1
  3418. REQUIRE_PACKAGES_LIBTAR=1
  3419. REQUIRE_PACKAGES_FPMKUNIT=1
  3420. REQUIRE_PACKAGES_LIBNDSFPC=1
  3421. endif
  3422. ifeq ($(FULL_TARGET),arm-darwin)
  3423. REQUIRE_PACKAGES_RTL=1
  3424. REQUIRE_PACKAGES_PASZLIB=1
  3425. REQUIRE_PACKAGES_FCL-PROCESS=1
  3426. REQUIRE_PACKAGES_HASH=1
  3427. REQUIRE_PACKAGES_LIBTAR=1
  3428. REQUIRE_PACKAGES_FPMKUNIT=1
  3429. REQUIRE_PACKAGES_LIBNDSFPC=1
  3430. endif
  3431. ifeq ($(FULL_TARGET),arm-wince)
  3432. REQUIRE_PACKAGES_RTL=1
  3433. REQUIRE_PACKAGES_PASZLIB=1
  3434. REQUIRE_PACKAGES_FCL-PROCESS=1
  3435. REQUIRE_PACKAGES_HASH=1
  3436. REQUIRE_PACKAGES_LIBTAR=1
  3437. REQUIRE_PACKAGES_FPMKUNIT=1
  3438. REQUIRE_PACKAGES_LIBNDSFPC=1
  3439. endif
  3440. ifeq ($(FULL_TARGET),arm-gba)
  3441. REQUIRE_PACKAGES_RTL=1
  3442. REQUIRE_PACKAGES_PASZLIB=1
  3443. REQUIRE_PACKAGES_FCL-PROCESS=1
  3444. REQUIRE_PACKAGES_HASH=1
  3445. REQUIRE_PACKAGES_LIBTAR=1
  3446. REQUIRE_PACKAGES_FPMKUNIT=1
  3447. REQUIRE_PACKAGES_LIBNDSFPC=1
  3448. endif
  3449. ifeq ($(FULL_TARGET),arm-nds)
  3450. REQUIRE_PACKAGES_RTL=1
  3451. REQUIRE_PACKAGES_PASZLIB=1
  3452. REQUIRE_PACKAGES_FCL-PROCESS=1
  3453. REQUIRE_PACKAGES_HASH=1
  3454. REQUIRE_PACKAGES_LIBTAR=1
  3455. REQUIRE_PACKAGES_FPMKUNIT=1
  3456. REQUIRE_PACKAGES_LIBNDSFPC=1
  3457. endif
  3458. ifeq ($(FULL_TARGET),arm-embedded)
  3459. REQUIRE_PACKAGES_RTL=1
  3460. REQUIRE_PACKAGES_PASZLIB=1
  3461. REQUIRE_PACKAGES_FCL-PROCESS=1
  3462. REQUIRE_PACKAGES_HASH=1
  3463. REQUIRE_PACKAGES_LIBTAR=1
  3464. REQUIRE_PACKAGES_FPMKUNIT=1
  3465. REQUIRE_PACKAGES_LIBNDSFPC=1
  3466. endif
  3467. ifeq ($(FULL_TARGET),arm-symbian)
  3468. REQUIRE_PACKAGES_RTL=1
  3469. REQUIRE_PACKAGES_PASZLIB=1
  3470. REQUIRE_PACKAGES_FCL-PROCESS=1
  3471. REQUIRE_PACKAGES_HASH=1
  3472. REQUIRE_PACKAGES_LIBTAR=1
  3473. REQUIRE_PACKAGES_FPMKUNIT=1
  3474. REQUIRE_PACKAGES_LIBNDSFPC=1
  3475. endif
  3476. ifeq ($(FULL_TARGET),arm-android)
  3477. REQUIRE_PACKAGES_RTL=1
  3478. REQUIRE_PACKAGES_PASZLIB=1
  3479. REQUIRE_PACKAGES_FCL-PROCESS=1
  3480. REQUIRE_PACKAGES_HASH=1
  3481. REQUIRE_PACKAGES_LIBTAR=1
  3482. REQUIRE_PACKAGES_FPMKUNIT=1
  3483. REQUIRE_PACKAGES_LIBNDSFPC=1
  3484. endif
  3485. ifeq ($(FULL_TARGET),arm-aros)
  3486. REQUIRE_PACKAGES_RTL=1
  3487. REQUIRE_PACKAGES_PASZLIB=1
  3488. REQUIRE_PACKAGES_FCL-PROCESS=1
  3489. REQUIRE_PACKAGES_HASH=1
  3490. REQUIRE_PACKAGES_LIBTAR=1
  3491. REQUIRE_PACKAGES_FPMKUNIT=1
  3492. REQUIRE_PACKAGES_LIBNDSFPC=1
  3493. endif
  3494. ifeq ($(FULL_TARGET),arm-freertos)
  3495. REQUIRE_PACKAGES_RTL=1
  3496. REQUIRE_PACKAGES_PASZLIB=1
  3497. REQUIRE_PACKAGES_FCL-PROCESS=1
  3498. REQUIRE_PACKAGES_HASH=1
  3499. REQUIRE_PACKAGES_LIBTAR=1
  3500. REQUIRE_PACKAGES_FPMKUNIT=1
  3501. REQUIRE_PACKAGES_LIBNDSFPC=1
  3502. endif
  3503. ifeq ($(FULL_TARGET),powerpc64-linux)
  3504. REQUIRE_PACKAGES_RTL=1
  3505. REQUIRE_PACKAGES_PASZLIB=1
  3506. REQUIRE_PACKAGES_FCL-PROCESS=1
  3507. REQUIRE_PACKAGES_HASH=1
  3508. REQUIRE_PACKAGES_LIBTAR=1
  3509. REQUIRE_PACKAGES_FPMKUNIT=1
  3510. REQUIRE_PACKAGES_LIBNDSFPC=1
  3511. endif
  3512. ifeq ($(FULL_TARGET),powerpc64-darwin)
  3513. REQUIRE_PACKAGES_RTL=1
  3514. REQUIRE_PACKAGES_PASZLIB=1
  3515. REQUIRE_PACKAGES_FCL-PROCESS=1
  3516. REQUIRE_PACKAGES_HASH=1
  3517. REQUIRE_PACKAGES_LIBTAR=1
  3518. REQUIRE_PACKAGES_FPMKUNIT=1
  3519. REQUIRE_PACKAGES_LIBNDSFPC=1
  3520. endif
  3521. ifeq ($(FULL_TARGET),powerpc64-embedded)
  3522. REQUIRE_PACKAGES_RTL=1
  3523. REQUIRE_PACKAGES_PASZLIB=1
  3524. REQUIRE_PACKAGES_FCL-PROCESS=1
  3525. REQUIRE_PACKAGES_HASH=1
  3526. REQUIRE_PACKAGES_LIBTAR=1
  3527. REQUIRE_PACKAGES_FPMKUNIT=1
  3528. REQUIRE_PACKAGES_LIBNDSFPC=1
  3529. endif
  3530. ifeq ($(FULL_TARGET),powerpc64-aix)
  3531. REQUIRE_PACKAGES_RTL=1
  3532. REQUIRE_PACKAGES_PASZLIB=1
  3533. REQUIRE_PACKAGES_FCL-PROCESS=1
  3534. REQUIRE_PACKAGES_HASH=1
  3535. REQUIRE_PACKAGES_LIBTAR=1
  3536. REQUIRE_PACKAGES_FPMKUNIT=1
  3537. REQUIRE_PACKAGES_LIBNDSFPC=1
  3538. endif
  3539. ifeq ($(FULL_TARGET),avr-embedded)
  3540. REQUIRE_PACKAGES_RTL=1
  3541. REQUIRE_PACKAGES_PASZLIB=1
  3542. REQUIRE_PACKAGES_FCL-PROCESS=1
  3543. REQUIRE_PACKAGES_HASH=1
  3544. REQUIRE_PACKAGES_LIBTAR=1
  3545. REQUIRE_PACKAGES_FPMKUNIT=1
  3546. REQUIRE_PACKAGES_LIBNDSFPC=1
  3547. endif
  3548. ifeq ($(FULL_TARGET),armeb-linux)
  3549. REQUIRE_PACKAGES_RTL=1
  3550. REQUIRE_PACKAGES_PASZLIB=1
  3551. REQUIRE_PACKAGES_FCL-PROCESS=1
  3552. REQUIRE_PACKAGES_HASH=1
  3553. REQUIRE_PACKAGES_LIBTAR=1
  3554. REQUIRE_PACKAGES_FPMKUNIT=1
  3555. REQUIRE_PACKAGES_LIBNDSFPC=1
  3556. endif
  3557. ifeq ($(FULL_TARGET),armeb-embedded)
  3558. REQUIRE_PACKAGES_RTL=1
  3559. REQUIRE_PACKAGES_PASZLIB=1
  3560. REQUIRE_PACKAGES_FCL-PROCESS=1
  3561. REQUIRE_PACKAGES_HASH=1
  3562. REQUIRE_PACKAGES_LIBTAR=1
  3563. REQUIRE_PACKAGES_FPMKUNIT=1
  3564. REQUIRE_PACKAGES_LIBNDSFPC=1
  3565. endif
  3566. ifeq ($(FULL_TARGET),mips-linux)
  3567. REQUIRE_PACKAGES_RTL=1
  3568. REQUIRE_PACKAGES_PASZLIB=1
  3569. REQUIRE_PACKAGES_FCL-PROCESS=1
  3570. REQUIRE_PACKAGES_HASH=1
  3571. REQUIRE_PACKAGES_LIBTAR=1
  3572. REQUIRE_PACKAGES_FPMKUNIT=1
  3573. REQUIRE_PACKAGES_LIBNDSFPC=1
  3574. endif
  3575. ifeq ($(FULL_TARGET),mipsel-linux)
  3576. REQUIRE_PACKAGES_RTL=1
  3577. REQUIRE_PACKAGES_PASZLIB=1
  3578. REQUIRE_PACKAGES_FCL-PROCESS=1
  3579. REQUIRE_PACKAGES_HASH=1
  3580. REQUIRE_PACKAGES_LIBTAR=1
  3581. REQUIRE_PACKAGES_FPMKUNIT=1
  3582. REQUIRE_PACKAGES_LIBNDSFPC=1
  3583. endif
  3584. ifeq ($(FULL_TARGET),mipsel-embedded)
  3585. REQUIRE_PACKAGES_RTL=1
  3586. REQUIRE_PACKAGES_PASZLIB=1
  3587. REQUIRE_PACKAGES_FCL-PROCESS=1
  3588. REQUIRE_PACKAGES_HASH=1
  3589. REQUIRE_PACKAGES_LIBTAR=1
  3590. REQUIRE_PACKAGES_FPMKUNIT=1
  3591. REQUIRE_PACKAGES_LIBNDSFPC=1
  3592. endif
  3593. ifeq ($(FULL_TARGET),mipsel-android)
  3594. REQUIRE_PACKAGES_RTL=1
  3595. REQUIRE_PACKAGES_PASZLIB=1
  3596. REQUIRE_PACKAGES_FCL-PROCESS=1
  3597. REQUIRE_PACKAGES_HASH=1
  3598. REQUIRE_PACKAGES_LIBTAR=1
  3599. REQUIRE_PACKAGES_FPMKUNIT=1
  3600. REQUIRE_PACKAGES_LIBNDSFPC=1
  3601. endif
  3602. ifeq ($(FULL_TARGET),jvm-java)
  3603. REQUIRE_PACKAGES_RTL=1
  3604. REQUIRE_PACKAGES_PASZLIB=1
  3605. REQUIRE_PACKAGES_FCL-PROCESS=1
  3606. REQUIRE_PACKAGES_HASH=1
  3607. REQUIRE_PACKAGES_LIBTAR=1
  3608. REQUIRE_PACKAGES_FPMKUNIT=1
  3609. REQUIRE_PACKAGES_LIBNDSFPC=1
  3610. endif
  3611. ifeq ($(FULL_TARGET),jvm-android)
  3612. REQUIRE_PACKAGES_RTL=1
  3613. REQUIRE_PACKAGES_PASZLIB=1
  3614. REQUIRE_PACKAGES_FCL-PROCESS=1
  3615. REQUIRE_PACKAGES_HASH=1
  3616. REQUIRE_PACKAGES_LIBTAR=1
  3617. REQUIRE_PACKAGES_FPMKUNIT=1
  3618. REQUIRE_PACKAGES_LIBNDSFPC=1
  3619. endif
  3620. ifeq ($(FULL_TARGET),i8086-embedded)
  3621. REQUIRE_PACKAGES_RTL=1
  3622. REQUIRE_PACKAGES_PASZLIB=1
  3623. REQUIRE_PACKAGES_FCL-PROCESS=1
  3624. REQUIRE_PACKAGES_HASH=1
  3625. REQUIRE_PACKAGES_LIBTAR=1
  3626. REQUIRE_PACKAGES_FPMKUNIT=1
  3627. REQUIRE_PACKAGES_LIBNDSFPC=1
  3628. endif
  3629. ifeq ($(FULL_TARGET),i8086-msdos)
  3630. REQUIRE_PACKAGES_RTL=1
  3631. REQUIRE_PACKAGES_PASZLIB=1
  3632. REQUIRE_PACKAGES_FCL-PROCESS=1
  3633. REQUIRE_PACKAGES_HASH=1
  3634. REQUIRE_PACKAGES_LIBTAR=1
  3635. REQUIRE_PACKAGES_FPMKUNIT=1
  3636. REQUIRE_PACKAGES_LIBNDSFPC=1
  3637. endif
  3638. ifeq ($(FULL_TARGET),i8086-win16)
  3639. REQUIRE_PACKAGES_RTL=1
  3640. REQUIRE_PACKAGES_PASZLIB=1
  3641. REQUIRE_PACKAGES_FCL-PROCESS=1
  3642. REQUIRE_PACKAGES_HASH=1
  3643. REQUIRE_PACKAGES_LIBTAR=1
  3644. REQUIRE_PACKAGES_FPMKUNIT=1
  3645. REQUIRE_PACKAGES_LIBNDSFPC=1
  3646. endif
  3647. ifeq ($(FULL_TARGET),aarch64-linux)
  3648. REQUIRE_PACKAGES_RTL=1
  3649. REQUIRE_PACKAGES_PASZLIB=1
  3650. REQUIRE_PACKAGES_FCL-PROCESS=1
  3651. REQUIRE_PACKAGES_HASH=1
  3652. REQUIRE_PACKAGES_LIBTAR=1
  3653. REQUIRE_PACKAGES_FPMKUNIT=1
  3654. REQUIRE_PACKAGES_LIBNDSFPC=1
  3655. endif
  3656. ifeq ($(FULL_TARGET),aarch64-darwin)
  3657. REQUIRE_PACKAGES_RTL=1
  3658. REQUIRE_PACKAGES_PASZLIB=1
  3659. REQUIRE_PACKAGES_FCL-PROCESS=1
  3660. REQUIRE_PACKAGES_HASH=1
  3661. REQUIRE_PACKAGES_LIBTAR=1
  3662. REQUIRE_PACKAGES_FPMKUNIT=1
  3663. REQUIRE_PACKAGES_LIBNDSFPC=1
  3664. endif
  3665. ifeq ($(FULL_TARGET),aarch64-win64)
  3666. REQUIRE_PACKAGES_RTL=1
  3667. REQUIRE_PACKAGES_PASZLIB=1
  3668. REQUIRE_PACKAGES_FCL-PROCESS=1
  3669. REQUIRE_PACKAGES_HASH=1
  3670. REQUIRE_PACKAGES_LIBTAR=1
  3671. REQUIRE_PACKAGES_FPMKUNIT=1
  3672. REQUIRE_PACKAGES_LIBNDSFPC=1
  3673. endif
  3674. ifeq ($(FULL_TARGET),aarch64-android)
  3675. REQUIRE_PACKAGES_RTL=1
  3676. REQUIRE_PACKAGES_PASZLIB=1
  3677. REQUIRE_PACKAGES_FCL-PROCESS=1
  3678. REQUIRE_PACKAGES_HASH=1
  3679. REQUIRE_PACKAGES_LIBTAR=1
  3680. REQUIRE_PACKAGES_FPMKUNIT=1
  3681. REQUIRE_PACKAGES_LIBNDSFPC=1
  3682. endif
  3683. ifeq ($(FULL_TARGET),wasm-wasm)
  3684. REQUIRE_PACKAGES_RTL=1
  3685. REQUIRE_PACKAGES_PASZLIB=1
  3686. REQUIRE_PACKAGES_FCL-PROCESS=1
  3687. REQUIRE_PACKAGES_HASH=1
  3688. REQUIRE_PACKAGES_LIBTAR=1
  3689. REQUIRE_PACKAGES_FPMKUNIT=1
  3690. REQUIRE_PACKAGES_LIBNDSFPC=1
  3691. endif
  3692. ifeq ($(FULL_TARGET),sparc64-linux)
  3693. REQUIRE_PACKAGES_RTL=1
  3694. REQUIRE_PACKAGES_PASZLIB=1
  3695. REQUIRE_PACKAGES_FCL-PROCESS=1
  3696. REQUIRE_PACKAGES_HASH=1
  3697. REQUIRE_PACKAGES_LIBTAR=1
  3698. REQUIRE_PACKAGES_FPMKUNIT=1
  3699. REQUIRE_PACKAGES_LIBNDSFPC=1
  3700. endif
  3701. ifeq ($(FULL_TARGET),riscv32-linux)
  3702. REQUIRE_PACKAGES_RTL=1
  3703. REQUIRE_PACKAGES_PASZLIB=1
  3704. REQUIRE_PACKAGES_FCL-PROCESS=1
  3705. REQUIRE_PACKAGES_HASH=1
  3706. REQUIRE_PACKAGES_LIBTAR=1
  3707. REQUIRE_PACKAGES_FPMKUNIT=1
  3708. REQUIRE_PACKAGES_LIBNDSFPC=1
  3709. endif
  3710. ifeq ($(FULL_TARGET),riscv32-embedded)
  3711. REQUIRE_PACKAGES_RTL=1
  3712. REQUIRE_PACKAGES_PASZLIB=1
  3713. REQUIRE_PACKAGES_FCL-PROCESS=1
  3714. REQUIRE_PACKAGES_HASH=1
  3715. REQUIRE_PACKAGES_LIBTAR=1
  3716. REQUIRE_PACKAGES_FPMKUNIT=1
  3717. REQUIRE_PACKAGES_LIBNDSFPC=1
  3718. endif
  3719. ifeq ($(FULL_TARGET),riscv64-linux)
  3720. REQUIRE_PACKAGES_RTL=1
  3721. REQUIRE_PACKAGES_PASZLIB=1
  3722. REQUIRE_PACKAGES_FCL-PROCESS=1
  3723. REQUIRE_PACKAGES_HASH=1
  3724. REQUIRE_PACKAGES_LIBTAR=1
  3725. REQUIRE_PACKAGES_FPMKUNIT=1
  3726. REQUIRE_PACKAGES_LIBNDSFPC=1
  3727. endif
  3728. ifeq ($(FULL_TARGET),riscv64-embedded)
  3729. REQUIRE_PACKAGES_RTL=1
  3730. REQUIRE_PACKAGES_PASZLIB=1
  3731. REQUIRE_PACKAGES_FCL-PROCESS=1
  3732. REQUIRE_PACKAGES_HASH=1
  3733. REQUIRE_PACKAGES_LIBTAR=1
  3734. REQUIRE_PACKAGES_FPMKUNIT=1
  3735. REQUIRE_PACKAGES_LIBNDSFPC=1
  3736. endif
  3737. ifeq ($(FULL_TARGET),xtensa-linux)
  3738. REQUIRE_PACKAGES_RTL=1
  3739. REQUIRE_PACKAGES_PASZLIB=1
  3740. REQUIRE_PACKAGES_FCL-PROCESS=1
  3741. REQUIRE_PACKAGES_HASH=1
  3742. REQUIRE_PACKAGES_LIBTAR=1
  3743. REQUIRE_PACKAGES_FPMKUNIT=1
  3744. REQUIRE_PACKAGES_LIBNDSFPC=1
  3745. endif
  3746. ifeq ($(FULL_TARGET),xtensa-embedded)
  3747. REQUIRE_PACKAGES_RTL=1
  3748. REQUIRE_PACKAGES_PASZLIB=1
  3749. REQUIRE_PACKAGES_FCL-PROCESS=1
  3750. REQUIRE_PACKAGES_HASH=1
  3751. REQUIRE_PACKAGES_LIBTAR=1
  3752. REQUIRE_PACKAGES_FPMKUNIT=1
  3753. REQUIRE_PACKAGES_LIBNDSFPC=1
  3754. endif
  3755. ifeq ($(FULL_TARGET),xtensa-freertos)
  3756. REQUIRE_PACKAGES_RTL=1
  3757. REQUIRE_PACKAGES_PASZLIB=1
  3758. REQUIRE_PACKAGES_FCL-PROCESS=1
  3759. REQUIRE_PACKAGES_HASH=1
  3760. REQUIRE_PACKAGES_LIBTAR=1
  3761. REQUIRE_PACKAGES_FPMKUNIT=1
  3762. REQUIRE_PACKAGES_LIBNDSFPC=1
  3763. endif
  3764. ifeq ($(FULL_TARGET),z80-embedded)
  3765. REQUIRE_PACKAGES_RTL=1
  3766. REQUIRE_PACKAGES_PASZLIB=1
  3767. REQUIRE_PACKAGES_FCL-PROCESS=1
  3768. REQUIRE_PACKAGES_HASH=1
  3769. REQUIRE_PACKAGES_LIBTAR=1
  3770. REQUIRE_PACKAGES_FPMKUNIT=1
  3771. REQUIRE_PACKAGES_LIBNDSFPC=1
  3772. endif
  3773. ifeq ($(FULL_TARGET),z80-zxspectrum)
  3774. REQUIRE_PACKAGES_RTL=1
  3775. REQUIRE_PACKAGES_PASZLIB=1
  3776. REQUIRE_PACKAGES_FCL-PROCESS=1
  3777. REQUIRE_PACKAGES_HASH=1
  3778. REQUIRE_PACKAGES_LIBTAR=1
  3779. REQUIRE_PACKAGES_FPMKUNIT=1
  3780. REQUIRE_PACKAGES_LIBNDSFPC=1
  3781. endif
  3782. ifeq ($(FULL_TARGET),z80-msxdos)
  3783. REQUIRE_PACKAGES_RTL=1
  3784. REQUIRE_PACKAGES_PASZLIB=1
  3785. REQUIRE_PACKAGES_FCL-PROCESS=1
  3786. REQUIRE_PACKAGES_HASH=1
  3787. REQUIRE_PACKAGES_LIBTAR=1
  3788. REQUIRE_PACKAGES_FPMKUNIT=1
  3789. REQUIRE_PACKAGES_LIBNDSFPC=1
  3790. endif
  3791. ifdef REQUIRE_PACKAGES_RTL
  3792. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  3793. ifneq ($(PACKAGEDIR_RTL),)
  3794. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  3795. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  3796. else
  3797. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  3798. endif
  3799. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)),)
  3800. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)
  3801. else
  3802. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)),)
  3803. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)
  3804. else
  3805. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)
  3806. endif
  3807. endif
  3808. ifdef CHECKDEPEND
  3809. $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
  3810. $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
  3811. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
  3812. endif
  3813. else
  3814. PACKAGEDIR_RTL=
  3815. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  3816. ifneq ($(UNITDIR_RTL),)
  3817. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  3818. else
  3819. UNITDIR_RTL=
  3820. endif
  3821. endif
  3822. ifdef UNITDIR_RTL
  3823. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  3824. endif
  3825. ifdef UNITDIR_FPMAKE_RTL
  3826. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL)
  3827. endif
  3828. endif
  3829. ifdef REQUIRE_PACKAGES_PASZLIB
  3830. PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR))))))
  3831. ifneq ($(PACKAGEDIR_PASZLIB),)
  3832. ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)),)
  3833. UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)
  3834. else
  3835. UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)
  3836. endif
  3837. ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(SOURCESUFFIX)),)
  3838. UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(SOURCESUFFIX)
  3839. else
  3840. ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units_bs/$(SOURCESUFFIX)),)
  3841. UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)/units_bs/$(SOURCESUFFIX)
  3842. else
  3843. UNITDIR_FPMAKE_PASZLIB=$(PACKAGEDIR_PASZLIB)
  3844. endif
  3845. endif
  3846. ifdef CHECKDEPEND
  3847. $(PACKAGEDIR_PASZLIB)/$(FPCMADE):
  3848. $(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE)
  3849. override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE)
  3850. endif
  3851. else
  3852. PACKAGEDIR_PASZLIB=
  3853. UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR)))))
  3854. ifneq ($(UNITDIR_PASZLIB),)
  3855. UNITDIR_PASZLIB:=$(firstword $(UNITDIR_PASZLIB))
  3856. else
  3857. UNITDIR_PASZLIB=
  3858. endif
  3859. endif
  3860. ifdef UNITDIR_PASZLIB
  3861. override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
  3862. endif
  3863. ifdef UNITDIR_FPMAKE_PASZLIB
  3864. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_PASZLIB)
  3865. endif
  3866. endif
  3867. ifdef REQUIRE_PACKAGES_FCL-PROCESS
  3868. PACKAGEDIR_FCL-PROCESS:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-process/Makefile.fpc,$(PACKAGESDIR))))))
  3869. ifneq ($(PACKAGEDIR_FCL-PROCESS),)
  3870. ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units/$(TARGETSUFFIX)),)
  3871. UNITDIR_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units/$(TARGETSUFFIX)
  3872. else
  3873. UNITDIR_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)
  3874. endif
  3875. ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units/$(SOURCESUFFIX)),)
  3876. UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units/$(SOURCESUFFIX)
  3877. else
  3878. ifneq ($(wildcard $(PACKAGEDIR_FCL-PROCESS)/units_bs/$(SOURCESUFFIX)),)
  3879. UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)/units_bs/$(SOURCESUFFIX)
  3880. else
  3881. UNITDIR_FPMAKE_FCL-PROCESS=$(PACKAGEDIR_FCL-PROCESS)
  3882. endif
  3883. endif
  3884. ifdef CHECKDEPEND
  3885. $(PACKAGEDIR_FCL-PROCESS)/$(FPCMADE):
  3886. $(MAKE) -C $(PACKAGEDIR_FCL-PROCESS) $(FPCMADE)
  3887. override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-PROCESS)/$(FPCMADE)
  3888. endif
  3889. else
  3890. PACKAGEDIR_FCL-PROCESS=
  3891. UNITDIR_FCL-PROCESS:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-process/Package.fpc,$(UNITSDIR)))))
  3892. ifneq ($(UNITDIR_FCL-PROCESS),)
  3893. UNITDIR_FCL-PROCESS:=$(firstword $(UNITDIR_FCL-PROCESS))
  3894. else
  3895. UNITDIR_FCL-PROCESS=
  3896. endif
  3897. endif
  3898. ifdef UNITDIR_FCL-PROCESS
  3899. override COMPILER_UNITDIR+=$(UNITDIR_FCL-PROCESS)
  3900. endif
  3901. ifdef UNITDIR_FPMAKE_FCL-PROCESS
  3902. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FCL-PROCESS)
  3903. endif
  3904. endif
  3905. ifdef REQUIRE_PACKAGES_HASH
  3906. PACKAGEDIR_HASH:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /hash/Makefile.fpc,$(PACKAGESDIR))))))
  3907. ifneq ($(PACKAGEDIR_HASH),)
  3908. ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)),)
  3909. UNITDIR_HASH=$(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)
  3910. else
  3911. UNITDIR_HASH=$(PACKAGEDIR_HASH)
  3912. endif
  3913. ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(SOURCESUFFIX)),)
  3914. UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)/units/$(SOURCESUFFIX)
  3915. else
  3916. ifneq ($(wildcard $(PACKAGEDIR_HASH)/units_bs/$(SOURCESUFFIX)),)
  3917. UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)/units_bs/$(SOURCESUFFIX)
  3918. else
  3919. UNITDIR_FPMAKE_HASH=$(PACKAGEDIR_HASH)
  3920. endif
  3921. endif
  3922. ifdef CHECKDEPEND
  3923. $(PACKAGEDIR_HASH)/$(FPCMADE):
  3924. $(MAKE) -C $(PACKAGEDIR_HASH) $(FPCMADE)
  3925. override ALLDEPENDENCIES+=$(PACKAGEDIR_HASH)/$(FPCMADE)
  3926. endif
  3927. else
  3928. PACKAGEDIR_HASH=
  3929. UNITDIR_HASH:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /hash/Package.fpc,$(UNITSDIR)))))
  3930. ifneq ($(UNITDIR_HASH),)
  3931. UNITDIR_HASH:=$(firstword $(UNITDIR_HASH))
  3932. else
  3933. UNITDIR_HASH=
  3934. endif
  3935. endif
  3936. ifdef UNITDIR_HASH
  3937. override COMPILER_UNITDIR+=$(UNITDIR_HASH)
  3938. endif
  3939. ifdef UNITDIR_FPMAKE_HASH
  3940. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_HASH)
  3941. endif
  3942. endif
  3943. ifdef REQUIRE_PACKAGES_LIBTAR
  3944. PACKAGEDIR_LIBTAR:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libtar/Makefile.fpc,$(PACKAGESDIR))))))
  3945. ifneq ($(PACKAGEDIR_LIBTAR),)
  3946. ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units/$(TARGETSUFFIX)),)
  3947. UNITDIR_LIBTAR=$(PACKAGEDIR_LIBTAR)/units/$(TARGETSUFFIX)
  3948. else
  3949. UNITDIR_LIBTAR=$(PACKAGEDIR_LIBTAR)
  3950. endif
  3951. ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units/$(SOURCESUFFIX)),)
  3952. UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)/units/$(SOURCESUFFIX)
  3953. else
  3954. ifneq ($(wildcard $(PACKAGEDIR_LIBTAR)/units_bs/$(SOURCESUFFIX)),)
  3955. UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)/units_bs/$(SOURCESUFFIX)
  3956. else
  3957. UNITDIR_FPMAKE_LIBTAR=$(PACKAGEDIR_LIBTAR)
  3958. endif
  3959. endif
  3960. ifdef CHECKDEPEND
  3961. $(PACKAGEDIR_LIBTAR)/$(FPCMADE):
  3962. $(MAKE) -C $(PACKAGEDIR_LIBTAR) $(FPCMADE)
  3963. override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBTAR)/$(FPCMADE)
  3964. endif
  3965. else
  3966. PACKAGEDIR_LIBTAR=
  3967. UNITDIR_LIBTAR:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libtar/Package.fpc,$(UNITSDIR)))))
  3968. ifneq ($(UNITDIR_LIBTAR),)
  3969. UNITDIR_LIBTAR:=$(firstword $(UNITDIR_LIBTAR))
  3970. else
  3971. UNITDIR_LIBTAR=
  3972. endif
  3973. endif
  3974. ifdef UNITDIR_LIBTAR
  3975. override COMPILER_UNITDIR+=$(UNITDIR_LIBTAR)
  3976. endif
  3977. ifdef UNITDIR_FPMAKE_LIBTAR
  3978. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_LIBTAR)
  3979. endif
  3980. endif
  3981. ifdef REQUIRE_PACKAGES_FPMKUNIT
  3982. PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
  3983. ifneq ($(PACKAGEDIR_FPMKUNIT),)
  3984. ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)),)
  3985. UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)
  3986. else
  3987. UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
  3988. endif
  3989. ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)),)
  3990. UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)
  3991. else
  3992. ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)),)
  3993. UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)
  3994. else
  3995. UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
  3996. endif
  3997. endif
  3998. ifdef CHECKDEPEND
  3999. $(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
  4000. $(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
  4001. override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
  4002. endif
  4003. else
  4004. PACKAGEDIR_FPMKUNIT=
  4005. UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
  4006. ifneq ($(UNITDIR_FPMKUNIT),)
  4007. UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
  4008. else
  4009. UNITDIR_FPMKUNIT=
  4010. endif
  4011. endif
  4012. ifdef UNITDIR_FPMKUNIT
  4013. override COMPILER_UNITDIR+=$(UNITDIR_FPMKUNIT)
  4014. endif
  4015. ifdef UNITDIR_FPMAKE_FPMKUNIT
  4016. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FPMKUNIT)
  4017. endif
  4018. endif
  4019. ifdef REQUIRE_PACKAGES_LIBNDSFPC
  4020. PACKAGEDIR_LIBNDSFPC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libndsfpc/Makefile.fpc,$(PACKAGESDIR))))))
  4021. ifneq ($(PACKAGEDIR_LIBNDSFPC),)
  4022. ifneq ($(wildcard $(PACKAGEDIR_LIBNDSFPC)/units/$(TARGETSUFFIX)),)
  4023. UNITDIR_LIBNDSFPC=$(PACKAGEDIR_LIBNDSFPC)/units/$(TARGETSUFFIX)
  4024. else
  4025. UNITDIR_LIBNDSFPC=$(PACKAGEDIR_LIBNDSFPC)
  4026. endif
  4027. ifneq ($(wildcard $(PACKAGEDIR_LIBNDSFPC)/units/$(SOURCESUFFIX)),)
  4028. UNITDIR_FPMAKE_LIBNDSFPC=$(PACKAGEDIR_LIBNDSFPC)/units/$(SOURCESUFFIX)
  4029. else
  4030. ifneq ($(wildcard $(PACKAGEDIR_LIBNDSFPC)/units_bs/$(SOURCESUFFIX)),)
  4031. UNITDIR_FPMAKE_LIBNDSFPC=$(PACKAGEDIR_LIBNDSFPC)/units_bs/$(SOURCESUFFIX)
  4032. else
  4033. UNITDIR_FPMAKE_LIBNDSFPC=$(PACKAGEDIR_LIBNDSFPC)
  4034. endif
  4035. endif
  4036. ifdef CHECKDEPEND
  4037. $(PACKAGEDIR_LIBNDSFPC)/$(FPCMADE):
  4038. $(MAKE) -C $(PACKAGEDIR_LIBNDSFPC) $(FPCMADE)
  4039. override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBNDSFPC)/$(FPCMADE)
  4040. endif
  4041. else
  4042. PACKAGEDIR_LIBNDSFPC=
  4043. UNITDIR_LIBNDSFPC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libndsfpc/Package.fpc,$(UNITSDIR)))))
  4044. ifneq ($(UNITDIR_LIBNDSFPC),)
  4045. UNITDIR_LIBNDSFPC:=$(firstword $(UNITDIR_LIBNDSFPC))
  4046. else
  4047. UNITDIR_LIBNDSFPC=
  4048. endif
  4049. endif
  4050. ifdef UNITDIR_LIBNDSFPC
  4051. override COMPILER_UNITDIR+=$(UNITDIR_LIBNDSFPC)
  4052. endif
  4053. ifdef UNITDIR_FPMAKE_LIBNDSFPC
  4054. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_LIBNDSFPC)
  4055. endif
  4056. endif
  4057. ifndef NOCPUDEF
  4058. override FPCOPTDEF=$(ARCH)
  4059. endif
  4060. ifneq ($(OS_TARGET),$(OS_SOURCE))
  4061. override FPCOPT+=-T$(OS_TARGET)
  4062. endif
  4063. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  4064. override FPCOPT+=-P$(ARCH)
  4065. endif
  4066. ifeq ($(OS_SOURCE),openbsd)
  4067. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  4068. override FPCMAKEOPT+=-FD$(NEW_BINUTILS_PATH)
  4069. override FPMAKE_BUILD_OPT+=-FD$(NEW_BINUTILS_PATH)
  4070. endif
  4071. ifndef CROSSBOOTSTRAP
  4072. ifneq ($(BINUTILSPREFIX),)
  4073. override FPCOPT+=-XP$(BINUTILSPREFIX)
  4074. endif
  4075. ifneq ($(BINUTILSPREFIX),)
  4076. override FPCOPT+=-Xr$(RLINKPATH)
  4077. endif
  4078. endif
  4079. ifndef CROSSCOMPILE
  4080. ifneq ($(BINUTILSPREFIX),)
  4081. override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
  4082. override FPMAKE_BUILD_OPT+=-XP$(BINUTILSPREFIX)
  4083. endif
  4084. endif
  4085. ifdef UNITDIR
  4086. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  4087. endif
  4088. ifdef LIBDIR
  4089. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  4090. endif
  4091. ifdef OBJDIR
  4092. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  4093. endif
  4094. ifdef INCDIR
  4095. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  4096. endif
  4097. ifdef LINKSMART
  4098. override FPCOPT+=-XX
  4099. endif
  4100. ifdef CREATESMART
  4101. override FPCOPT+=-CX
  4102. endif
  4103. ifdef DEBUG
  4104. override FPCOPT+=-gl
  4105. override FPCOPTDEF+=DEBUG
  4106. endif
  4107. ifdef RELEASE
  4108. FPCCPUOPT:=-O2
  4109. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  4110. override FPCOPTDEF+=RELEASE
  4111. endif
  4112. ifdef STRIP
  4113. override FPCOPT+=-Xs
  4114. endif
  4115. ifdef OPTIMIZE
  4116. override FPCOPT+=-O2
  4117. endif
  4118. ifdef VERBOSE
  4119. override FPCOPT+=-vwni
  4120. endif
  4121. ifdef COMPILER_OPTIONS
  4122. override FPCOPT+=$(COMPILER_OPTIONS)
  4123. endif
  4124. ifdef COMPILER_UNITDIR
  4125. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  4126. endif
  4127. ifdef COMPILER_LIBRARYDIR
  4128. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  4129. endif
  4130. ifdef COMPILER_OBJECTDIR
  4131. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  4132. endif
  4133. ifdef COMPILER_INCLUDEDIR
  4134. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  4135. endif
  4136. ifdef CROSSBINDIR
  4137. override FPCOPT+=-FD$(CROSSBINDIR)
  4138. endif
  4139. ifdef COMPILER_TARGETDIR
  4140. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  4141. ifeq ($(COMPILER_TARGETDIR),.)
  4142. override TARGETDIRPREFIX=
  4143. else
  4144. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  4145. endif
  4146. endif
  4147. ifdef COMPILER_UNITTARGETDIR
  4148. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  4149. ifeq ($(COMPILER_UNITTARGETDIR),.)
  4150. override UNITTARGETDIRPREFIX=
  4151. else
  4152. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  4153. endif
  4154. else
  4155. ifdef COMPILER_TARGETDIR
  4156. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  4157. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  4158. endif
  4159. endif
  4160. ifdef CREATESHARED
  4161. override FPCOPT+=-Cg
  4162. endif
  4163. ifneq ($(findstring $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
  4164. ifneq ($(findstring $(CPU_TARGET),x86_64 mips mipsel),)
  4165. override FPCOPT+=-Cg
  4166. endif
  4167. endif
  4168. ifdef LINKSHARED
  4169. endif
  4170. ifdef GCCLIBDIR
  4171. override FPCOPT+=-Fl$(GCCLIBDIR)
  4172. ifdef FPCMAKEGCCLIBDIR
  4173. override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
  4174. else
  4175. override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
  4176. endif
  4177. endif
  4178. ifdef OTHERLIBDIR
  4179. override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
  4180. endif
  4181. ifdef OPT
  4182. override FPCOPT+=$(OPT)
  4183. endif
  4184. ifdef FPMAKEBUILDOPT
  4185. override FPMAKE_BUILD_OPT+=$(FPMAKEBUILDOPT)
  4186. endif
  4187. ifdef FPCOPTDEF
  4188. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  4189. endif
  4190. ifdef CFGFILE
  4191. override FPCOPT+=@$(CFGFILE)
  4192. endif
  4193. ifdef USEENV
  4194. override FPCEXTCMD:=$(FPCOPT)
  4195. override FPCOPT:=!FPCEXTCMD
  4196. export FPCEXTCMD
  4197. endif
  4198. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  4199. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  4200. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  4201. override ACROSSCOMPILE=1
  4202. endif
  4203. ifdef ACROSSCOMPILE
  4204. override FPCOPT+=$(CROSSOPT)
  4205. endif
  4206. override COMPILER:=$(strip $(FPC) $(FPCOPT))
  4207. ifneq (,$(findstring -sh ,$(COMPILER)))
  4208. UseEXECPPAS=1
  4209. endif
  4210. ifneq (,$(findstring -s ,$(COMPILER)))
  4211. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  4212. UseEXECPPAS=1
  4213. endif
  4214. endif
  4215. ifneq ($(UseEXECPPAS),1)
  4216. EXECPPAS=
  4217. else
  4218. ifdef RUNBATCH
  4219. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  4220. else
  4221. EXECPPAS:=@$(PPAS)
  4222. endif
  4223. endif
  4224. .PHONY: fpc_exes
  4225. ifndef CROSSINSTALL
  4226. ifneq ($(TARGET_PROGRAMS),)
  4227. override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
  4228. override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addsuffix $(LTOEXT),$(TARGET_PROGRAMS))$(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
  4229. override EXEDBGFILES:=$(addsuffix $(EXEDBGEXT),$(TARGET_PROGRAMS))
  4230. override ALLTARGET+=fpc_exes
  4231. override INSTALLEXEFILES+=$(EXEFILES)
  4232. override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
  4233. override CLEANEXEDBGFILES+=$(EXEDBGFILES)
  4234. ifeq ($(OS_TARGET),os2)
  4235. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  4236. endif
  4237. ifeq ($(OS_TARGET),emx)
  4238. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  4239. endif
  4240. endif
  4241. endif
  4242. fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
  4243. ifdef TARGET_RSTS
  4244. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  4245. override CLEANRSTFILES+=$(RSTFILES)
  4246. endif
  4247. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  4248. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  4249. @$(ECHOREDIR) Compiled > $(FPCMADE)
  4250. fpc_all: $(FPCMADE)
  4251. fpc_smart:
  4252. $(MAKE) all LINKSMART=1 CREATESMART=1
  4253. fpc_debug:
  4254. $(MAKE) all DEBUG=1
  4255. fpc_release:
  4256. $(MAKE) all RELEASE=1
  4257. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) $(LTOEXT) .pas .lpr .dpr .pp .rc .res
  4258. $(COMPILER_UNITTARGETDIR):
  4259. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  4260. $(COMPILER_TARGETDIR):
  4261. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  4262. %$(PPUEXT): %.pp
  4263. $(COMPILER) $<
  4264. $(EXECPPAS)
  4265. %$(PPUEXT): %.pas
  4266. $(COMPILER) $<
  4267. $(EXECPPAS)
  4268. %$(EXEEXT): %.pp
  4269. $(COMPILER) $<
  4270. $(EXECPPAS)
  4271. %$(EXEEXT): %.pas
  4272. $(COMPILER) $<
  4273. $(EXECPPAS)
  4274. %$(EXEEXT): %.lpr
  4275. $(COMPILER) $<
  4276. $(EXECPPAS)
  4277. %$(EXEEXT): %.dpr
  4278. $(COMPILER) $<
  4279. $(EXECPPAS)
  4280. %.res: %.rc
  4281. windres -i $< -o $@
  4282. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  4283. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  4284. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  4285. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  4286. vpath %.inc $(COMPILER_INCLUDEDIR)
  4287. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  4288. vpath %$(LTOEXT) $(COMPILER_UNITTARGETDIR)
  4289. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  4290. .PHONY: fpc_shared
  4291. override INSTALLTARGET+=fpc_shared_install
  4292. ifndef SHARED_LIBVERSION
  4293. SHARED_LIBVERSION=$(FPC_VERSION)
  4294. endif
  4295. ifndef SHARED_LIBNAME
  4296. SHARED_LIBNAME=$(PACKAGE_NAME)
  4297. endif
  4298. ifndef SHARED_FULLNAME
  4299. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  4300. endif
  4301. ifndef SHARED_LIBUNITS
  4302. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  4303. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  4304. endif
  4305. fpc_shared:
  4306. ifdef HASSHAREDLIB
  4307. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  4308. ifneq ($(SHARED_BUILD),n)
  4309. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR) -P$(BINUTILSPREFIX)
  4310. endif
  4311. else
  4312. @$(ECHO) Shared Libraries not supported
  4313. endif
  4314. fpc_shared_install:
  4315. ifneq ($(SHARED_BUILD),n)
  4316. ifneq ($(SHARED_LIBUNITS),)
  4317. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  4318. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  4319. endif
  4320. endif
  4321. endif
  4322. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  4323. ifdef INSTALL_UNITS
  4324. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  4325. endif
  4326. ifdef INSTALL_BUILDUNIT
  4327. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  4328. endif
  4329. ifdef INSTALLPPUFILES
  4330. ifneq ($(IMPORTLIBPREFIX)-$(STATICLIBEXT),$(STATICLIBPREFIX)-$(STATICLIBEXT))
  4331. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  4332. else
  4333. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  4334. endif
  4335. ifneq ($(UNITTARGETDIRPREFIX),)
  4336. override INSTALLPPUFILENAMES:=$(notdir $(INSTALLPPUFILES))
  4337. override INSTALLPPULINKFILENAMES:=$(notdir $(INSTALLPPULINKFILES))
  4338. override INSTALLPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILENAMES))
  4339. override INSTALLPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILENAMES)))
  4340. endif
  4341. override INSTALL_CREATEPACKAGEFPC=1
  4342. endif
  4343. ifdef INSTALLEXEFILES
  4344. ifneq ($(TARGETDIRPREFIX),)
  4345. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  4346. endif
  4347. endif
  4348. fpc_install: all $(INSTALLTARGET)
  4349. ifdef INSTALLEXEFILES
  4350. $(MKDIR) $(INSTALL_BINDIR)
  4351. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  4352. endif
  4353. ifdef INSTALL_CREATEPACKAGEFPC
  4354. ifdef FPCMAKE
  4355. ifdef PACKAGE_VERSION
  4356. ifneq ($(wildcard Makefile.fpc),)
  4357. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  4358. $(MKDIR) $(INSTALL_UNITDIR)
  4359. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  4360. endif
  4361. endif
  4362. endif
  4363. endif
  4364. ifdef INSTALLPPUFILES
  4365. $(MKDIR) $(INSTALL_UNITDIR)
  4366. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  4367. ifneq ($(INSTALLPPULINKFILES),)
  4368. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  4369. endif
  4370. ifneq ($(wildcard $(LIB_FULLNAME)),)
  4371. $(MKDIR) $(INSTALL_LIBDIR)
  4372. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  4373. ifdef inUnix
  4374. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  4375. endif
  4376. endif
  4377. endif
  4378. ifdef INSTALL_FILES
  4379. $(MKDIR) $(INSTALL_DATADIR)
  4380. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  4381. endif
  4382. fpc_sourceinstall: distclean
  4383. $(MKDIR) $(INSTALL_SOURCEDIR)
  4384. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  4385. fpc_exampleinstall: $(EXAMPLEINSTALLTARGET) $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  4386. ifdef HASEXAMPLES
  4387. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  4388. endif
  4389. ifdef EXAMPLESOURCEFILES
  4390. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  4391. endif
  4392. ifdef TARGET_EXAMPLEDIRS
  4393. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  4394. endif
  4395. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  4396. ifdef EXEFILES
  4397. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  4398. override CLEANEXEDBGFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEDBGFILES))
  4399. endif
  4400. ifdef CLEAN_PROGRAMS
  4401. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  4402. override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
  4403. endif
  4404. ifdef CLEAN_UNITS
  4405. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  4406. endif
  4407. ifdef CLEANPPUFILES
  4408. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  4409. ifdef DEBUGSYMEXT
  4410. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  4411. endif
  4412. override CLEANPPUFILENAMES:=$(CLEANPPUFILES)
  4413. override CLEANPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILENAMES))
  4414. override CLEANPPULINKFILENAMES:=$(CLEANPPULINKFILES)
  4415. override CLEANPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILENAMES)))
  4416. endif
  4417. fpc_clean: $(CLEANTARGET)
  4418. ifdef CLEANEXEFILES
  4419. -$(DEL) $(CLEANEXEFILES)
  4420. endif
  4421. ifdef CLEANEXEDBGFILES
  4422. -$(DELTREE) $(CLEANEXEDBGFILES)
  4423. endif
  4424. ifdef CLEANPPUFILES
  4425. -$(DEL) $(CLEANPPUFILES)
  4426. endif
  4427. ifneq ($(CLEANPPULINKFILES),)
  4428. -$(DEL) $(CLEANPPULINKFILES)
  4429. endif
  4430. ifdef CLEANRSTFILES
  4431. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  4432. endif
  4433. ifdef CLEAN_FILES
  4434. -$(DEL) $(CLEAN_FILES)
  4435. endif
  4436. ifdef LIB_NAME
  4437. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  4438. endif
  4439. -$(DEL) $(FPCMADE) *$(FULL_TARGET).fpm Package.fpc *$(ASMEXT)
  4440. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
  4441. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  4442. fpc_cleanall: $(CLEANTARGET)
  4443. ifdef CLEANEXEFILES
  4444. -$(DEL) $(CLEANEXEFILES)
  4445. endif
  4446. ifdef COMPILER_UNITTARGETDIR
  4447. ifdef CLEANPPUFILES
  4448. -$(DEL) $(CLEANPPUFILES)
  4449. endif
  4450. ifneq ($(CLEANPPULINKFILES),)
  4451. -$(DEL) $(CLEANPPULINKFILES)
  4452. endif
  4453. ifdef CLEANRSTFILES
  4454. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  4455. endif
  4456. endif
  4457. ifdef CLEAN_FILES
  4458. -$(DEL) $(CLEAN_FILES)
  4459. endif
  4460. -$(DELTREE) units
  4461. -$(DELTREE) bin
  4462. -$(DEL) *$(OEXT) *$(LTOEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  4463. ifneq ($(PPUEXT),.ppu)
  4464. -$(DEL) *.o *.ppu *.a
  4465. endif
  4466. -$(DELTREE) *$(SMARTEXT)
  4467. -$(DEL) fpcmade.* Package.fpc *.fpm
  4468. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
  4469. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  4470. ifdef AOUTEXT
  4471. -$(DEL) *$(AOUTEXT)
  4472. endif
  4473. ifdef DEBUGSYMEXT
  4474. -$(DEL) *$(DEBUGSYMEXT)
  4475. endif
  4476. ifdef LOCALFPMAKEBIN
  4477. -$(DEL) $(LOCALFPMAKEBIN)
  4478. -$(DEL) $(FPMAKEBINOBJ)
  4479. endif
  4480. fpc_distclean: cleanall
  4481. .PHONY: fpc_baseinfo
  4482. override INFORULES+=fpc_baseinfo
  4483. fpc_baseinfo:
  4484. @$(ECHO)
  4485. @$(ECHO) == Package info ==
  4486. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  4487. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  4488. @$(ECHO)
  4489. @$(ECHO) == Configuration info ==
  4490. @$(ECHO)
  4491. @$(ECHO) FPC.......... $(FPC)
  4492. @$(ECHO) FPC Version.. $(FPC_VERSION)
  4493. @$(ECHO) Source CPU... $(CPU_SOURCE)
  4494. @$(ECHO) Target CPU... $(CPU_TARGET)
  4495. @$(ECHO) Source OS.... $(OS_SOURCE)
  4496. @$(ECHO) Target OS.... $(OS_TARGET)
  4497. @$(ECHO) Full Source.. $(FULL_SOURCE)
  4498. @$(ECHO) Full Target.. $(FULL_TARGET)
  4499. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  4500. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  4501. @$(ECHO) FPC fpmake... $(FPCFPMAKE)
  4502. @$(ECHO)
  4503. @$(ECHO) == Directory info ==
  4504. @$(ECHO)
  4505. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  4506. @$(ECHO)
  4507. @$(ECHO) Basedir......... $(BASEDIR)
  4508. @$(ECHO) FPCDir.......... $(FPCDIR)
  4509. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  4510. @$(ECHO) UnitsDir........ $(UNITSDIR)
  4511. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  4512. @$(ECHO)
  4513. @$(ECHO) GCC library..... $(GCCLIBDIR)
  4514. @$(ECHO) Other library... $(OTHERLIBDIR)
  4515. @$(ECHO)
  4516. @$(ECHO) == Tools info ==
  4517. @$(ECHO)
  4518. @$(ECHO) As........ $(AS)
  4519. @$(ECHO) Ld........ $(LD)
  4520. @$(ECHO) Ar........ $(AR)
  4521. @$(ECHO) Rc........ $(RC)
  4522. @$(ECHO)
  4523. @$(ECHO) Mv........ $(MVPROG)
  4524. @$(ECHO) Cp........ $(CPPROG)
  4525. @$(ECHO) Rm........ $(RMPROG)
  4526. @$(ECHO) GInstall.. $(GINSTALL)
  4527. @$(ECHO) Echo...... $(ECHO)
  4528. @$(ECHO) Shell..... $(SHELL)
  4529. @$(ECHO) Date...... $(DATE)
  4530. @$(ECHO) FPCMake... $(FPCMAKE)
  4531. @$(ECHO) PPUMove... $(PPUMOVE)
  4532. @$(ECHO) Zip....... $(ZIPPROG)
  4533. @$(ECHO)
  4534. @$(ECHO) == Object info ==
  4535. @$(ECHO)
  4536. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  4537. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  4538. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  4539. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  4540. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  4541. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  4542. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  4543. @$(ECHO)
  4544. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  4545. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  4546. @$(ECHO)
  4547. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  4548. @$(ECHO) Install Files....... $(INSTALL_FILES)
  4549. @$(ECHO)
  4550. @$(ECHO) == Install info ==
  4551. @$(ECHO)
  4552. @$(ECHO) DateStr.............. $(DATESTR)
  4553. @$(ECHO) ZipName.............. $(ZIPNAME)
  4554. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  4555. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  4556. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  4557. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  4558. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  4559. @$(ECHO)
  4560. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  4561. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  4562. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  4563. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  4564. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  4565. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  4566. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  4567. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  4568. @$(ECHO)
  4569. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  4570. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  4571. @$(ECHO)
  4572. .PHONY: fpc_info
  4573. fpc_info: $(INFORULES)
  4574. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  4575. fpc_makefile_dirs
  4576. fpc_makefile:
  4577. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  4578. fpc_makefile_sub1:
  4579. ifdef TARGET_DIRS
  4580. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  4581. endif
  4582. ifdef TARGET_EXAMPLEDIRS
  4583. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  4584. endif
  4585. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  4586. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  4587. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  4588. ifndef BIN2S
  4589. BIN2S:=$(strip $(wildcard $(addsuffix /bin2s$(SRCEXEEXT),$(SEARCHPATH))))
  4590. ifeq ($(BIN2S),)
  4591. BIN2S= __missing_command_BIN2S
  4592. else
  4593. BIN2S:=$(firstword $(BIN2S))
  4594. endif
  4595. endif
  4596. export BIN2S
  4597. ifndef MMUTIL
  4598. MMUTIL:=$(strip $(wildcard $(addsuffix /mmutil$(SRCEXEEXT),$(SEARCHPATH))))
  4599. ifeq ($(MMUTIL),)
  4600. MMUTIL= __missing_command_MMUTIL
  4601. else
  4602. MMUTIL:=$(firstword $(MMUTIL))
  4603. endif
  4604. endif
  4605. export MMUTIL
  4606. ifndef GRIT_FPC
  4607. GRIT_FPC:=$(strip $(wildcard $(addsuffix /grit_fpc$(SRCEXEEXT),$(SEARCHPATH))))
  4608. ifeq ($(GRIT_FPC),)
  4609. GRIT_FPC= __missing_command_GRIT_FPC
  4610. else
  4611. GRIT_FPC:=$(firstword $(GRIT_FPC))
  4612. endif
  4613. endif
  4614. export GRIT_FPC
  4615. ifndef RMDIR
  4616. RMDIR:=$(strip $(wildcard $(addsuffix /rmdir$(SRCEXEEXT),$(SEARCHPATH))))
  4617. ifeq ($(RMDIR),)
  4618. RMDIR= __missing_command_RMDIR
  4619. else
  4620. RMDIR:=$(firstword $(RMDIR))
  4621. endif
  4622. endif
  4623. export RMDIR
  4624. ifndef MV
  4625. MV:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  4626. ifeq ($(MV),)
  4627. MV= __missing_command_MV
  4628. else
  4629. MV:=$(firstword $(MV))
  4630. endif
  4631. endif
  4632. export MV
  4633. ifndef NDSTOOL
  4634. NDSTOOL:=$(strip $(wildcard $(addsuffix /ndstool$(SRCEXEEXT),$(SEARCHPATH))))
  4635. ifeq ($(NDSTOOL),)
  4636. NDSTOOL= __missing_command_NDSTOOL
  4637. else
  4638. NDSTOOL:=$(firstword $(NDSTOOL))
  4639. endif
  4640. endif
  4641. export NDSTOOL
  4642. debug: fpc_debug
  4643. smart: fpc_smart
  4644. release: fpc_release
  4645. units: fpc_units
  4646. examples:
  4647. shared: fpc_shared
  4648. install: fpc_install
  4649. sourceinstall: fpc_sourceinstall
  4650. exampleinstall: fpc_exampleinstall
  4651. distinstall:
  4652. zipinstall:
  4653. zipsourceinstall:
  4654. zipexampleinstall:
  4655. zipdistinstall:
  4656. distclean: fpc_distclean
  4657. cleanall: fpc_cleanall
  4658. info: fpc_info
  4659. makefiles: fpc_makefiles
  4660. .PHONY: debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
  4661. ifneq ($(wildcard fpcmake.loc),)
  4662. include fpcmake.loc
  4663. endif
  4664. .NOTPARALLEL:
  4665. clean: dir_delete fpc_clean fpc_cleanall
  4666. all: dir_make $(BIN_FILES) $(GFX_FILES) fpc_all
  4667. filesystem: all make_filesystem
  4668. dir_delete:
  4669. @$(DELTREE) $(CURDIR)/$(BUILD)
  4670. @$(DELTREE) $(CURDIR)/$(INC)
  4671. @$(DELTREE) $(CURDIR)/$(BIN)
  4672. dir_make:
  4673. ifneq ($(BUILD), $(CURDIR))
  4674. @$(MKDIR) $(BUILD)
  4675. endif
  4676. ifneq ($(INC), $(CURDIR))
  4677. @$(MKDIR) $(INC)
  4678. endif
  4679. ifneq ($(BIN), $(CURDIR))
  4680. @$(MKDIR) $(BIN)
  4681. endif
  4682. soundbank.bin.o : $(AUDIO_FILES)
  4683. @$(MMUTIL) $^ -d -o$(BUILD)/soundbank.bin -h$(BUILD)/soundbank.h
  4684. $(BIN2S) $(BUILD)/soundbank.bin > $(BUILD)/soundbank.bin.s
  4685. $(AS) -o $(BUILD)/soundbank.bin.o $(BUILD)/soundbank.bin.s
  4686. $(GFX_FILES): $(wildcard %.bmp %.png)
  4687. @echo 'Converting $(@) file to asm...'
  4688. $(GRIT_FPC) $(GFX)/$(@) -fp -fts -ff $(GFX)/$(basename $(@)).grit -o$(BUILD)/$(@)
  4689. @echo 'Assembling $(@).s file...'
  4690. $(AS) -o $(BUILD)/$(basename $(@)).o $(BUILD)/$(basename $(@)).s
  4691. $(MV) -f $(BUILD)/$(basename $(@)).inc $(INC)/$(basename $(@)).inc
  4692. @echo 'Done!'
  4693. $(BIN_FILES): $(wildcard %.*)
  4694. @echo 'Converting $(@) file to asm...'
  4695. @$(BIN2S) $(DATA)/$(@) > $(BUILD)/$(@).s
  4696. @echo 'Creating $(@).inc include file...'
  4697. @echo "var" > `(echo "$(INC)/"$(@F) | tr . .)`.inc
  4698. @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "$(INC)/"$(@F) | tr . .)`.inc
  4699. @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "$(INC)/"$(@F) | tr . .)`.inc
  4700. @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "$(INC)/"$(@F) | tr . .)`.inc
  4701. @echo 'Assembling $(@).s file...'
  4702. @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
  4703. @echo 'Done!'
  4704. data.gbfs.o:
  4705. @cd GBFS && gbfs ../$(BUILD)/data.gbfs $(GBFS_FILES)
  4706. $(BIN2S) $(BUILD)/data.gbfs > $(BUILD)/data.gbfs.s
  4707. $(AS) -o $(BUILD)/data.gbfs.o $(BUILD)/data.gbfs.s
  4708. make_filesystem:
  4709. @$(NDSTOOL) -c $(BIN)/$(TARGET_PROGRAMS).fs.nds -9 $(BIN)/$(TARGET_PROGRAMS).nef.bin -d $(CURDIR)/$(FILESYSTEM)