Makefile 58 KB

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