Makefile 65 KB

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