Makefile 84 KB

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