Makefile 109 KB

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