Makefile 94 KB

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