Makefile 91 KB

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