Makefile 37 KB

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