Makefile 44 KB

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