Makefile 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
  3. #
  4. default: all
  5. MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
  6. BSDs = freebsd netbsd openbsd darwin
  7. UNIXs = linux $(BSDs) solaris 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 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=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  108. endif
  109. else
  110. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  111. endif
  112. endif
  113. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  114. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  115. FOUNDFPC:=$(strip $(wildcard $(FPC)))
  116. ifeq ($(FOUNDFPC),)
  117. FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
  118. ifeq ($(FOUNDFPC),)
  119. $(error Compiler $(FPC) not found)
  120. endif
  121. endif
  122. ifndef FPC_COMPILERINFO
  123. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  124. endif
  125. ifndef FPC_VERSION
  126. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  127. endif
  128. export FPC FPC_VERSION FPC_COMPILERINFO
  129. unexport CHECKDEPEND ALLDEPENDENCIES
  130. ifndef CPU_TARGET
  131. ifdef CPU_TARGET_DEFAULT
  132. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  133. endif
  134. endif
  135. ifndef OS_TARGET
  136. ifdef OS_TARGET_DEFAULT
  137. OS_TARGET=$(OS_TARGET_DEFAULT)
  138. endif
  139. endif
  140. ifneq ($(words $(FPC_COMPILERINFO)),5)
  141. FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
  142. FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
  143. FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
  144. FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
  145. endif
  146. ifndef CPU_SOURCE
  147. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  148. endif
  149. ifndef CPU_TARGET
  150. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  151. endif
  152. ifndef OS_SOURCE
  153. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  154. endif
  155. ifndef OS_TARGET
  156. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  157. endif
  158. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  159. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  160. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  161. TARGETSUFFIX=$(OS_TARGET)
  162. SOURCESUFFIX=$(OS_SOURCE)
  163. else
  164. TARGETSUFFIX=$(FULL_TARGET)
  165. SOURCESUFFIX=$(FULL_SOURCE)
  166. endif
  167. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  168. CROSSCOMPILE=1
  169. endif
  170. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  171. ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
  172. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  173. endif
  174. endif
  175. ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
  176. BSDhier=1
  177. endif
  178. ifeq ($(OS_TARGET),linux)
  179. linuxHier=1
  180. endif
  181. export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
  182. ifdef FPCDIR
  183. override FPCDIR:=$(subst \,/,$(FPCDIR))
  184. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  185. override FPCDIR=wrong
  186. endif
  187. else
  188. override FPCDIR=wrong
  189. endif
  190. ifdef DEFAULT_FPCDIR
  191. ifeq ($(FPCDIR),wrong)
  192. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  193. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  194. override FPCDIR=wrong
  195. endif
  196. endif
  197. endif
  198. ifeq ($(FPCDIR),wrong)
  199. ifdef inUnix
  200. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  201. ifeq ($(wildcard $(FPCDIR)/units),)
  202. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  203. endif
  204. else
  205. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  206. override FPCDIR:=$(FPCDIR)/..
  207. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  208. override FPCDIR:=$(FPCDIR)/..
  209. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  210. override FPCDIR:=$(BASEDIR)
  211. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  212. override FPCDIR=c:/pp
  213. endif
  214. endif
  215. endif
  216. endif
  217. endif
  218. ifndef CROSSBINDIR
  219. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  220. endif
  221. ifndef BINUTILSPREFIX
  222. ifndef CROSSBINDIR
  223. ifdef CROSSCOMPILE
  224. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  225. endif
  226. endif
  227. endif
  228. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  229. ifeq ($(UNITSDIR),)
  230. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  231. endif
  232. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
  233. override PACKAGE_NAME=bfd
  234. override PACKAGE_VERSION=2.3
  235. ifeq ($(FULL_TARGET),i386-linux)
  236. override TARGET_UNITS+=lua lualib lauxlib
  237. endif
  238. ifeq ($(FULL_TARGET),i386-go32v2)
  239. override TARGET_UNITS+=lua lualib lauxlib
  240. endif
  241. ifeq ($(FULL_TARGET),i386-win32)
  242. override TARGET_UNITS+=lua lualib lauxlib
  243. endif
  244. ifeq ($(FULL_TARGET),i386-os2)
  245. override TARGET_UNITS+=lua lualib lauxlib
  246. endif
  247. ifeq ($(FULL_TARGET),i386-freebsd)
  248. override TARGET_UNITS+=lua lualib lauxlib
  249. endif
  250. ifeq ($(FULL_TARGET),i386-beos)
  251. override TARGET_UNITS+=lua lualib lauxlib
  252. endif
  253. ifeq ($(FULL_TARGET),i386-netbsd)
  254. override TARGET_UNITS+=lua lualib lauxlib
  255. endif
  256. ifeq ($(FULL_TARGET),i386-solaris)
  257. override TARGET_UNITS+=lua lualib lauxlib
  258. endif
  259. ifeq ($(FULL_TARGET),i386-qnx)
  260. override TARGET_UNITS+=lua lualib lauxlib
  261. endif
  262. ifeq ($(FULL_TARGET),i386-netware)
  263. override TARGET_UNITS+=lua lualib lauxlib
  264. endif
  265. ifeq ($(FULL_TARGET),i386-openbsd)
  266. override TARGET_UNITS+=lua lualib lauxlib
  267. endif
  268. ifeq ($(FULL_TARGET),i386-wdosx)
  269. override TARGET_UNITS+=lua lualib lauxlib
  270. endif
  271. ifeq ($(FULL_TARGET),i386-darwin)
  272. override TARGET_UNITS+=lua lualib lauxlib
  273. endif
  274. ifeq ($(FULL_TARGET),i386-emx)
  275. override TARGET_UNITS+=lua lualib lauxlib
  276. endif
  277. ifeq ($(FULL_TARGET),i386-watcom)
  278. override TARGET_UNITS+=lua lualib lauxlib
  279. endif
  280. ifeq ($(FULL_TARGET),i386-netwlibc)
  281. override TARGET_UNITS+=lua lualib lauxlib
  282. endif
  283. ifeq ($(FULL_TARGET),i386-wince)
  284. override TARGET_UNITS+=lua lualib lauxlib
  285. endif
  286. ifeq ($(FULL_TARGET),i386-embedded)
  287. override TARGET_UNITS+=lua lualib lauxlib
  288. endif
  289. ifeq ($(FULL_TARGET),i386-symbian)
  290. override TARGET_UNITS+=lua lualib lauxlib
  291. endif
  292. ifeq ($(FULL_TARGET),m68k-linux)
  293. override TARGET_UNITS+=lua lualib lauxlib
  294. endif
  295. ifeq ($(FULL_TARGET),m68k-freebsd)
  296. override TARGET_UNITS+=lua lualib lauxlib
  297. endif
  298. ifeq ($(FULL_TARGET),m68k-netbsd)
  299. override TARGET_UNITS+=lua lualib lauxlib
  300. endif
  301. ifeq ($(FULL_TARGET),m68k-amiga)
  302. override TARGET_UNITS+=lua lualib lauxlib
  303. endif
  304. ifeq ($(FULL_TARGET),m68k-atari)
  305. override TARGET_UNITS+=lua lualib lauxlib
  306. endif
  307. ifeq ($(FULL_TARGET),m68k-openbsd)
  308. override TARGET_UNITS+=lua lualib lauxlib
  309. endif
  310. ifeq ($(FULL_TARGET),m68k-palmos)
  311. override TARGET_UNITS+=lua lualib lauxlib
  312. endif
  313. ifeq ($(FULL_TARGET),m68k-embedded)
  314. override TARGET_UNITS+=lua lualib lauxlib
  315. endif
  316. ifeq ($(FULL_TARGET),powerpc-linux)
  317. override TARGET_UNITS+=lua lualib lauxlib
  318. endif
  319. ifeq ($(FULL_TARGET),powerpc-netbsd)
  320. override TARGET_UNITS+=lua lualib lauxlib
  321. endif
  322. ifeq ($(FULL_TARGET),powerpc-amiga)
  323. override TARGET_UNITS+=lua lualib lauxlib
  324. endif
  325. ifeq ($(FULL_TARGET),powerpc-macos)
  326. override TARGET_UNITS+=lua lualib lauxlib
  327. endif
  328. ifeq ($(FULL_TARGET),powerpc-darwin)
  329. override TARGET_UNITS+=lua lualib lauxlib
  330. endif
  331. ifeq ($(FULL_TARGET),powerpc-morphos)
  332. override TARGET_UNITS+=lua lualib lauxlib
  333. endif
  334. ifeq ($(FULL_TARGET),powerpc-embedded)
  335. override TARGET_UNITS+=lua lualib lauxlib
  336. endif
  337. ifeq ($(FULL_TARGET),sparc-linux)
  338. override TARGET_UNITS+=lua lualib lauxlib
  339. endif
  340. ifeq ($(FULL_TARGET),sparc-netbsd)
  341. override TARGET_UNITS+=lua lualib lauxlib
  342. endif
  343. ifeq ($(FULL_TARGET),sparc-solaris)
  344. override TARGET_UNITS+=lua lualib lauxlib
  345. endif
  346. ifeq ($(FULL_TARGET),sparc-embedded)
  347. override TARGET_UNITS+=lua lualib lauxlib
  348. endif
  349. ifeq ($(FULL_TARGET),x86_64-linux)
  350. override TARGET_UNITS+=lua lualib lauxlib
  351. endif
  352. ifeq ($(FULL_TARGET),x86_64-freebsd)
  353. override TARGET_UNITS+=lua lualib lauxlib
  354. endif
  355. ifeq ($(FULL_TARGET),x86_64-win64)
  356. override TARGET_UNITS+=lua lualib lauxlib
  357. endif
  358. ifeq ($(FULL_TARGET),x86_64-embedded)
  359. override TARGET_UNITS+=lua lualib lauxlib
  360. endif
  361. ifeq ($(FULL_TARGET),arm-linux)
  362. override TARGET_UNITS+=lua lualib lauxlib
  363. endif
  364. ifeq ($(FULL_TARGET),arm-palmos)
  365. override TARGET_UNITS+=lua lualib lauxlib
  366. endif
  367. ifeq ($(FULL_TARGET),arm-wince)
  368. override TARGET_UNITS+=lua lualib lauxlib
  369. endif
  370. ifeq ($(FULL_TARGET),arm-gba)
  371. override TARGET_UNITS+=lua lualib lauxlib
  372. endif
  373. ifeq ($(FULL_TARGET),arm-nds)
  374. override TARGET_UNITS+=lua lualib lauxlib
  375. endif
  376. ifeq ($(FULL_TARGET),arm-embedded)
  377. override TARGET_UNITS+=lua lualib lauxlib
  378. endif
  379. ifeq ($(FULL_TARGET),arm-symbian)
  380. override TARGET_UNITS+=lua lualib lauxlib
  381. endif
  382. ifeq ($(FULL_TARGET),powerpc64-linux)
  383. override TARGET_UNITS+=lua lualib lauxlib
  384. endif
  385. ifeq ($(FULL_TARGET),powerpc64-darwin)
  386. override TARGET_UNITS+=lua lualib lauxlib
  387. endif
  388. ifeq ($(FULL_TARGET),powerpc64-embedded)
  389. override TARGET_UNITS+=lua lualib lauxlib
  390. endif
  391. override INSTALL_FPCPACKAGE=y
  392. override SHARED_BUILD=n
  393. override SHARED_BUILD=n
  394. ifdef REQUIRE_UNITSDIR
  395. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  396. endif
  397. ifdef REQUIRE_PACKAGESDIR
  398. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  399. endif
  400. ifdef ZIPINSTALL
  401. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  402. UNIXHier=1
  403. endif
  404. else
  405. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  406. UNIXHier=1
  407. endif
  408. endif
  409. ifndef INSTALL_PREFIX
  410. ifdef PREFIX
  411. INSTALL_PREFIX=$(PREFIX)
  412. endif
  413. endif
  414. ifndef INSTALL_PREFIX
  415. ifdef UNIXHier
  416. INSTALL_PREFIX=/usr/local
  417. else
  418. ifdef INSTALL_FPCPACKAGE
  419. INSTALL_BASEDIR:=/pp
  420. else
  421. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  422. endif
  423. endif
  424. endif
  425. export INSTALL_PREFIX
  426. ifdef INSTALL_FPCSUBDIR
  427. export INSTALL_FPCSUBDIR
  428. endif
  429. ifndef DIST_DESTDIR
  430. DIST_DESTDIR:=$(BASEDIR)
  431. endif
  432. export DIST_DESTDIR
  433. ifndef COMPILER_UNITTARGETDIR
  434. ifdef PACKAGEDIR_MAIN
  435. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  436. else
  437. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  438. endif
  439. endif
  440. ifndef COMPILER_TARGETDIR
  441. COMPILER_TARGETDIR=.
  442. endif
  443. ifndef INSTALL_BASEDIR
  444. ifdef UNIXHier
  445. ifdef INSTALL_FPCPACKAGE
  446. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  447. else
  448. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  449. endif
  450. else
  451. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  452. endif
  453. endif
  454. ifndef INSTALL_BINDIR
  455. ifdef UNIXHier
  456. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  457. else
  458. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  459. ifdef INSTALL_FPCPACKAGE
  460. ifdef CROSSCOMPILE
  461. ifdef CROSSINSTALL
  462. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  463. else
  464. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  465. endif
  466. else
  467. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  468. endif
  469. endif
  470. endif
  471. endif
  472. ifndef INSTALL_UNITDIR
  473. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  474. ifdef INSTALL_FPCPACKAGE
  475. ifdef PACKAGE_NAME
  476. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  477. endif
  478. endif
  479. endif
  480. ifndef INSTALL_LIBDIR
  481. ifdef UNIXHier
  482. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  483. else
  484. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  485. endif
  486. endif
  487. ifndef INSTALL_SOURCEDIR
  488. ifdef UNIXHier
  489. ifdef BSDhier
  490. SRCPREFIXDIR=share/src
  491. else
  492. ifdef linuxHier
  493. SRCPREFIXDIR=share/src
  494. else
  495. SRCPREFIXDIR=src
  496. endif
  497. endif
  498. ifdef INSTALL_FPCPACKAGE
  499. ifdef INSTALL_FPCSUBDIR
  500. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  501. else
  502. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  503. endif
  504. else
  505. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  506. endif
  507. else
  508. ifdef INSTALL_FPCPACKAGE
  509. ifdef INSTALL_FPCSUBDIR
  510. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  511. else
  512. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  513. endif
  514. else
  515. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  516. endif
  517. endif
  518. endif
  519. ifndef INSTALL_DOCDIR
  520. ifdef UNIXHier
  521. ifdef BSDhier
  522. DOCPREFIXDIR=share/doc
  523. else
  524. ifdef linuxHier
  525. DOCPREFIXDIR=share/doc
  526. else
  527. DOCPREFIXDIR=doc
  528. endif
  529. endif
  530. ifdef INSTALL_FPCPACKAGE
  531. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  532. else
  533. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  534. endif
  535. else
  536. ifdef INSTALL_FPCPACKAGE
  537. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  538. else
  539. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  540. endif
  541. endif
  542. endif
  543. ifndef INSTALL_EXAMPLEDIR
  544. ifdef UNIXHier
  545. ifdef INSTALL_FPCPACKAGE
  546. ifdef BSDhier
  547. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  548. else
  549. ifdef linuxHier
  550. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  551. else
  552. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  553. endif
  554. endif
  555. else
  556. ifdef BSDhier
  557. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  558. else
  559. ifdef linuxHier
  560. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  561. else
  562. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  563. endif
  564. endif
  565. endif
  566. else
  567. ifdef INSTALL_FPCPACKAGE
  568. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  569. else
  570. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  571. endif
  572. endif
  573. endif
  574. ifndef INSTALL_DATADIR
  575. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  576. endif
  577. ifndef INSTALL_SHAREDDIR
  578. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  579. endif
  580. ifdef CROSSCOMPILE
  581. ifndef CROSSBINDIR
  582. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  583. ifeq ($(CROSSBINDIR),)
  584. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  585. endif
  586. endif
  587. else
  588. CROSSBINDIR=
  589. endif
  590. BATCHEXT=.bat
  591. LOADEREXT=.as
  592. EXEEXT=.exe
  593. PPLEXT=.ppl
  594. PPUEXT=.ppu
  595. OEXT=.o
  596. ASMEXT=.s
  597. SMARTEXT=.sl
  598. STATICLIBEXT=.a
  599. SHAREDLIBEXT=.so
  600. SHAREDLIBPREFIX=libfp
  601. STATICLIBPREFIX=libp
  602. IMPORTLIBPREFIX=libimp
  603. RSTEXT=.rst
  604. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  605. ifeq ($(OS_TARGET),go32v1)
  606. STATICLIBPREFIX=
  607. SHORTSUFFIX=v1
  608. endif
  609. ifeq ($(OS_TARGET),go32v2)
  610. STATICLIBPREFIX=
  611. SHORTSUFFIX=dos
  612. endif
  613. ifeq ($(OS_TARGET),watcom)
  614. STATICLIBPREFIX=
  615. OEXT=.obj
  616. ASMEXT=.asm
  617. SHAREDLIBEXT=.dll
  618. SHORTSUFFIX=wat
  619. endif
  620. ifeq ($(OS_TARGET),linux)
  621. BATCHEXT=.sh
  622. EXEEXT=
  623. HASSHAREDLIB=1
  624. SHORTSUFFIX=lnx
  625. endif
  626. ifeq ($(OS_TARGET),freebsd)
  627. BATCHEXT=.sh
  628. EXEEXT=
  629. HASSHAREDLIB=1
  630. SHORTSUFFIX=fbs
  631. endif
  632. ifeq ($(OS_TARGET),netbsd)
  633. BATCHEXT=.sh
  634. EXEEXT=
  635. HASSHAREDLIB=1
  636. SHORTSUFFIX=nbs
  637. endif
  638. ifeq ($(OS_TARGET),openbsd)
  639. BATCHEXT=.sh
  640. EXEEXT=
  641. HASSHAREDLIB=1
  642. SHORTSUFFIX=obs
  643. endif
  644. ifeq ($(OS_TARGET),win32)
  645. SHAREDLIBEXT=.dll
  646. SHORTSUFFIX=w32
  647. endif
  648. ifeq ($(OS_TARGET),os2)
  649. BATCHEXT=.cmd
  650. AOUTEXT=.out
  651. STATICLIBPREFIX=
  652. SHAREDLIBEXT=.dll
  653. SHORTSUFFIX=os2
  654. ECHO=echo
  655. endif
  656. ifeq ($(OS_TARGET),emx)
  657. BATCHEXT=.cmd
  658. AOUTEXT=.out
  659. STATICLIBPREFIX=
  660. SHAREDLIBEXT=.dll
  661. SHORTSUFFIX=emx
  662. ECHO=echo
  663. endif
  664. ifeq ($(OS_TARGET),amiga)
  665. EXEEXT=
  666. SHAREDLIBEXT=.library
  667. SHORTSUFFIX=amg
  668. endif
  669. ifeq ($(OS_TARGET),morphos)
  670. EXEEXT=
  671. SHAREDLIBEXT=.library
  672. SHORTSUFFIX=mos
  673. endif
  674. ifeq ($(OS_TARGET),atari)
  675. EXEEXT=.ttp
  676. SHORTSUFFIX=ata
  677. endif
  678. ifeq ($(OS_TARGET),beos)
  679. BATCHEXT=.sh
  680. EXEEXT=
  681. SHORTSUFFIX=be
  682. endif
  683. ifeq ($(OS_TARGET),solaris)
  684. BATCHEXT=.sh
  685. EXEEXT=
  686. SHORTSUFFIX=sun
  687. endif
  688. ifeq ($(OS_TARGET),qnx)
  689. BATCHEXT=.sh
  690. EXEEXT=
  691. SHORTSUFFIX=qnx
  692. endif
  693. ifeq ($(OS_TARGET),netware)
  694. EXEEXT=.nlm
  695. STATICLIBPREFIX=
  696. SHORTSUFFIX=nw
  697. endif
  698. ifeq ($(OS_TARGET),netwlibc)
  699. EXEEXT=.nlm
  700. STATICLIBPREFIX=
  701. SHORTSUFFIX=nwl
  702. endif
  703. ifeq ($(OS_TARGET),macos)
  704. BATCHEXT=
  705. EXEEXT=
  706. DEBUGSYMEXT=.xcoff
  707. SHORTSUFFIX=mac
  708. endif
  709. ifeq ($(OS_TARGET),darwin)
  710. BATCHEXT=.sh
  711. EXEEXT=
  712. HASSHAREDLIB=1
  713. SHORTSUFFIX=dwn
  714. endif
  715. ifeq ($(OS_TARGET),gba)
  716. EXEEXT=.gba
  717. SHAREDLIBEXT=.so
  718. SHORTSUFFIX=gba
  719. endif
  720. ifeq ($(OS_TARGET),symbian)
  721. SHAREDLIBEXT=.dll
  722. SHORTSUFFIX=symbian
  723. endif
  724. else
  725. ifeq ($(OS_TARGET),go32v1)
  726. PPUEXT=.pp1
  727. OEXT=.o1
  728. ASMEXT=.s1
  729. SMARTEXT=.sl1
  730. STATICLIBEXT=.a1
  731. SHAREDLIBEXT=.so1
  732. STATICLIBPREFIX=
  733. SHORTSUFFIX=v1
  734. endif
  735. ifeq ($(OS_TARGET),go32v2)
  736. STATICLIBPREFIX=
  737. SHORTSUFFIX=dos
  738. endif
  739. ifeq ($(OS_TARGET),watcom)
  740. STATICLIBPREFIX=
  741. SHORTSUFFIX=wat
  742. endif
  743. ifeq ($(OS_TARGET),linux)
  744. BATCHEXT=.sh
  745. EXEEXT=
  746. HASSHAREDLIB=1
  747. SHORTSUFFIX=lnx
  748. endif
  749. ifeq ($(OS_TARGET),freebsd)
  750. BATCHEXT=.sh
  751. EXEEXT=
  752. HASSHAREDLIB=1
  753. SHORTSUFFIX=fbs
  754. endif
  755. ifeq ($(OS_TARGET),netbsd)
  756. BATCHEXT=.sh
  757. EXEEXT=
  758. HASSHAREDLIB=1
  759. SHORTSUFFIX=nbs
  760. endif
  761. ifeq ($(OS_TARGET),openbsd)
  762. BATCHEXT=.sh
  763. EXEEXT=
  764. HASSHAREDLIB=1
  765. SHORTSUFFIX=obs
  766. endif
  767. ifeq ($(OS_TARGET),win32)
  768. PPUEXT=.ppw
  769. OEXT=.ow
  770. ASMEXT=.sw
  771. SMARTEXT=.slw
  772. STATICLIBEXT=.aw
  773. SHAREDLIBEXT=.dll
  774. SHORTSUFFIX=w32
  775. endif
  776. ifeq ($(OS_TARGET),os2)
  777. BATCHEXT=.cmd
  778. PPUEXT=.ppo
  779. ASMEXT=.so2
  780. OEXT=.oo2
  781. AOUTEXT=.out
  782. SMARTEXT=.sl2
  783. STATICLIBPREFIX=
  784. STATICLIBEXT=.ao2
  785. SHAREDLIBEXT=.dll
  786. SHORTSUFFIX=os2
  787. ECHO=echo
  788. endif
  789. ifeq ($(OS_TARGET),amiga)
  790. EXEEXT=
  791. PPUEXT=.ppu
  792. ASMEXT=.s
  793. OEXT=.o
  794. SMARTEXT=.sl
  795. STATICLIBEXT=.a
  796. SHAREDLIBEXT=.library
  797. SHORTSUFFIX=amg
  798. endif
  799. ifeq ($(OS_TARGET),atari)
  800. PPUEXT=.ppu
  801. ASMEXT=.s
  802. OEXT=.o
  803. SMARTEXT=.sl
  804. STATICLIBEXT=.a
  805. EXEEXT=.ttp
  806. SHORTSUFFIX=ata
  807. endif
  808. ifeq ($(OS_TARGET),beos)
  809. BATCHEXT=.sh
  810. PPUEXT=.ppu
  811. ASMEXT=.s
  812. OEXT=.o
  813. SMARTEXT=.sl
  814. STATICLIBEXT=.a
  815. EXEEXT=
  816. SHORTSUFFIX=be
  817. endif
  818. ifeq ($(OS_TARGET),solaris)
  819. BATCHEXT=.sh
  820. PPUEXT=.ppu
  821. ASMEXT=.s
  822. OEXT=.o
  823. SMARTEXT=.sl
  824. STATICLIBEXT=.a
  825. EXEEXT=
  826. SHORTSUFFIX=sun
  827. endif
  828. ifeq ($(OS_TARGET),qnx)
  829. BATCHEXT=.sh
  830. PPUEXT=.ppu
  831. ASMEXT=.s
  832. OEXT=.o
  833. SMARTEXT=.sl
  834. STATICLIBEXT=.a
  835. EXEEXT=
  836. SHORTSUFFIX=qnx
  837. endif
  838. ifeq ($(OS_TARGET),netware)
  839. STATICLIBPREFIX=
  840. PPUEXT=.ppu
  841. OEXT=.o
  842. ASMEXT=.s
  843. SMARTEXT=.sl
  844. STATICLIBEXT=.a
  845. SHAREDLIBEXT=.nlm
  846. EXEEXT=.nlm
  847. SHORTSUFFIX=nw
  848. endif
  849. ifeq ($(OS_TARGET),netwlibc)
  850. STATICLIBPREFIX=
  851. PPUEXT=.ppu
  852. OEXT=.o
  853. ASMEXT=.s
  854. SMARTEXT=.sl
  855. STATICLIBEXT=.a
  856. SHAREDLIBEXT=.nlm
  857. EXEEXT=.nlm
  858. SHORTSUFFIX=nwl
  859. endif
  860. ifeq ($(OS_TARGET),macos)
  861. BATCHEXT=
  862. PPUEXT=.ppu
  863. ASMEXT=.s
  864. OEXT=.o
  865. SMARTEXT=.sl
  866. STATICLIBEXT=.a
  867. EXEEXT=
  868. DEBUGSYMEXT=.xcoff
  869. SHORTSUFFIX=mac
  870. endif
  871. endif
  872. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  873. FPCMADE=fpcmade.$(SHORTSUFFIX)
  874. ZIPSUFFIX=$(SHORTSUFFIX)
  875. ZIPCROSSPREFIX=
  876. ZIPSOURCESUFFIX=src
  877. ZIPEXAMPLESUFFIX=exm
  878. else
  879. FPCMADE=fpcmade.$(TARGETSUFFIX)
  880. ZIPSOURCESUFFIX=.source
  881. ZIPEXAMPLESUFFIX=.examples
  882. ifdef CROSSCOMPILE
  883. ZIPSUFFIX=.$(SOURCESUFFIX)
  884. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  885. else
  886. ZIPSUFFIX=.$(TARGETSUFFIX)
  887. ZIPCROSSPREFIX=
  888. endif
  889. endif
  890. ifndef ECHO
  891. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  892. ifeq ($(ECHO),)
  893. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  894. ifeq ($(ECHO),)
  895. ECHO= __missing_command_ECHO
  896. else
  897. ECHO:=$(firstword $(ECHO))
  898. endif
  899. else
  900. ECHO:=$(firstword $(ECHO))
  901. endif
  902. endif
  903. export ECHO
  904. ifndef DATE
  905. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  906. ifeq ($(DATE),)
  907. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  908. ifeq ($(DATE),)
  909. DATE= __missing_command_DATE
  910. else
  911. DATE:=$(firstword $(DATE))
  912. endif
  913. else
  914. DATE:=$(firstword $(DATE))
  915. endif
  916. endif
  917. export DATE
  918. ifndef GINSTALL
  919. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  920. ifeq ($(GINSTALL),)
  921. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  922. ifeq ($(GINSTALL),)
  923. GINSTALL= __missing_command_GINSTALL
  924. else
  925. GINSTALL:=$(firstword $(GINSTALL))
  926. endif
  927. else
  928. GINSTALL:=$(firstword $(GINSTALL))
  929. endif
  930. endif
  931. export GINSTALL
  932. ifndef CPPROG
  933. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  934. ifeq ($(CPPROG),)
  935. CPPROG= __missing_command_CPPROG
  936. else
  937. CPPROG:=$(firstword $(CPPROG))
  938. endif
  939. endif
  940. export CPPROG
  941. ifndef RMPROG
  942. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  943. ifeq ($(RMPROG),)
  944. RMPROG= __missing_command_RMPROG
  945. else
  946. RMPROG:=$(firstword $(RMPROG))
  947. endif
  948. endif
  949. export RMPROG
  950. ifndef MVPROG
  951. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  952. ifeq ($(MVPROG),)
  953. MVPROG= __missing_command_MVPROG
  954. else
  955. MVPROG:=$(firstword $(MVPROG))
  956. endif
  957. endif
  958. export MVPROG
  959. ifndef MKDIRPROG
  960. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  961. ifeq ($(MKDIRPROG),)
  962. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  963. ifeq ($(MKDIRPROG),)
  964. MKDIRPROG= __missing_command_MKDIRPROG
  965. else
  966. MKDIRPROG:=$(firstword $(MKDIRPROG))
  967. endif
  968. else
  969. MKDIRPROG:=$(firstword $(MKDIRPROG))
  970. endif
  971. endif
  972. export MKDIRPROG
  973. ifndef ECHOREDIR
  974. ifndef inUnix
  975. ECHOREDIR=echo
  976. else
  977. ECHOREDIR=$(ECHO)
  978. endif
  979. endif
  980. ifndef COPY
  981. COPY:=$(CPPROG) -fp
  982. endif
  983. ifndef COPYTREE
  984. COPYTREE:=$(CPPROG) -Rfp
  985. endif
  986. ifndef MKDIRTREE
  987. MKDIRTREE:=$(MKDIRPROG) -p
  988. endif
  989. ifndef MOVE
  990. MOVE:=$(MVPROG) -f
  991. endif
  992. ifndef DEL
  993. DEL:=$(RMPROG) -f
  994. endif
  995. ifndef DELTREE
  996. DELTREE:=$(RMPROG) -rf
  997. endif
  998. ifndef INSTALL
  999. ifdef inUnix
  1000. INSTALL:=$(GINSTALL) -c -m 644
  1001. else
  1002. INSTALL:=$(COPY)
  1003. endif
  1004. endif
  1005. ifndef INSTALLEXE
  1006. ifdef inUnix
  1007. INSTALLEXE:=$(GINSTALL) -c -m 755
  1008. else
  1009. INSTALLEXE:=$(COPY)
  1010. endif
  1011. endif
  1012. ifndef MKDIR
  1013. MKDIR:=$(GINSTALL) -m 755 -d
  1014. endif
  1015. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  1016. ifndef PPUMOVE
  1017. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  1018. ifeq ($(PPUMOVE),)
  1019. PPUMOVE= __missing_command_PPUMOVE
  1020. else
  1021. PPUMOVE:=$(firstword $(PPUMOVE))
  1022. endif
  1023. endif
  1024. export PPUMOVE
  1025. ifndef FPCMAKE
  1026. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  1027. ifeq ($(FPCMAKE),)
  1028. FPCMAKE= __missing_command_FPCMAKE
  1029. else
  1030. FPCMAKE:=$(firstword $(FPCMAKE))
  1031. endif
  1032. endif
  1033. export FPCMAKE
  1034. ifndef ZIPPROG
  1035. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  1036. ifeq ($(ZIPPROG),)
  1037. ZIPPROG= __missing_command_ZIPPROG
  1038. else
  1039. ZIPPROG:=$(firstword $(ZIPPROG))
  1040. endif
  1041. endif
  1042. export ZIPPROG
  1043. ifndef TARPROG
  1044. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  1045. ifeq ($(TARPROG),)
  1046. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  1047. ifeq ($(TARPROG),)
  1048. TARPROG= __missing_command_TARPROG
  1049. else
  1050. TARPROG:=$(firstword $(TARPROG))
  1051. endif
  1052. else
  1053. TARPROG:=$(firstword $(TARPROG))
  1054. endif
  1055. endif
  1056. export TARPROG
  1057. ASNAME=$(BINUTILSPREFIX)as
  1058. LDNAME=$(BINUTILSPREFIX)ld
  1059. ARNAME=$(BINUTILSPREFIX)ar
  1060. RCNAME=$(BINUTILSPREFIX)rc
  1061. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  1062. ifeq ($(OS_TARGET),win32)
  1063. ifeq ($(CROSSBINDIR),)
  1064. ASNAME=asw
  1065. LDNAME=ldw
  1066. ARNAME=arw
  1067. endif
  1068. endif
  1069. endif
  1070. ifndef ASPROG
  1071. ifdef CROSSBINDIR
  1072. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  1073. else
  1074. ASPROG=$(ASNAME)
  1075. endif
  1076. endif
  1077. ifndef LDPROG
  1078. ifdef CROSSBINDIR
  1079. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  1080. else
  1081. LDPROG=$(LDNAME)
  1082. endif
  1083. endif
  1084. ifndef RCPROG
  1085. ifdef CROSSBINDIR
  1086. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  1087. else
  1088. RCPROG=$(RCNAME)
  1089. endif
  1090. endif
  1091. ifndef ARPROG
  1092. ifdef CROSSBINDIR
  1093. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  1094. else
  1095. ARPROG=$(ARNAME)
  1096. endif
  1097. endif
  1098. AS=$(ASPROG)
  1099. LD=$(LDPROG)
  1100. RC=$(RCPROG)
  1101. AR=$(ARPROG)
  1102. PPAS=ppas$(SRCBATCHEXT)
  1103. ifdef inUnix
  1104. LDCONFIG=ldconfig
  1105. else
  1106. LDCONFIG=
  1107. endif
  1108. ifdef DATE
  1109. DATESTR:=$(shell $(DATE) +%Y%m%d)
  1110. else
  1111. DATESTR=
  1112. endif
  1113. ifndef UPXPROG
  1114. ifeq ($(OS_TARGET),go32v2)
  1115. UPXPROG:=1
  1116. endif
  1117. ifeq ($(OS_TARGET),win32)
  1118. UPXPROG:=1
  1119. endif
  1120. ifdef UPXPROG
  1121. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  1122. ifeq ($(UPXPROG),)
  1123. UPXPROG=
  1124. else
  1125. UPXPROG:=$(firstword $(UPXPROG))
  1126. endif
  1127. else
  1128. UPXPROG=
  1129. endif
  1130. endif
  1131. export UPXPROG
  1132. ZIPOPT=-9
  1133. ZIPEXT=.zip
  1134. ifeq ($(USETAR),bz2)
  1135. TAROPT=vj
  1136. TAREXT=.tar.bz2
  1137. else
  1138. TAROPT=vz
  1139. TAREXT=.tar.gz
  1140. endif
  1141. override REQUIRE_PACKAGES=rtl
  1142. ifeq ($(FULL_TARGET),i386-linux)
  1143. REQUIRE_PACKAGES_RTL=1
  1144. endif
  1145. ifeq ($(FULL_TARGET),i386-go32v2)
  1146. REQUIRE_PACKAGES_RTL=1
  1147. endif
  1148. ifeq ($(FULL_TARGET),i386-win32)
  1149. REQUIRE_PACKAGES_RTL=1
  1150. endif
  1151. ifeq ($(FULL_TARGET),i386-os2)
  1152. REQUIRE_PACKAGES_RTL=1
  1153. endif
  1154. ifeq ($(FULL_TARGET),i386-freebsd)
  1155. REQUIRE_PACKAGES_RTL=1
  1156. endif
  1157. ifeq ($(FULL_TARGET),i386-beos)
  1158. REQUIRE_PACKAGES_RTL=1
  1159. endif
  1160. ifeq ($(FULL_TARGET),i386-netbsd)
  1161. REQUIRE_PACKAGES_RTL=1
  1162. endif
  1163. ifeq ($(FULL_TARGET),i386-solaris)
  1164. REQUIRE_PACKAGES_RTL=1
  1165. endif
  1166. ifeq ($(FULL_TARGET),i386-qnx)
  1167. REQUIRE_PACKAGES_RTL=1
  1168. endif
  1169. ifeq ($(FULL_TARGET),i386-netware)
  1170. REQUIRE_PACKAGES_RTL=1
  1171. endif
  1172. ifeq ($(FULL_TARGET),i386-openbsd)
  1173. REQUIRE_PACKAGES_RTL=1
  1174. endif
  1175. ifeq ($(FULL_TARGET),i386-wdosx)
  1176. REQUIRE_PACKAGES_RTL=1
  1177. endif
  1178. ifeq ($(FULL_TARGET),i386-darwin)
  1179. REQUIRE_PACKAGES_RTL=1
  1180. endif
  1181. ifeq ($(FULL_TARGET),i386-emx)
  1182. REQUIRE_PACKAGES_RTL=1
  1183. endif
  1184. ifeq ($(FULL_TARGET),i386-watcom)
  1185. REQUIRE_PACKAGES_RTL=1
  1186. endif
  1187. ifeq ($(FULL_TARGET),i386-netwlibc)
  1188. REQUIRE_PACKAGES_RTL=1
  1189. endif
  1190. ifeq ($(FULL_TARGET),i386-wince)
  1191. REQUIRE_PACKAGES_RTL=1
  1192. endif
  1193. ifeq ($(FULL_TARGET),i386-embedded)
  1194. REQUIRE_PACKAGES_RTL=1
  1195. endif
  1196. ifeq ($(FULL_TARGET),i386-symbian)
  1197. REQUIRE_PACKAGES_RTL=1
  1198. endif
  1199. ifeq ($(FULL_TARGET),m68k-linux)
  1200. REQUIRE_PACKAGES_RTL=1
  1201. endif
  1202. ifeq ($(FULL_TARGET),m68k-freebsd)
  1203. REQUIRE_PACKAGES_RTL=1
  1204. endif
  1205. ifeq ($(FULL_TARGET),m68k-netbsd)
  1206. REQUIRE_PACKAGES_RTL=1
  1207. endif
  1208. ifeq ($(FULL_TARGET),m68k-amiga)
  1209. REQUIRE_PACKAGES_RTL=1
  1210. endif
  1211. ifeq ($(FULL_TARGET),m68k-atari)
  1212. REQUIRE_PACKAGES_RTL=1
  1213. endif
  1214. ifeq ($(FULL_TARGET),m68k-openbsd)
  1215. REQUIRE_PACKAGES_RTL=1
  1216. endif
  1217. ifeq ($(FULL_TARGET),m68k-palmos)
  1218. REQUIRE_PACKAGES_RTL=1
  1219. endif
  1220. ifeq ($(FULL_TARGET),m68k-embedded)
  1221. REQUIRE_PACKAGES_RTL=1
  1222. endif
  1223. ifeq ($(FULL_TARGET),powerpc-linux)
  1224. REQUIRE_PACKAGES_RTL=1
  1225. endif
  1226. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1227. REQUIRE_PACKAGES_RTL=1
  1228. endif
  1229. ifeq ($(FULL_TARGET),powerpc-amiga)
  1230. REQUIRE_PACKAGES_RTL=1
  1231. endif
  1232. ifeq ($(FULL_TARGET),powerpc-macos)
  1233. REQUIRE_PACKAGES_RTL=1
  1234. endif
  1235. ifeq ($(FULL_TARGET),powerpc-darwin)
  1236. REQUIRE_PACKAGES_RTL=1
  1237. endif
  1238. ifeq ($(FULL_TARGET),powerpc-morphos)
  1239. REQUIRE_PACKAGES_RTL=1
  1240. endif
  1241. ifeq ($(FULL_TARGET),powerpc-embedded)
  1242. REQUIRE_PACKAGES_RTL=1
  1243. endif
  1244. ifeq ($(FULL_TARGET),sparc-linux)
  1245. REQUIRE_PACKAGES_RTL=1
  1246. endif
  1247. ifeq ($(FULL_TARGET),sparc-netbsd)
  1248. REQUIRE_PACKAGES_RTL=1
  1249. endif
  1250. ifeq ($(FULL_TARGET),sparc-solaris)
  1251. REQUIRE_PACKAGES_RTL=1
  1252. endif
  1253. ifeq ($(FULL_TARGET),sparc-embedded)
  1254. REQUIRE_PACKAGES_RTL=1
  1255. endif
  1256. ifeq ($(FULL_TARGET),x86_64-linux)
  1257. REQUIRE_PACKAGES_RTL=1
  1258. endif
  1259. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1260. REQUIRE_PACKAGES_RTL=1
  1261. endif
  1262. ifeq ($(FULL_TARGET),x86_64-win64)
  1263. REQUIRE_PACKAGES_RTL=1
  1264. endif
  1265. ifeq ($(FULL_TARGET),x86_64-embedded)
  1266. REQUIRE_PACKAGES_RTL=1
  1267. endif
  1268. ifeq ($(FULL_TARGET),arm-linux)
  1269. REQUIRE_PACKAGES_RTL=1
  1270. endif
  1271. ifeq ($(FULL_TARGET),arm-palmos)
  1272. REQUIRE_PACKAGES_RTL=1
  1273. endif
  1274. ifeq ($(FULL_TARGET),arm-wince)
  1275. REQUIRE_PACKAGES_RTL=1
  1276. endif
  1277. ifeq ($(FULL_TARGET),arm-gba)
  1278. REQUIRE_PACKAGES_RTL=1
  1279. endif
  1280. ifeq ($(FULL_TARGET),arm-nds)
  1281. REQUIRE_PACKAGES_RTL=1
  1282. endif
  1283. ifeq ($(FULL_TARGET),arm-embedded)
  1284. REQUIRE_PACKAGES_RTL=1
  1285. endif
  1286. ifeq ($(FULL_TARGET),arm-symbian)
  1287. REQUIRE_PACKAGES_RTL=1
  1288. endif
  1289. ifeq ($(FULL_TARGET),powerpc64-linux)
  1290. REQUIRE_PACKAGES_RTL=1
  1291. endif
  1292. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1293. REQUIRE_PACKAGES_RTL=1
  1294. endif
  1295. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1296. REQUIRE_PACKAGES_RTL=1
  1297. endif
  1298. ifdef REQUIRE_PACKAGES_RTL
  1299. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  1300. ifneq ($(PACKAGEDIR_RTL),)
  1301. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  1302. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  1303. else
  1304. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  1305. endif
  1306. ifdef CHECKDEPEND
  1307. $(PACKAGEDIR_RTL)/$(FPCMADE):
  1308. $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
  1309. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
  1310. endif
  1311. else
  1312. PACKAGEDIR_RTL=
  1313. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  1314. ifneq ($(UNITDIR_RTL),)
  1315. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  1316. else
  1317. UNITDIR_RTL=
  1318. endif
  1319. endif
  1320. ifdef UNITDIR_RTL
  1321. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  1322. endif
  1323. endif
  1324. ifndef NOCPUDEF
  1325. override FPCOPTDEF=$(CPU_TARGET)
  1326. endif
  1327. ifneq ($(OS_TARGET),$(OS_SOURCE))
  1328. override FPCOPT+=-T$(OS_TARGET)
  1329. endif
  1330. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  1331. override FPCOPT+=-P$(CPU_TARGET)
  1332. endif
  1333. ifeq ($(OS_SOURCE),openbsd)
  1334. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  1335. endif
  1336. ifndef CROSSBOOTSTRAP
  1337. ifneq ($(BINUTILSPREFIX),)
  1338. override FPCOPT+=-XP$(BINUTILSPREFIX) -Xc
  1339. endif
  1340. ifneq ($(BINUTILSPREFIX),)
  1341. override FPCOPT+=-Xr$(RLINKPATH)
  1342. endif
  1343. endif
  1344. ifdef UNITDIR
  1345. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  1346. endif
  1347. ifdef LIBDIR
  1348. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  1349. endif
  1350. ifdef OBJDIR
  1351. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  1352. endif
  1353. ifdef INCDIR
  1354. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  1355. endif
  1356. ifdef LINKSMART
  1357. override FPCOPT+=-XX
  1358. endif
  1359. ifdef CREATESMART
  1360. override FPCOPT+=-CX
  1361. endif
  1362. ifdef DEBUG
  1363. override FPCOPT+=-gl
  1364. override FPCOPTDEF+=DEBUG
  1365. endif
  1366. ifdef RELEASE
  1367. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  1368. ifeq ($(CPU_TARGET),i386)
  1369. FPCCPUOPT:=-OG2p3
  1370. endif
  1371. ifeq ($(CPU_TARGET),powerpc)
  1372. FPCCPUOPT:=-O1r
  1373. endif
  1374. else
  1375. FPCCPUOPT:=-O2
  1376. endif
  1377. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  1378. override FPCOPTDEF+=RELEASE
  1379. endif
  1380. ifdef STRIP
  1381. override FPCOPT+=-Xs
  1382. endif
  1383. ifdef OPTIMIZE
  1384. override FPCOPT+=-O2
  1385. endif
  1386. ifdef VERBOSE
  1387. override FPCOPT+=-vwni
  1388. endif
  1389. ifdef COMPILER_OPTIONS
  1390. override FPCOPT+=$(COMPILER_OPTIONS)
  1391. endif
  1392. ifdef COMPILER_UNITDIR
  1393. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  1394. endif
  1395. ifdef COMPILER_LIBRARYDIR
  1396. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  1397. endif
  1398. ifdef COMPILER_OBJECTDIR
  1399. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  1400. endif
  1401. ifdef COMPILER_INCLUDEDIR
  1402. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1403. endif
  1404. ifdef CROSSBINDIR
  1405. override FPCOPT+=-FD$(CROSSBINDIR)
  1406. endif
  1407. ifdef COMPILER_TARGETDIR
  1408. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1409. ifeq ($(COMPILER_TARGETDIR),.)
  1410. override TARGETDIRPREFIX=
  1411. else
  1412. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1413. endif
  1414. endif
  1415. ifdef COMPILER_UNITTARGETDIR
  1416. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1417. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1418. override UNITTARGETDIRPREFIX=
  1419. else
  1420. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1421. endif
  1422. else
  1423. ifdef COMPILER_TARGETDIR
  1424. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1425. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1426. endif
  1427. endif
  1428. ifdef CREATESHARED
  1429. override FPCOPT+=-Cg
  1430. ifeq ($(CPU_TARGET),i386)
  1431. override FPCOPT+=-Aas
  1432. endif
  1433. endif
  1434. ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
  1435. ifeq ($(OS_TARGET),linux)
  1436. ifeq ($(CPU_TARGET),x86_64)
  1437. override FPCOPT+=-Cg
  1438. endif
  1439. endif
  1440. endif
  1441. ifdef LINKSHARED
  1442. endif
  1443. ifdef OPT
  1444. override FPCOPT+=$(OPT)
  1445. endif
  1446. ifdef FPCOPTDEF
  1447. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1448. endif
  1449. ifdef CFGFILE
  1450. override FPCOPT+=@$(CFGFILE)
  1451. endif
  1452. ifdef USEENV
  1453. override FPCEXTCMD:=$(FPCOPT)
  1454. override FPCOPT:=!FPCEXTCMD
  1455. export FPCEXTCMD
  1456. endif
  1457. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  1458. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  1459. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  1460. override ACROSSCOMPILE=1
  1461. endif
  1462. ifdef ACROSSCOMPILE
  1463. override FPCOPT+=$(CROSSOPT)
  1464. endif
  1465. override COMPILER:=$(FPC) $(FPCOPT)
  1466. ifeq (,$(findstring -s ,$(COMPILER)))
  1467. EXECPPAS=
  1468. else
  1469. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1470. EXECPPAS:=@$(PPAS)
  1471. endif
  1472. endif
  1473. .PHONY: fpc_units
  1474. ifneq ($(TARGET_UNITS),)
  1475. override ALLTARGET+=fpc_units
  1476. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  1477. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  1478. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1479. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1480. endif
  1481. fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
  1482. ifdef TARGET_RSTS
  1483. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  1484. override CLEANRSTFILES+=$(RSTFILES)
  1485. endif
  1486. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  1487. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  1488. @$(ECHOREDIR) Compiled > $(FPCMADE)
  1489. fpc_all: $(FPCMADE)
  1490. fpc_smart:
  1491. $(MAKE) all LINKSMART=1 CREATESMART=1
  1492. fpc_debug:
  1493. $(MAKE) all DEBUG=1
  1494. fpc_release:
  1495. $(MAKE) all RELEASE=1
  1496. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
  1497. $(COMPILER_UNITTARGETDIR):
  1498. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  1499. $(COMPILER_TARGETDIR):
  1500. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  1501. %$(PPUEXT): %.pp
  1502. $(COMPILER) $<
  1503. $(EXECPPAS)
  1504. %$(PPUEXT): %.pas
  1505. $(COMPILER) $<
  1506. $(EXECPPAS)
  1507. %$(EXEEXT): %.pp
  1508. $(COMPILER) $<
  1509. $(EXECPPAS)
  1510. %$(EXEEXT): %.pas
  1511. $(COMPILER) $<
  1512. $(EXECPPAS)
  1513. %$(EXEEXT): %.lpr
  1514. $(COMPILER) $<
  1515. $(EXECPPAS)
  1516. %$(EXEEXT): %.dpr
  1517. $(COMPILER) $<
  1518. $(EXECPPAS)
  1519. %.res: %.rc
  1520. windres -i $< -o $@
  1521. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1522. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1523. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1524. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1525. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  1526. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  1527. .PHONY: fpc_shared
  1528. override INSTALLTARGET+=fpc_shared_install
  1529. ifndef SHARED_LIBVERSION
  1530. SHARED_LIBVERSION=$(FPC_VERSION)
  1531. endif
  1532. ifndef SHARED_LIBNAME
  1533. SHARED_LIBNAME=$(PACKAGE_NAME)
  1534. endif
  1535. ifndef SHARED_FULLNAME
  1536. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  1537. endif
  1538. ifndef SHARED_LIBUNITS
  1539. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  1540. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  1541. endif
  1542. fpc_shared:
  1543. ifdef HASSHAREDLIB
  1544. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  1545. ifneq ($(SHARED_BUILD),n)
  1546. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  1547. endif
  1548. else
  1549. @$(ECHO) Shared Libraries not supported
  1550. endif
  1551. fpc_shared_install:
  1552. ifneq ($(SHARED_BUILD),n)
  1553. ifneq ($(SHARED_LIBUNITS),)
  1554. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  1555. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  1556. endif
  1557. endif
  1558. endif
  1559. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  1560. ifdef INSTALL_UNITS
  1561. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  1562. endif
  1563. ifdef INSTALL_BUILDUNIT
  1564. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  1565. endif
  1566. ifdef INSTALLPPUFILES
  1567. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1568. ifneq ($(UNITTARGETDIRPREFIX),)
  1569. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
  1570. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
  1571. endif
  1572. override INSTALL_CREATEPACKAGEFPC=1
  1573. endif
  1574. ifdef INSTALLEXEFILES
  1575. ifneq ($(TARGETDIRPREFIX),)
  1576. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  1577. endif
  1578. endif
  1579. fpc_install: all $(INSTALLTARGET)
  1580. ifdef INSTALLEXEFILES
  1581. $(MKDIR) $(INSTALL_BINDIR)
  1582. ifdef UPXPROG
  1583. -$(UPXPROG) $(INSTALLEXEFILES)
  1584. endif
  1585. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  1586. endif
  1587. ifdef INSTALL_CREATEPACKAGEFPC
  1588. ifdef FPCMAKE
  1589. ifdef PACKAGE_VERSION
  1590. ifneq ($(wildcard Makefile.fpc),)
  1591. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  1592. $(MKDIR) $(INSTALL_UNITDIR)
  1593. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  1594. endif
  1595. endif
  1596. endif
  1597. endif
  1598. ifdef INSTALLPPUFILES
  1599. $(MKDIR) $(INSTALL_UNITDIR)
  1600. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  1601. ifneq ($(INSTALLPPULINKFILES),)
  1602. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  1603. endif
  1604. ifneq ($(wildcard $(LIB_FULLNAME)),)
  1605. $(MKDIR) $(INSTALL_LIBDIR)
  1606. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  1607. ifdef inUnix
  1608. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  1609. endif
  1610. endif
  1611. endif
  1612. ifdef INSTALL_FILES
  1613. $(MKDIR) $(INSTALL_DATADIR)
  1614. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  1615. endif
  1616. fpc_sourceinstall: distclean
  1617. $(MKDIR) $(INSTALL_SOURCEDIR)
  1618. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  1619. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  1620. ifdef HASEXAMPLES
  1621. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  1622. endif
  1623. ifdef EXAMPLESOURCEFILES
  1624. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  1625. endif
  1626. ifdef TARGET_EXAMPLEDIRS
  1627. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  1628. endif
  1629. .PHONY: fpc_distinstall
  1630. fpc_distinstall: install exampleinstall
  1631. .PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
  1632. ifndef PACKDIR
  1633. ifndef inUnix
  1634. PACKDIR=$(BASEDIR)/../fpc-pack
  1635. else
  1636. PACKDIR=/tmp/fpc-pack
  1637. endif
  1638. endif
  1639. ifndef ZIPNAME
  1640. ifdef DIST_ZIPNAME
  1641. ZIPNAME=$(DIST_ZIPNAME)
  1642. else
  1643. ZIPNAME=$(PACKAGE_NAME)
  1644. endif
  1645. endif
  1646. ifndef FULLZIPNAME
  1647. FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)
  1648. endif
  1649. ifndef ZIPTARGET
  1650. ifdef DIST_ZIPTARGET
  1651. ZIPTARGET=DIST_ZIPTARGET
  1652. else
  1653. ZIPTARGET=install
  1654. endif
  1655. endif
  1656. ifndef USEZIP
  1657. ifdef inUnix
  1658. USETAR=1
  1659. endif
  1660. endif
  1661. ifndef inUnix
  1662. USEZIPWRAPPER=1
  1663. endif
  1664. ifdef USEZIPWRAPPER
  1665. ZIPPATHSEP=$(PATHSEP)
  1666. ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))
  1667. else
  1668. ZIPPATHSEP=/
  1669. endif
  1670. ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
  1671. ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
  1672. ifdef USETAR
  1673. ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
  1674. ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
  1675. else
  1676. ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
  1677. ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
  1678. endif
  1679. fpc_zipinstall:
  1680. $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
  1681. $(MKDIR) $(DIST_DESTDIR)
  1682. $(DEL) $(ZIPDESTFILE)
  1683. ifdef USEZIPWRAPPER
  1684. ifneq ($(ECHOREDIR),echo)
  1685. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
  1686. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
  1687. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
  1688. else
  1689. echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
  1690. echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
  1691. echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
  1692. endif
  1693. ifdef inUnix
  1694. /bin/sh $(ZIPWRAPPER)
  1695. else
  1696. $(ZIPWRAPPER)
  1697. endif
  1698. $(DEL) $(ZIPWRAPPER)
  1699. else
  1700. $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
  1701. endif
  1702. $(DELTREE) $(PACKDIR)
  1703. fpc_zipsourceinstall:
  1704. $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX)
  1705. fpc_zipexampleinstall:
  1706. ifdef HASEXAMPLES
  1707. $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX)
  1708. endif
  1709. fpc_zipdistinstall:
  1710. $(MAKE) fpc_zipinstall ZIPTARGET=distinstall
  1711. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  1712. ifdef EXEFILES
  1713. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  1714. endif
  1715. ifdef CLEAN_UNITS
  1716. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  1717. endif
  1718. ifdef CLEANPPUFILES
  1719. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  1720. ifdef DEBUGSYMEXT
  1721. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  1722. endif
  1723. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  1724. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  1725. endif
  1726. fpc_clean: $(CLEANTARGET)
  1727. ifdef CLEANEXEFILES
  1728. -$(DEL) $(CLEANEXEFILES)
  1729. endif
  1730. ifdef CLEANPPUFILES
  1731. -$(DEL) $(CLEANPPUFILES)
  1732. endif
  1733. ifneq ($(CLEANPPULINKFILES),)
  1734. -$(DEL) $(CLEANPPULINKFILES)
  1735. endif
  1736. ifdef CLEANRSTFILES
  1737. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1738. endif
  1739. ifdef CLEAN_FILES
  1740. -$(DEL) $(CLEAN_FILES)
  1741. endif
  1742. ifdef LIB_NAME
  1743. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  1744. endif
  1745. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1746. -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
  1747. fpc_cleanall: $(CLEANTARGET)
  1748. ifdef CLEANEXEFILES
  1749. -$(DEL) $(CLEANEXEFILES)
  1750. endif
  1751. ifdef COMPILER_UNITTARGETDIR
  1752. ifdef CLEANPPUFILES
  1753. -$(DEL) $(CLEANPPUFILES)
  1754. endif
  1755. ifneq ($(CLEANPPULINKFILES),)
  1756. -$(DEL) $(CLEANPPULINKFILES)
  1757. endif
  1758. ifdef CLEANRSTFILES
  1759. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1760. endif
  1761. endif
  1762. -$(DELTREE) units
  1763. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  1764. ifneq ($(PPUEXT),.ppu)
  1765. -$(DEL) *.o *.ppu *.a
  1766. endif
  1767. -$(DELTREE) *$(SMARTEXT)
  1768. -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1769. -$(DEL) *_ppas$(BATCHEXT)
  1770. ifdef AOUTEXT
  1771. -$(DEL) *$(AOUTEXT)
  1772. endif
  1773. ifdef DEBUGSYMEXT
  1774. -$(DEL) *$(DEBUGSYMEXT)
  1775. endif
  1776. fpc_distclean: cleanall
  1777. .PHONY: fpc_baseinfo
  1778. override INFORULES+=fpc_baseinfo
  1779. fpc_baseinfo:
  1780. @$(ECHO)
  1781. @$(ECHO) == Package info ==
  1782. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  1783. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  1784. @$(ECHO)
  1785. @$(ECHO) == Configuration info ==
  1786. @$(ECHO)
  1787. @$(ECHO) FPC.......... $(FPC)
  1788. @$(ECHO) FPC Version.. $(FPC_VERSION)
  1789. @$(ECHO) Source CPU... $(CPU_SOURCE)
  1790. @$(ECHO) Target CPU... $(CPU_TARGET)
  1791. @$(ECHO) Source OS.... $(OS_SOURCE)
  1792. @$(ECHO) Target OS.... $(OS_TARGET)
  1793. @$(ECHO) Full Source.. $(FULL_SOURCE)
  1794. @$(ECHO) Full Target.. $(FULL_TARGET)
  1795. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  1796. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  1797. @$(ECHO)
  1798. @$(ECHO) == Directory info ==
  1799. @$(ECHO)
  1800. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  1801. @$(ECHO)
  1802. @$(ECHO) Basedir......... $(BASEDIR)
  1803. @$(ECHO) FPCDir.......... $(FPCDIR)
  1804. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  1805. @$(ECHO) UnitsDir........ $(UNITSDIR)
  1806. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  1807. @$(ECHO)
  1808. @$(ECHO) GCC library..... $(GCCLIBDIR)
  1809. @$(ECHO) Other library... $(OTHERLIBDIR)
  1810. @$(ECHO)
  1811. @$(ECHO) == Tools info ==
  1812. @$(ECHO)
  1813. @$(ECHO) As........ $(AS)
  1814. @$(ECHO) Ld........ $(LD)
  1815. @$(ECHO) Ar........ $(AR)
  1816. @$(ECHO) Rc........ $(RC)
  1817. @$(ECHO)
  1818. @$(ECHO) Mv........ $(MVPROG)
  1819. @$(ECHO) Cp........ $(CPPROG)
  1820. @$(ECHO) Rm........ $(RMPROG)
  1821. @$(ECHO) GInstall.. $(GINSTALL)
  1822. @$(ECHO) Echo...... $(ECHO)
  1823. @$(ECHO) Shell..... $(SHELL)
  1824. @$(ECHO) Date...... $(DATE)
  1825. @$(ECHO) FPCMake... $(FPCMAKE)
  1826. @$(ECHO) PPUMove... $(PPUMOVE)
  1827. @$(ECHO) Upx....... $(UPXPROG)
  1828. @$(ECHO) Zip....... $(ZIPPROG)
  1829. @$(ECHO)
  1830. @$(ECHO) == Object info ==
  1831. @$(ECHO)
  1832. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  1833. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  1834. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  1835. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  1836. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  1837. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  1838. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  1839. @$(ECHO)
  1840. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  1841. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  1842. @$(ECHO)
  1843. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  1844. @$(ECHO) Install Files....... $(INSTALL_FILES)
  1845. @$(ECHO)
  1846. @$(ECHO) == Install info ==
  1847. @$(ECHO)
  1848. @$(ECHO) DateStr.............. $(DATESTR)
  1849. @$(ECHO) ZipName.............. $(ZIPNAME)
  1850. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  1851. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  1852. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  1853. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  1854. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  1855. @$(ECHO)
  1856. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  1857. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  1858. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  1859. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  1860. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  1861. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  1862. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  1863. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  1864. @$(ECHO)
  1865. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  1866. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  1867. @$(ECHO)
  1868. .PHONY: fpc_info
  1869. fpc_info: $(INFORULES)
  1870. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  1871. fpc_makefile_dirs
  1872. fpc_makefile:
  1873. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  1874. fpc_makefile_sub1:
  1875. ifdef TARGET_DIRS
  1876. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  1877. endif
  1878. ifdef TARGET_EXAMPLEDIRS
  1879. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  1880. endif
  1881. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  1882. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  1883. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  1884. all: fpc_all
  1885. debug: fpc_debug
  1886. smart: fpc_smart
  1887. release: fpc_release
  1888. units: fpc_units
  1889. examples:
  1890. shared: fpc_shared
  1891. install: fpc_install
  1892. sourceinstall: fpc_sourceinstall
  1893. exampleinstall: fpc_exampleinstall
  1894. distinstall: fpc_distinstall
  1895. zipinstall: fpc_zipinstall
  1896. zipsourceinstall: fpc_zipsourceinstall
  1897. zipexampleinstall: fpc_zipexampleinstall
  1898. zipdistinstall: fpc_zipdistinstall
  1899. clean: fpc_clean
  1900. distclean: fpc_distclean
  1901. cleanall: fpc_cleanall
  1902. info: fpc_info
  1903. makefiles: fpc_makefiles
  1904. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  1905. ifneq ($(wildcard fpcmake.loc),)
  1906. include fpcmake.loc
  1907. endif
  1908. .NOTPARALLEL:
  1909. lua$(PPUEXT) : lua.pas
  1910. lualib$(PPUEXT) : lualib.pas lua$(PPUEXT)
  1911. lauxlib$(PPUEXT) : lauxlib.pas lua$(PPUEXT)