Makefile 64 KB

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