Makefile 132 KB

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