Makefile 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 1.1 [2003/11/02]
  3. #
  4. default: all
  5. MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
  6. override PATH:=$(subst \,/,$(PATH))
  7. ifeq ($(findstring ;,$(PATH)),)
  8. inUnix=1
  9. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  10. else
  11. SEARCHPATH:=$(subst ;, ,$(PATH))
  12. endif
  13. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  14. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  15. ifeq ($(PWD),)
  16. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  17. ifeq ($(PWD),)
  18. $(error You need the GNU utils package to use this Makefile)
  19. else
  20. PWD:=$(firstword $(PWD))
  21. SRCEXEEXT=
  22. endif
  23. else
  24. PWD:=$(firstword $(PWD))
  25. SRCEXEEXT=.exe
  26. endif
  27. ifndef inUnix
  28. ifeq ($(OS),Windows_NT)
  29. inWinNT=1
  30. else
  31. ifdef OS2_SHELL
  32. inOS2=1
  33. endif
  34. endif
  35. else
  36. ifneq ($(findstring cygdrive,$(PATH)),)
  37. inCygWin=1
  38. endif
  39. endif
  40. ifeq ($(OS_TARGET),freebsd)
  41. BSDhier=1
  42. endif
  43. ifeq ($(OS_TARGET),netbsd)
  44. BSDhier=1
  45. endif
  46. ifeq ($(OS_TARGET),openbsd)
  47. BSDhier=1
  48. endif
  49. ifdef inUnix
  50. BATCHEXT=.sh
  51. else
  52. ifdef inOS2
  53. BATCHEXT=.cmd
  54. else
  55. BATCHEXT=.bat
  56. endif
  57. endif
  58. ifdef inUnix
  59. PATHSEP=/
  60. else
  61. PATHSEP:=$(subst /,\,/)
  62. ifdef inCygWin
  63. PATHSEP=/
  64. endif
  65. endif
  66. ifdef PWD
  67. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  68. ifdef inCygWin
  69. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  70. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  71. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  72. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  73. endif
  74. endif
  75. else
  76. BASEDIR=.
  77. endif
  78. ifdef inOS2
  79. ifndef ECHO
  80. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  81. ifeq ($(ECHO),)
  82. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  83. ifeq ($(ECHO),)
  84. ECHO=echo
  85. else
  86. ECHO:=$(firstword $(ECHO))
  87. endif
  88. else
  89. ECHO:=$(firstword $(ECHO))
  90. endif
  91. endif
  92. export ECHO
  93. endif
  94. override OS_TARGET_DEFAULT=freebsd
  95. override DEFAULT_FPCDIR=../..
  96. ifndef FPC
  97. ifdef PP
  98. FPC=$(PP)
  99. endif
  100. endif
  101. ifndef FPC
  102. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  103. ifneq ($(FPCPROG),)
  104. FPCPROG:=$(firstword $(FPCPROG))
  105. FPC:=$(shell $(FPCPROG) -PB)
  106. ifneq ($(findstring Error,$(FPC)),)
  107. override FPC=ppc386
  108. endif
  109. else
  110. override FPC=ppc386
  111. endif
  112. endif
  113. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  114. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  115. ifndef FPC_VERSION
  116. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  117. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  118. endif
  119. export FPC FPC_VERSION FPC_COMPILERINFO
  120. unexport CHECKDEPEND ALLDEPENDENCIES
  121. ifndef CPU_TARGET
  122. ifdef CPU_TARGET_DEFAULT
  123. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  124. endif
  125. endif
  126. ifndef OS_TARGET
  127. ifdef OS_TARGET_DEFAULT
  128. OS_TARGET=$(OS_TARGET_DEFAULT)
  129. endif
  130. endif
  131. ifneq ($(words $(FPC_COMPILERINFO)),5)
  132. FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
  133. FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
  134. FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
  135. FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
  136. endif
  137. ifndef CPU_SOURCE
  138. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  139. endif
  140. ifndef CPU_TARGET
  141. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  142. endif
  143. ifndef OS_SOURCE
  144. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  145. endif
  146. ifndef OS_TARGET
  147. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  148. endif
  149. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  150. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  151. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  152. CROSSCOMPILE=1
  153. endif
  154. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  155. ifeq ($(findstring $(OS_TARGET),$(MAKEFILETARGETS)),)
  156. $(error The Makefile doesn't support target $(OS_TARGET), please run fpcmake first)
  157. endif
  158. endif
  159. export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE CROSSCOMPILE
  160. ifdef FPCDIR
  161. override FPCDIR:=$(subst \,/,$(FPCDIR))
  162. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  163. override FPCDIR=wrong
  164. endif
  165. else
  166. override FPCDIR=wrong
  167. endif
  168. ifdef DEFAULT_FPCDIR
  169. ifeq ($(FPCDIR),wrong)
  170. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  171. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  172. override FPCDIR=wrong
  173. endif
  174. endif
  175. endif
  176. ifeq ($(FPCDIR),wrong)
  177. ifdef inUnix
  178. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  179. ifeq ($(wildcard $(FPCDIR)/units),)
  180. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  181. endif
  182. else
  183. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  184. override FPCDIR:=$(FPCDIR)/..
  185. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  186. override FPCDIR:=$(FPCDIR)/..
  187. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  188. override FPCDIR=c:/pp
  189. endif
  190. endif
  191. endif
  192. endif
  193. ifndef CROSSDIR
  194. CROSSDIR:=$(FPCDIR)/cross/$(FULL_TARGET)
  195. endif
  196. ifndef CROSSTARGETDIR
  197. CROSSTARGETDIR=$(CROSSDIR)/$(FULL_TARGET)
  198. endif
  199. ifdef CROSSCOMPILE
  200. UNITSDIR:=$(wildcard $(CROSSTARGETDIR)/units)
  201. ifeq ($(UNITSDIR),)
  202. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  203. endif
  204. else
  205. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  206. endif
  207. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
  208. override PACKAGE_NAME=rtl
  209. RTL=..
  210. INC=$(RTL)/inc
  211. PROCINC=$(RTL)/$(CPU_TARGET)
  212. BSDINC=$(RTL)/bsd
  213. BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
  214. UNIXINC=$(RTL)/unix
  215. UNITPREFIX=rtl
  216. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  217. SYSTEMUNIT=system
  218. LINUXUNIT=
  219. PRT0=prt0
  220. override FPCOPT+=-dNOMOUSE
  221. loaders+=gprt0
  222. else
  223. SYSTEMUNIT=sysbsd
  224. LINUXUNIT=linux
  225. override FPCOPT+=-dUNIX -dNOMOUSE
  226. PRT0=prt0_10
  227. endif
  228. ifdef RELEASE
  229. override FPCOPT+=-Ur
  230. endif
  231. OBJPASDIR=$(RTL)/objpas
  232. GRAPHDIR=$(INC)/graph
  233. ifndef USELIBGGI
  234. USELIBGGI=NO
  235. endif
  236. override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings baseunix syscall unixutil $(LINUXUNIT) unix initc dos dl crt objects printer sysutils typinfo classes math varutils cpu mmx charset ucomplex getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard console serial variants types systhrds sysctl
  237. override TARGET_LOADERS+=prt0 cprt0 gprt0
  238. override TARGET_RSTS+=math varutils typinfo classes variants
  239. override INSTALL_FPCPACKAGE=y y
  240. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC)
  241. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
  242. override COMPILER_TARGETDIR+=.
  243. ifdef REQUIRE_UNITSDIR
  244. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  245. endif
  246. ifdef REQUIRE_PACKAGESDIR
  247. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  248. endif
  249. ifdef ZIPINSTALL
  250. ifeq ($(OS_TARGET),linux)
  251. UNIXINSTALLDIR=1
  252. endif
  253. ifeq ($(OS_TARGET),freebsd)
  254. UNIXINSTALLDIR=1
  255. endif
  256. ifeq ($(OS_TARGET),netbsd)
  257. UNIXINSTALLDIR=1
  258. endif
  259. ifeq ($(OS_TARGET),openbsd)
  260. UNIXINSTALLDIR=1
  261. endif
  262. ifeq ($(OS_TARGET),sunos)
  263. UNIXINSTALLDIR=1
  264. endif
  265. ifeq ($(OS_TARGET),qnx)
  266. UNIXINSTALLDIR=1
  267. endif
  268. else
  269. ifeq ($(OS_SOURCE),linux)
  270. UNIXINSTALLDIR=1
  271. endif
  272. ifeq ($(OS_SOURCE),freebsd)
  273. UNIXINSTALLDIR=1
  274. endif
  275. ifeq ($(OS_SOURCE),netbsd)
  276. UNIXINSTALLDIR=1
  277. endif
  278. ifeq ($(OS_SOURCE),openbsd)
  279. UNIXINSTALLDIR=1
  280. endif
  281. ifeq ($(OS_TARGET),sunos)
  282. UNIXINSTALLDIR=1
  283. endif
  284. ifeq ($(OS_TARGET),qnx)
  285. UNIXINSTALLDIR=1
  286. endif
  287. endif
  288. ifndef INSTALL_PREFIX
  289. ifdef PREFIX
  290. INSTALL_PREFIX=$(PREFIX)
  291. endif
  292. endif
  293. ifndef INSTALL_PREFIX
  294. ifdef UNIXINSTALLDIR
  295. INSTALL_PREFIX=/usr/local
  296. else
  297. ifdef INSTALL_FPCPACKAGE
  298. INSTALL_BASEDIR:=/pp
  299. else
  300. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  301. endif
  302. endif
  303. endif
  304. export INSTALL_PREFIX
  305. ifdef INSTALL_FPCSUBDIR
  306. export INSTALL_FPCSUBDIR
  307. endif
  308. ifndef DIST_DESTDIR
  309. DIST_DESTDIR:=$(BASEDIR)
  310. endif
  311. export DIST_DESTDIR
  312. ifndef INSTALL_BASEDIR
  313. ifdef UNIXINSTALLDIR
  314. ifdef INSTALL_FPCPACKAGE
  315. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  316. else
  317. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  318. endif
  319. else
  320. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  321. endif
  322. endif
  323. ifndef INSTALL_BINDIR
  324. ifdef UNIXINSTALLDIR
  325. ifdef CROSSCOMPILE
  326. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/bin
  327. else
  328. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  329. endif
  330. else
  331. ifdef CROSSCOMPILE
  332. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/bin
  333. else
  334. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  335. endif
  336. ifdef INSTALL_FPCPACKAGE
  337. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(OS_TARGET)
  338. endif
  339. endif
  340. endif
  341. ifndef INSTALL_UNITDIR
  342. ifdef CROSSCOMPILE
  343. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/units
  344. else
  345. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(OS_TARGET)
  346. endif
  347. ifdef INSTALL_FPCPACKAGE
  348. ifdef PACKAGE_NAME
  349. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  350. endif
  351. endif
  352. endif
  353. ifndef INSTALL_LIBDIR
  354. ifdef UNIXINSTALLDIR
  355. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  356. else
  357. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  358. endif
  359. endif
  360. ifndef INSTALL_SOURCEDIR
  361. ifdef UNIXINSTALLDIR
  362. ifdef BSDhier
  363. SRCPREFIXDIR=share/src
  364. else
  365. SRCPREFIXDIR=src
  366. endif
  367. ifdef INSTALL_FPCPACKAGE
  368. ifdef INSTALL_FPCSUBDIR
  369. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  370. else
  371. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  372. endif
  373. else
  374. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  375. endif
  376. else
  377. ifdef INSTALL_FPCPACKAGE
  378. ifdef INSTALL_FPCSUBDIR
  379. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  380. else
  381. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  382. endif
  383. else
  384. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  385. endif
  386. endif
  387. endif
  388. ifndef INSTALL_DOCDIR
  389. ifdef UNIXINSTALLDIR
  390. ifdef BSDhier
  391. DOCPREFIXDIR=share/doc
  392. else
  393. DOCPREFIXDIR=doc
  394. endif
  395. ifdef INSTALL_FPCPACKAGE
  396. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  397. else
  398. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  399. endif
  400. else
  401. ifdef INSTALL_FPCPACKAGE
  402. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  403. else
  404. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  405. endif
  406. endif
  407. endif
  408. ifndef INSTALL_EXAMPLEDIR
  409. ifdef UNIXINSTALLDIR
  410. ifdef INSTALL_FPCPACKAGE
  411. ifdef BSDhier
  412. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  413. else
  414. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  415. endif
  416. else
  417. ifdef BSDhier
  418. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  419. else
  420. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  421. endif
  422. endif
  423. else
  424. ifdef INSTALL_FPCPACKAGE
  425. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  426. else
  427. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  428. endif
  429. endif
  430. endif
  431. ifndef INSTALL_DATADIR
  432. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  433. endif
  434. ifdef CROSSCOMPILE
  435. ifndef CROSSBINDIR
  436. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(FULL_SOURCE))
  437. ifeq ($(CROSSBINDIR),)
  438. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/bin/$(FULL_SOURCE))
  439. endif
  440. endif
  441. else
  442. CROSSBINDIR=
  443. endif
  444. LOADEREXT=.as
  445. EXEEXT=.exe
  446. PPLEXT=.ppl
  447. PPUEXT=.ppu
  448. OEXT=.o
  449. ASMEXT=.s
  450. SMARTEXT=.sl
  451. STATICLIBEXT=.a
  452. SHAREDLIBEXT=.so
  453. STATICLIBPREFIX=libp
  454. RSTEXT=.rst
  455. FPCMADE=fpcmade
  456. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  457. ifeq ($(OS_TARGET),go32v1)
  458. STATICLIBPREFIX=
  459. FPCMADE=fpcmade.v1
  460. PACKAGESUFFIX=v1
  461. endif
  462. ifeq ($(OS_TARGET),go32v2)
  463. STATICLIBPREFIX=
  464. FPCMADE=fpcmade.dos
  465. ZIPSUFFIX=go32
  466. endif
  467. ifeq ($(OS_TARGET),watcom)
  468. STATICLIBPREFIX=
  469. FPCMADE=fpcmade.wat
  470. ZIPSUFFIX=watc
  471. OEXT=.obj
  472. ASMEXT=.asm
  473. SHAREDLIBEXT=.dll
  474. endif
  475. ifeq ($(OS_TARGET),linux)
  476. EXEEXT=
  477. HASSHAREDLIB=1
  478. FPCMADE=fpcmade.lnx
  479. ZIPSUFFIX=linux
  480. endif
  481. ifeq ($(OS_TARGET),freebsd)
  482. EXEEXT=
  483. HASSHAREDLIB=1
  484. FPCMADE=fpcmade.freebsd
  485. ZIPSUFFIX=freebsd
  486. endif
  487. ifeq ($(OS_TARGET),netbsd)
  488. EXEEXT=
  489. HASSHAREDLIB=1
  490. FPCMADE=fpcmade.netbsd
  491. ZIPSUFFIX=netbsd
  492. endif
  493. ifeq ($(OS_TARGET),openbsd)
  494. EXEEXT=
  495. HASSHAREDLIB=1
  496. FPCMADE=fpcmade.openbsd
  497. ZIPSUFFIX=openbsd
  498. endif
  499. ifeq ($(OS_TARGET),win32)
  500. SHAREDLIBEXT=.dll
  501. FPCMADE=fpcmade.w32
  502. ZIPSUFFIX=w32
  503. endif
  504. ifeq ($(OS_TARGET),os2)
  505. AOUTEXT=.out
  506. STATICLIBPREFIX=
  507. SHAREDLIBEXT=.dll
  508. FPCMADE=fpcmade.os2
  509. ZIPSUFFIX=os2
  510. ECHO=echo
  511. endif
  512. ifeq ($(OS_TARGET),emx)
  513. AOUTEXT=.out
  514. STATICLIBPREFIX=
  515. SHAREDLIBEXT=.dll
  516. FPCMADE=fpcmade.emx
  517. ZIPSUFFIX=emx
  518. ECHO=echo
  519. endif
  520. ifeq ($(OS_TARGET),amiga)
  521. EXEEXT=
  522. SHAREDLIBEXT=.library
  523. FPCMADE=fpcmade.amg
  524. endif
  525. ifeq ($(OS_TARGET),atari)
  526. EXEEXT=.ttp
  527. FPCMADE=fpcmade.ata
  528. endif
  529. ifeq ($(OS_TARGET),beos)
  530. EXEEXT=
  531. FPCMADE=fpcmade.be
  532. ZIPSUFFIX=be
  533. endif
  534. ifeq ($(OS_TARGET),sunos)
  535. EXEEXT=
  536. FPCMADE=fpcmade.sun
  537. ZIPSUFFIX=sun
  538. endif
  539. ifeq ($(OS_TARGET),qnx)
  540. EXEEXT=
  541. FPCMADE=fpcmade.qnx
  542. ZIPSUFFIX=qnx
  543. endif
  544. ifeq ($(OS_TARGET),netware)
  545. EXEEXT=.nlm
  546. STATICLIBPREFIX=
  547. FPCMADE=fpcmade.nw
  548. ZIPSUFFIX=nw
  549. endif
  550. ifeq ($(OS_TARGET),macos)
  551. EXEEXT=
  552. FPCMADE=fpcmade.mcc
  553. endif
  554. ifeq ($(OS_TARGET),darwin)
  555. EXEEXT=
  556. HASSHAREDLIB=1
  557. FPCMADE=fpcmade.darwin
  558. ZIPSUFFIX=darwin
  559. endif
  560. else
  561. ifeq ($(OS_TARGET),go32v1)
  562. PPUEXT=.pp1
  563. OEXT=.o1
  564. ASMEXT=.s1
  565. SMARTEXT=.sl1
  566. STATICLIBEXT=.a1
  567. SHAREDLIBEXT=.so1
  568. STATICLIBPREFIX=
  569. FPCMADE=fpcmade.v1
  570. PACKAGESUFFIX=v1
  571. endif
  572. ifeq ($(OS_TARGET),go32v2)
  573. STATICLIBPREFIX=
  574. FPCMADE=fpcmade.dos
  575. ZIPSUFFIX=go32
  576. endif
  577. ifeq ($(OS_TARGET),watcom)
  578. STATICLIBPREFIX=
  579. FPCMADE=fpcmade.dos
  580. ZIPSUFFIX=watcom
  581. endif
  582. ifeq ($(OS_TARGET),linux)
  583. EXEEXT=
  584. HASSHAREDLIB=1
  585. FPCMADE=fpcmade.lnx
  586. ZIPSUFFIX=linux
  587. endif
  588. ifeq ($(OS_TARGET),freebsd)
  589. EXEEXT=
  590. HASSHAREDLIB=1
  591. FPCMADE=fpcmade.freebsd
  592. ZIPSUFFIX=freebsd
  593. endif
  594. ifeq ($(OS_TARGET),netbsd)
  595. EXEEXT=
  596. HASSHAREDLIB=1
  597. FPCMADE=fpcmade.netbsd
  598. ZIPSUFFIX=netbsd
  599. endif
  600. ifeq ($(OS_TARGET),openbsd)
  601. EXEEXT=
  602. HASSHAREDLIB=1
  603. FPCMADE=fpcmade.openbsd
  604. ZIPSUFFIX=openbsd
  605. endif
  606. ifeq ($(OS_TARGET),win32)
  607. PPUEXT=.ppw
  608. OEXT=.ow
  609. ASMEXT=.sw
  610. SMARTEXT=.slw
  611. STATICLIBEXT=.aw
  612. SHAREDLIBEXT=.dll
  613. FPCMADE=fpcmade.w32
  614. ZIPSUFFIX=w32
  615. endif
  616. ifeq ($(OS_TARGET),os2)
  617. PPUEXT=.ppo
  618. ASMEXT=.so2
  619. OEXT=.oo2
  620. AOUTEXT=.out
  621. SMARTEXT=.sl2
  622. STATICLIBPREFIX=
  623. STATICLIBEXT=.ao2
  624. SHAREDLIBEXT=.dll
  625. FPCMADE=fpcmade.os2
  626. ZIPSUFFIX=emx
  627. ECHO=echo
  628. endif
  629. ifeq ($(OS_TARGET),amiga)
  630. EXEEXT=
  631. PPUEXT=.ppu
  632. ASMEXT=.asm
  633. OEXT=.o
  634. SMARTEXT=.sl
  635. STATICLIBEXT=.a
  636. SHAREDLIBEXT=.library
  637. FPCMADE=fpcmade.amg
  638. endif
  639. ifeq ($(OS_TARGET),atari)
  640. PPUEXT=.ppu
  641. ASMEXT=.s
  642. OEXT=.o
  643. SMARTEXT=.sl
  644. STATICLIBEXT=.a
  645. EXEEXT=.ttp
  646. FPCMADE=fpcmade.ata
  647. endif
  648. ifeq ($(OS_TARGET),beos)
  649. PPUEXT=.ppu
  650. ASMEXT=.s
  651. OEXT=.o
  652. SMARTEXT=.sl
  653. STATICLIBEXT=.a
  654. EXEEXT=
  655. FPCMADE=fpcmade.be
  656. ZIPSUFFIX=be
  657. endif
  658. ifeq ($(OS_TARGET),sunos)
  659. PPUEXT=.ppu
  660. ASMEXT=.s
  661. OEXT=.o
  662. SMARTEXT=.sl
  663. STATICLIBEXT=.a
  664. EXEEXT=
  665. FPCMADE=fpcmade.sun
  666. ZIPSUFFIX=sun
  667. endif
  668. ifeq ($(OS_TARGET),qnx)
  669. PPUEXT=.ppu
  670. ASMEXT=.s
  671. OEXT=.o
  672. SMARTEXT=.sl
  673. STATICLIBEXT=.a
  674. EXEEXT=
  675. FPCMADE=fpcmade.qnx
  676. ZIPSUFFIX=qnx
  677. endif
  678. ifeq ($(OS_TARGET),netware)
  679. STATICLIBPREFIX=
  680. PPUEXT=.ppu
  681. OEXT=.o
  682. ASMEXT=.s
  683. SMARTEXT=.sl
  684. STATICLIBEXT=.a
  685. SHAREDLIBEXT=.nlm
  686. FPCMADE=fpcmade.nw
  687. ZIPSUFFIX=nw
  688. EXEEXT=.nlm
  689. endif
  690. ifeq ($(OS_TARGET),macos)
  691. PPUEXT=.ppu
  692. ASMEXT=.s
  693. OEXT=.o
  694. SMARTEXT=.sl
  695. STATICLIBEXT=.a
  696. EXEEXT=
  697. FPCMADE=fpcmade.mcc
  698. endif
  699. endif
  700. ifndef ECHO
  701. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  702. ifeq ($(ECHO),)
  703. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  704. ifeq ($(ECHO),)
  705. ECHO=
  706. else
  707. ECHO:=$(firstword $(ECHO))
  708. endif
  709. else
  710. ECHO:=$(firstword $(ECHO))
  711. endif
  712. endif
  713. export ECHO
  714. ifndef DATE
  715. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  716. ifeq ($(DATE),)
  717. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  718. ifeq ($(DATE),)
  719. DATE=
  720. else
  721. DATE:=$(firstword $(DATE))
  722. endif
  723. else
  724. DATE:=$(firstword $(DATE))
  725. endif
  726. endif
  727. export DATE
  728. ifndef GINSTALL
  729. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  730. ifeq ($(GINSTALL),)
  731. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  732. ifeq ($(GINSTALL),)
  733. GINSTALL=
  734. else
  735. GINSTALL:=$(firstword $(GINSTALL))
  736. endif
  737. else
  738. GINSTALL:=$(firstword $(GINSTALL))
  739. endif
  740. endif
  741. export GINSTALL
  742. ifndef CPPROG
  743. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  744. ifeq ($(CPPROG),)
  745. CPPROG=
  746. else
  747. CPPROG:=$(firstword $(CPPROG))
  748. endif
  749. endif
  750. export CPPROG
  751. ifndef RMPROG
  752. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  753. ifeq ($(RMPROG),)
  754. RMPROG=
  755. else
  756. RMPROG:=$(firstword $(RMPROG))
  757. endif
  758. endif
  759. export RMPROG
  760. ifndef MVPROG
  761. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  762. ifeq ($(MVPROG),)
  763. MVPROG=
  764. else
  765. MVPROG:=$(firstword $(MVPROG))
  766. endif
  767. endif
  768. export MVPROG
  769. ifndef ECHOREDIR
  770. ifndef inUnix
  771. ECHOREDIR=echo
  772. else
  773. ECHOREDIR=$(ECHO)
  774. endif
  775. endif
  776. ifndef COPY
  777. COPY:=$(CPPROG) -fp
  778. endif
  779. ifndef COPYTREE
  780. COPYTREE:=$(CPPROG) -rfp
  781. endif
  782. ifndef MOVE
  783. MOVE:=$(MVPROG) -f
  784. endif
  785. ifndef DEL
  786. DEL:=$(RMPROG) -f
  787. endif
  788. ifndef DELTREE
  789. DELTREE:=$(RMPROG) -rf
  790. endif
  791. ifndef INSTALL
  792. ifdef inUnix
  793. INSTALL:=$(GINSTALL) -c -m 644
  794. else
  795. INSTALL:=$(COPY)
  796. endif
  797. endif
  798. ifndef INSTALLEXE
  799. ifdef inUnix
  800. INSTALLEXE:=$(GINSTALL) -c -m 755
  801. else
  802. INSTALLEXE:=$(COPY)
  803. endif
  804. endif
  805. ifndef MKDIR
  806. MKDIR:=$(GINSTALL) -m 755 -d
  807. endif
  808. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  809. ifndef PPUMOVE
  810. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  811. ifeq ($(PPUMOVE),)
  812. PPUMOVE=
  813. else
  814. PPUMOVE:=$(firstword $(PPUMOVE))
  815. endif
  816. endif
  817. export PPUMOVE
  818. ifndef FPCMAKE
  819. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  820. ifeq ($(FPCMAKE),)
  821. FPCMAKE=
  822. else
  823. FPCMAKE:=$(firstword $(FPCMAKE))
  824. endif
  825. endif
  826. export FPCMAKE
  827. ifndef ZIPPROG
  828. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  829. ifeq ($(ZIPPROG),)
  830. ZIPPROG=
  831. else
  832. ZIPPROG:=$(firstword $(ZIPPROG))
  833. endif
  834. endif
  835. export ZIPPROG
  836. ifndef TARPROG
  837. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  838. ifeq ($(TARPROG),)
  839. TARPROG=
  840. else
  841. TARPROG:=$(firstword $(TARPROG))
  842. endif
  843. endif
  844. export TARPROG
  845. ASNAME=$(BINUTILSPREFIX)as
  846. LDNAME=$(BINUTILSPREFIX)ld
  847. ARNAME=$(BINUTILSPREFIX)ar
  848. RCNAME=$(BINUTILSPREFIX)rc
  849. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  850. ifeq ($(OS_TARGET),win32)
  851. ASNAME=as
  852. LDNAME=ld
  853. ARNAME=ar
  854. endif
  855. endif
  856. ifndef ASPROG
  857. ifdef CROSSBINDIR
  858. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  859. else
  860. ASPROG=$(ASNAME)
  861. endif
  862. endif
  863. ifndef LDPROG
  864. ifdef CROSSBINDIR
  865. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  866. else
  867. LDPROG=$(LDNAME)
  868. endif
  869. endif
  870. ifndef RCPROG
  871. ifdef CROSSBINDIR
  872. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  873. else
  874. RCPROG=$(RCNAME)
  875. endif
  876. endif
  877. ifndef ARPROG
  878. ifdef CROSSBINDIR
  879. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  880. else
  881. ARPROG=$(ARNAME)
  882. endif
  883. endif
  884. AS=$(ASPROG)
  885. LD=$(LDPROG)
  886. RC=$(RCPROG)
  887. AR=$(ARPROG)
  888. PPAS=ppas$(BATCHEXT)
  889. ifdef inUnix
  890. LDCONFIG=ldconfig
  891. else
  892. LDCONFIG=
  893. endif
  894. ifdef DATE
  895. DATESTR:=$(shell $(DATE) +%Y%m%d)
  896. else
  897. DATESTR=
  898. endif
  899. ifndef UPXPROG
  900. ifeq ($(OS_TARGET),go32v2)
  901. UPXPROG:=1
  902. endif
  903. ifeq ($(OS_TARGET),win32)
  904. UPXPROG:=1
  905. endif
  906. ifdef UPXPROG
  907. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  908. ifeq ($(UPXPROG),)
  909. UPXPROG=
  910. else
  911. UPXPROG:=$(firstword $(UPXPROG))
  912. endif
  913. else
  914. UPXPROG=
  915. endif
  916. endif
  917. export UPXPROG
  918. ZIPOPT=-9
  919. ZIPEXT=.zip
  920. ifeq ($(USETAR),bz2)
  921. TAROPT=vI
  922. TAREXT=.tar.bz2
  923. else
  924. TAROPT=vz
  925. TAREXT=.tar.gz
  926. endif
  927. ifndef NOCPUDEF
  928. override FPCOPTDEF=$(CPU_TARGET)
  929. endif
  930. ifneq ($(OS_TARGET),$(OS_SOURCE))
  931. override FPCOPT+=-T$(OS_TARGET)
  932. endif
  933. ifeq ($(OS_SOURCE),openbsd)
  934. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  935. endif
  936. ifndef CROSSBOOTSTRAP
  937. ifneq ($(BINUTILSPREFIX),)
  938. override FPCOPT+=-XP$(BINUTILSPREFIX) -Xc
  939. endif
  940. ifneq ($(BINUTILSPREFIX),)
  941. override FPCOPT+=-Xr$(RLINKPATH)
  942. endif
  943. endif
  944. ifdef UNITDIR
  945. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  946. endif
  947. ifdef LIBDIR
  948. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  949. endif
  950. ifdef OBJDIR
  951. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  952. endif
  953. ifdef INCDIR
  954. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  955. endif
  956. ifdef LINKSMART
  957. override FPCOPT+=-XX
  958. endif
  959. ifdef CREATESMART
  960. override FPCOPT+=-CX
  961. endif
  962. ifdef DEBUG
  963. override FPCOPT+=-gl
  964. override FPCOPTDEF+=DEBUG
  965. endif
  966. ifdef RELEASE
  967. ifeq ($(CPU_TARGET),i386)
  968. FPCCPUOPT:=-OG2p3
  969. else
  970. FPCCPUOPT:=
  971. endif
  972. override FPCOPT+=-Xs $(FPCCPUOPT) -n
  973. override FPCOPTDEF+=RELEASE
  974. endif
  975. ifdef STRIP
  976. override FPCOPT+=-Xs
  977. endif
  978. ifdef OPTIMIZE
  979. ifeq ($(CPU_TARGET),i386)
  980. override FPCOPT+=-OG2p3
  981. endif
  982. endif
  983. ifdef VERBOSE
  984. override FPCOPT+=-vwni
  985. endif
  986. ifdef COMPILER_OPTIONS
  987. override FPCOPT+=$(COMPILER_OPTIONS)
  988. endif
  989. ifdef COMPILER_UNITDIR
  990. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  991. endif
  992. ifdef COMPILER_LIBRARYDIR
  993. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  994. endif
  995. ifdef COMPILER_OBJECTDIR
  996. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  997. endif
  998. ifdef COMPILER_INCLUDEDIR
  999. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1000. endif
  1001. ifdef CROSSBINDIR
  1002. override FPCOPT+=-FD$(CROSSBINDIR)
  1003. endif
  1004. ifdef COMPILER_TARGETDIR
  1005. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1006. ifeq ($(COMPILER_TARGETDIR),.)
  1007. override TARGETDIRPREFIX=
  1008. else
  1009. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1010. endif
  1011. endif
  1012. ifdef COMPILER_UNITTARGETDIR
  1013. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1014. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1015. override UNITTARGETDIRPREFIX=
  1016. else
  1017. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1018. endif
  1019. else
  1020. ifdef COMPILER_TARGETDIR
  1021. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1022. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1023. endif
  1024. endif
  1025. ifeq ($(OS_TARGET),linux)
  1026. ifeq ($(FPC_VERSION),1.0.6)
  1027. override FPCOPTDEF+=HASUNIX
  1028. endif
  1029. endif
  1030. ifdef OPT
  1031. override FPCOPT+=$(OPT)
  1032. endif
  1033. ifdef FPCOPTDEF
  1034. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1035. endif
  1036. ifdef CFGFILE
  1037. override FPCOPT+=@$(CFGFILE)
  1038. endif
  1039. ifdef USEENV
  1040. override FPCEXTCMD:=$(FPCOPT)
  1041. override FPCOPT:=!FPCEXTCMD
  1042. export FPCEXTCMD
  1043. endif
  1044. override COMPILER:=$(FPC) $(FPCOPT)
  1045. ifeq (,$(findstring -s ,$(COMPILER)))
  1046. EXECPPAS=
  1047. else
  1048. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1049. EXECPPAS:=@$(PPAS)
  1050. endif
  1051. endif
  1052. .PHONY: fpc_loaders
  1053. ifdef TARGET_LOADERS
  1054. override ALLTARGET+=fpc_loaders
  1055. override CLEANTARGET+=fpc_loaders_clean
  1056. override INSTALLTARGET+=fpc_loaders_install
  1057. override LOADEROFILES:=$(addsuffix $(OEXT),$(TARGET_LOADERS))
  1058. endif
  1059. %$(OEXT): %$(LOADEREXT)
  1060. $(AS) -o $*$(OEXT) $<
  1061. fpc_loaders: $(LOADEROFILES)
  1062. fpc_loaders_clean:
  1063. -$(DEL) $(LOADEROFILES)
  1064. fpc_loaders_install:
  1065. $(MKDIR) $(INSTALL_UNITDIR)
  1066. $(INSTALL) $(LOADEROFILES) $(INSTALL_UNITDIR)
  1067. .PHONY: fpc_units
  1068. ifdef TARGET_UNITS
  1069. override ALLTARGET+=fpc_units
  1070. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  1071. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  1072. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1073. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1074. endif
  1075. fpc_units: $(UNITPPUFILES)
  1076. ifdef TARGET_RSTS
  1077. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  1078. override CLEANRSTFILES+=$(RSTFILES)
  1079. endif
  1080. .PHONY: fpc_all fpc_smart fpc_debug fpc_release
  1081. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  1082. @$(ECHOREDIR) Compiled > $(FPCMADE)
  1083. fpc_all: $(FPCMADE)
  1084. fpc_smart:
  1085. $(MAKE) all LINKSMART=1 CREATESMART=1
  1086. fpc_debug:
  1087. $(MAKE) all DEBUG=1
  1088. fpc_release:
  1089. $(MAKE) all RELEASE=1
  1090. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .dpr .pp .rc .res
  1091. %$(PPUEXT): %.pp
  1092. $(COMPILER) $<
  1093. $(EXECPPAS)
  1094. %$(PPUEXT): %.pas
  1095. $(COMPILER) $<
  1096. $(EXECPPAS)
  1097. %$(EXEEXT): %.pp
  1098. $(COMPILER) $<
  1099. $(EXECPPAS)
  1100. %$(EXEEXT): %.pas
  1101. $(COMPILER) $<
  1102. $(EXECPPAS)
  1103. %$(EXEEXT): %.dpr
  1104. $(COMPILER) $<
  1105. $(EXECPPAS)
  1106. %.res: %.rc
  1107. windres -i $< -o $@
  1108. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1109. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1110. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1111. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  1112. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  1113. ifdef INSTALL_UNITS
  1114. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  1115. endif
  1116. ifdef INSTALL_BUILDUNIT
  1117. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  1118. endif
  1119. ifdef INSTALLPPUFILES
  1120. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1121. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
  1122. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)))
  1123. override INSTALL_CREATEPACKAGEFPC=1
  1124. endif
  1125. ifdef INSTALLEXEFILES
  1126. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
  1127. endif
  1128. fpc_install: all $(INSTALLTARGET)
  1129. ifdef INSTALLEXEFILES
  1130. $(MKDIR) $(INSTALL_BINDIR)
  1131. ifdef UPXPROG
  1132. -$(UPXPROG) $(INSTALLEXEFILES)
  1133. endif
  1134. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  1135. endif
  1136. ifdef INSTALL_CREATEPACKAGEFPC
  1137. ifdef FPCMAKE
  1138. ifdef PACKAGE_VERSION
  1139. ifneq ($(wildcard Makefile.fpc),)
  1140. $(FPCMAKE) -p -T$(OS_TARGET) Makefile.fpc
  1141. $(MKDIR) $(INSTALL_UNITDIR)
  1142. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  1143. endif
  1144. endif
  1145. endif
  1146. endif
  1147. ifdef INSTALLPPUFILES
  1148. $(MKDIR) $(INSTALL_UNITDIR)
  1149. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  1150. ifneq ($(INSTALLPPULINKFILES),)
  1151. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  1152. endif
  1153. ifneq ($(wildcard $(LIB_FULLNAME)),)
  1154. $(MKDIR) $(INSTALL_LIBDIR)
  1155. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  1156. ifdef inUnix
  1157. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  1158. endif
  1159. endif
  1160. endif
  1161. ifdef INSTALL_FILES
  1162. $(MKDIR) $(INSTALL_DATADIR)
  1163. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  1164. endif
  1165. fpc_sourceinstall: distclean
  1166. $(MKDIR) $(INSTALL_SOURCEDIR)
  1167. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  1168. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  1169. ifdef HASEXAMPLES
  1170. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  1171. endif
  1172. ifdef EXAMPLESOURCEFILES
  1173. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  1174. endif
  1175. ifdef TARGET_EXAMPLEDIRS
  1176. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  1177. endif
  1178. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  1179. ifdef EXEFILES
  1180. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  1181. endif
  1182. ifdef CLEAN_UNITS
  1183. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  1184. endif
  1185. ifdef CLEANPPUFILES
  1186. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  1187. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  1188. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  1189. endif
  1190. fpc_clean: $(CLEANTARGET)
  1191. ifdef CLEANEXEFILES
  1192. -$(DEL) $(CLEANEXEFILES)
  1193. endif
  1194. ifdef CLEANPPUFILES
  1195. -$(DEL) $(CLEANPPUFILES)
  1196. endif
  1197. ifneq ($(CLEANPPULINKFILES),)
  1198. -$(DEL) $(CLEANPPULINKFILES)
  1199. endif
  1200. ifdef CLEANRSTFILES
  1201. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1202. endif
  1203. ifdef CLEAN_FILES
  1204. -$(DEL) $(CLEAN_FILES)
  1205. endif
  1206. ifdef LIB_NAME
  1207. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  1208. endif
  1209. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1210. fpc_distclean: clean
  1211. ifdef COMPILER_UNITTARGETDIR
  1212. TARGETDIRCLEAN=fpc_clean
  1213. endif
  1214. fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
  1215. ifdef CLEANEXEFILES
  1216. -$(DEL) $(CLEANEXEFILES)
  1217. endif
  1218. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  1219. -$(DELTREE) *$(SMARTEXT)
  1220. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1221. ifdef AOUTEXT
  1222. -$(DEL) *$(AOUTEXT)
  1223. endif
  1224. .PHONY: fpc_baseinfo
  1225. override INFORULES+=fpc_baseinfo
  1226. fpc_baseinfo:
  1227. @$(ECHO)
  1228. @$(ECHO) == Package info ==
  1229. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  1230. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  1231. @$(ECHO)
  1232. @$(ECHO) == Configuration info ==
  1233. @$(ECHO)
  1234. @$(ECHO) FPC.......... $(FPC)
  1235. @$(ECHO) FPC Version.. $(FPC_VERSION)
  1236. @$(ECHO) Source CPU... $(CPU_SOURCE)
  1237. @$(ECHO) Target CPU... $(CPU_TARGET)
  1238. @$(ECHO) Source OS.... $(OS_SOURCE)
  1239. @$(ECHO) Target OS.... $(OS_TARGET)
  1240. @$(ECHO) Full Source.. $(FULL_SOURCE)
  1241. @$(ECHO) Full Target.. $(FULL_TARGET)
  1242. @$(ECHO)
  1243. @$(ECHO) == Directory info ==
  1244. @$(ECHO)
  1245. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  1246. @$(ECHO)
  1247. @$(ECHO) Basedir......... $(BASEDIR)
  1248. @$(ECHO) FPCDir.......... $(FPCDIR)
  1249. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  1250. @$(ECHO) UnitsDir........ $(UNITSDIR)
  1251. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  1252. @$(ECHO)
  1253. @$(ECHO) GCC library..... $(GCCLIBDIR)
  1254. @$(ECHO) Other library... $(OTHERLIBDIR)
  1255. @$(ECHO)
  1256. @$(ECHO) == Tools info ==
  1257. @$(ECHO)
  1258. @$(ECHO) As........ $(AS)
  1259. @$(ECHO) Ld........ $(LD)
  1260. @$(ECHO) Ar........ $(AR)
  1261. @$(ECHO) Rc........ $(RC)
  1262. @$(ECHO)
  1263. @$(ECHO) Mv........ $(MVPROG)
  1264. @$(ECHO) Cp........ $(CPPROG)
  1265. @$(ECHO) Rm........ $(RMPROG)
  1266. @$(ECHO) GInstall.. $(GINSTALL)
  1267. @$(ECHO) Echo...... $(ECHO)
  1268. @$(ECHO) Shell..... $(SHELL)
  1269. @$(ECHO) Date...... $(DATE)
  1270. @$(ECHO) FPCMake... $(FPCMAKE)
  1271. @$(ECHO) PPUMove... $(PPUMOVE)
  1272. @$(ECHO) Upx....... $(UPXPROG)
  1273. @$(ECHO) Zip....... $(ZIPPROG)
  1274. @$(ECHO)
  1275. @$(ECHO) == Object info ==
  1276. @$(ECHO)
  1277. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  1278. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  1279. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  1280. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  1281. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  1282. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  1283. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  1284. @$(ECHO)
  1285. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  1286. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  1287. @$(ECHO)
  1288. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  1289. @$(ECHO) Install Files....... $(INSTALL_FILES)
  1290. @$(ECHO)
  1291. @$(ECHO) == Install info ==
  1292. @$(ECHO)
  1293. @$(ECHO) DateStr.............. $(DATESTR)
  1294. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  1295. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  1296. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  1297. @$(ECHO)
  1298. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  1299. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  1300. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  1301. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  1302. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  1303. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  1304. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  1305. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  1306. @$(ECHO)
  1307. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  1308. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  1309. @$(ECHO)
  1310. .PHONY: fpc_info
  1311. fpc_info: $(INFORULES)
  1312. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  1313. fpc_makefile_dirs
  1314. fpc_makefile:
  1315. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  1316. fpc_makefile_sub1:
  1317. ifdef TARGET_DIRS
  1318. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  1319. endif
  1320. ifdef TARGET_EXAMPLEDIRS
  1321. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  1322. endif
  1323. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  1324. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  1325. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  1326. all: fpc_all
  1327. debug: fpc_debug
  1328. smart: fpc_smart
  1329. release: fpc_release
  1330. examples:
  1331. shared:
  1332. install: fpc_install
  1333. sourceinstall: fpc_sourceinstall
  1334. exampleinstall: fpc_exampleinstall
  1335. distinstall:
  1336. zipinstall:
  1337. zipsourceinstall:
  1338. zipexampleinstall:
  1339. zipdistinstall:
  1340. clean: fpc_clean
  1341. distclean: fpc_distclean
  1342. cleanall: fpc_cleanall
  1343. info: fpc_info
  1344. makefiles: fpc_makefiles
  1345. .PHONY: all debug smart release examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  1346. ifneq ($(wildcard fpcmake.loc),)
  1347. include fpcmake.loc
  1348. endif
  1349. include $(INC)/makefile.inc
  1350. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  1351. include $(PROCINC)/makefile.cpu
  1352. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  1353. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  1354. prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
  1355. $(AS) -o prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
  1356. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  1357. $(AS) -o cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  1358. gprt0$(OEXT) : $(CPU_TARGET)/gprt0.as
  1359. $(AS) -o gprt0$(OEXT) $(CPU_TARGET)/gprt0.as
  1360. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
  1361. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  1362. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  1363. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  1364. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  1365. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  1366. $(SYSTEMUNIT)$(PPUEXT)
  1367. baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
  1368. signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
  1369. $(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
  1370. $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
  1371. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  1372. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  1373. syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc \
  1374. unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1375. linux$(PPUEXT) : baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1376. dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  1377. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1378. crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1379. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  1380. printer$(PPUEXT) : $(UNIXINC)/printer.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1381. sysutils$(PPUEXT) : $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  1382. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT)
  1383. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  1384. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  1385. sysutils$(PPUEXT) typinfo$(PPUEXT)
  1386. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  1387. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  1388. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  1389. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  1390. $(COMPILER) $(OBJPASDIR)/math.pp
  1391. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  1392. $(COMPILER) $(OBJPASDIR)/gettext.pp
  1393. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  1394. $(OBJPASDIR)/varutilh.inc varutils.pp
  1395. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  1396. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1397. $(COMPILER) $(OBJPASDIR)/types.pp
  1398. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  1399. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1400. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  1401. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  1402. $(COMPILER) -Sg $(INC)/heaptrc.pp
  1403. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  1404. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  1405. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1406. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  1407. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1408. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1409. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  1410. terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
  1411. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  1412. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)