Makefile 65 KB

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