Makefile 68 KB

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