Makefile 62 KB

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