Makefile 124 KB

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