Makefile 69 KB

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