Makefile 89 KB

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