fpcmake.inc 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416
  1. {$ifdef Delphi}
  2. const fpcmakeini : array[0..130] of string[240]=(
  3. {$else Delphi}
  4. const fpcmakeini : array[0..130,1..240] of char=(
  5. {$endif Delphi}
  6. ';'#010+
  7. '; Templates used by fpcmake to create a Makefile from Makefile.fpc'#010+
  8. ';'#010+
  9. #010+
  10. '[osdetect]'#010+
  11. '#####################################################################'#010+
  12. '# Autodetect OS (Linux or Dos or Windows NT or OS/2)'#010+
  13. '# define inUnix when running under',' Unix like environment'#010+
  14. '# (Linux,FreeBSD,NetBSD,Cygwin)'#010+
  15. '# define inWinNT when running under WinNT'#010+
  16. '# define inOS2 when running under OS/2'#010+
  17. '# define inCygwin when running under Cygwin32'#010+
  18. '############################################','########################'+
  19. '#'#010+
  20. #010+
  21. '# We need only / in the path also remove the current dir'#010+
  22. 'override PATH:=$(subst \,/,$(PATH))'#010+
  23. #010+
  24. '# Determine if we'#039've a unix searchpath using : by looking for a ;'#010+
  25. '# that normally doesn'#039't exists in path names.'#010+
  26. 'ifeq ($','(findstring ;,$(PATH)),)'#010+
  27. 'inUnix=1'#010+
  28. 'SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))'#010+
  29. 'else'#010+
  30. 'SEARCHPATH:=$(subst ;, ,$(PATH))'#010+
  31. 'endif'#010+
  32. #010+
  33. '# Search for PWD and determine also if we are under linux'#010+
  34. 'PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHP','ATH))))'#010+
  35. 'ifeq ($(PWD),)'#010+
  36. 'PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))'#010+
  37. 'ifeq ($(PWD),)'#010+
  38. 'nopwd:'#010+
  39. ' @echo You need the GNU utils package to use this Makefile!'#010+
  40. ' @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo3',
  41. '2.zip'#010+
  42. ' @exit'#010+
  43. 'else'#010+
  44. 'PWD:=$(firstword $(PWD))'#010+
  45. 'SRCEXEEXT='#010+
  46. 'endif'#010+
  47. 'else'#010+
  48. 'PWD:=$(firstword $(PWD))'#010+
  49. 'SRCEXEEXT=.exe'#010+
  50. 'endif'#010+
  51. #010+
  52. '# Detect NT - NT sets OS to Windows_NT'#010+
  53. '# Detect OS/2 - OS/2 has OS2_SHELL defined'#010+
  54. 'ifndef inUnix'#010+
  55. 'ifeq ($(OS),Windows_NT)'#010+
  56. 'i','nWinNT=1'#010+
  57. 'else'#010+
  58. 'ifdef OS2_SHELL'#010+
  59. 'inOS2=1'#010+
  60. 'endif'#010+
  61. 'endif'#010+
  62. 'else'#010+
  63. 'ifneq ($(findstring cygwin,$(MACHTYPE)),)'#010+
  64. 'inCygWin=1'#010+
  65. 'endif'#010+
  66. 'endif'#010+
  67. #010+
  68. '# The extension of batch files / scripts'#010+
  69. 'ifdef inUnix'#010+
  70. 'BATCHEXT=.sh'#010+
  71. 'else'#010+
  72. 'ifdef inOS2'#010+
  73. 'BATCHEXT=.cmd'#010+
  74. 'else'#010+
  75. 'BATCHEXT=.bat'#010+
  76. 'en','dif'#010+
  77. 'endif'#010+
  78. #010+
  79. '# Path Separator, the subst trick is necessary for the \ that can'#039't'+
  80. ' exists'#010+
  81. '# at the end of a line'#010+
  82. 'ifdef inUnix'#010+
  83. 'PATHSEP=/'#010+
  84. 'else'#010+
  85. 'PATHSEP:=$(subst /,\,/)'#010+
  86. 'endif'#010+
  87. #010+
  88. '# Base dir'#010+
  89. 'ifdef PWD'#010+
  90. 'BASEDIR:=$(subst \,/,$(shell $(PWD)))'#010+
  91. '# For Cygwin ','we need to replace /cygdrive/c/ with c:/'#010+
  92. 'ifdef inCygWin'#010+
  93. 'ifneq ($(findstring /cygdrive/,$(BASEDIR)),)'#010+
  94. 'BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))'#010+
  95. 'BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))'#010+
  96. 'BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$','(BASEDRIVE):/,$(BASEDIR))'#010+
  97. 'endif'#010+
  98. 'endif'#010+
  99. 'else'#010+
  100. 'BASEDIR=.'#010+
  101. 'endif'#010+
  102. #010+
  103. '[fpcdetect]'#010+
  104. '#####################################################################'#010+
  105. '# FPC version/target Detection'#010+
  106. '###################################################################','#'+
  107. '#'#010+
  108. #010+
  109. '# Compatibility with old makefiles'#010+
  110. 'ifndef FPC'#010+
  111. 'ifdef PP'#010+
  112. 'FPC=$(PP)'#010+
  113. 'endif'#010+
  114. 'endif'#010+
  115. #010+
  116. '# Try to detect the ppcXXX file to use by using "fpc -P?" option'#010+
  117. '# to query for the default ppcXXX the fpc executable tries'#010+
  118. 'ifndef FPC'#010+
  119. 'FPC:=$(shell fpc -P?)'#010+
  120. '#',' Older fpc executables didn'#039't support it and return'#010+
  121. '# Error: Illegal processor... When found then fallback to ppc386'#010+
  122. 'ifneq ($(findstring Error,$(FPC)),)'#010+
  123. 'override FPC=ppc386'#010+
  124. 'endif'#010+
  125. 'endif'#010+
  126. #010+
  127. '# Get a clean executable name'#010+
  128. 'override FPC:=$(subst $(','SRCEXEEXT),,$(FPC))'#010+
  129. 'override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)'#010+
  130. #010+
  131. '# Target CPU'#010+
  132. 'ifndef CPU_TARGET'#010+
  133. 'CPU_TARGET:=$(shell $(FPC) -iTP)'#010+
  134. 'endif'#010+
  135. #010+
  136. '# Source CPU'#010+
  137. 'ifndef CPU_SOURCE'#010+
  138. 'CPU_SOURCE:=$(shell $(FPC) -iSP)'#010+
  139. 'endif'#010+
  140. #010+
  141. '# Target OS'#010+
  142. 'ifndef OS_TARGET'#010+
  143. 'OS','_TARGET:=$(shell $(FPC) -iTO)'#010+
  144. 'endif'#010+
  145. #010+
  146. '# Source OS'#010+
  147. 'ifndef OS_SOURCE'#010+
  148. 'OS_SOURCE:=$(shell $(FPC) -iSO)'#010+
  149. 'endif'#010+
  150. #010+
  151. '# FPC version'#010+
  152. 'ifndef FPC_VERSION'#010+
  153. 'FPC_VERSION:=$(shell $(FPC) -iV)'#010+
  154. 'endif'#010+
  155. #010+
  156. 'export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSI','ON'#010+
  157. #010+
  158. #010+
  159. '[fpcdircheckenv]'#010+
  160. '#####################################################################'#010+
  161. '# FPCDIR Setting'#010+
  162. '#####################################################################'#010+
  163. #010+
  164. '# Test FPCDIR to look if the RTL dir exists'#010+
  165. 'ifdef FPCDIR'#010+
  166. 'ove','rride FPCDIR:=$(subst \,/,$(FPCDIR))'#010+
  167. 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#010+
  168. 'override FPCDIR=wrong'#010+
  169. 'endif'#010+
  170. 'else'#010+
  171. 'override FPCDIR=wrong'#010+
  172. 'endif'#010+
  173. #010+
  174. #010+
  175. '[fpcdirdetect]'#010+
  176. '# Detect FPCDIR'#010+
  177. 'ifeq ($(FPCDIR),wrong)'#010+
  178. 'ifdef inUnix'#010+
  179. 'override FPCDIR=/us','r/local/lib/fpc/$(FPC_VERSION)'#010+
  180. 'ifeq ($(wildcard $(FPCDIR)/units),)'#010+
  181. 'override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)'#010+
  182. 'endif'#010+
  183. 'else'#010+
  184. 'override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(add'+
  185. 'suffix /$(FPC),$(SEARCHPATH))))))'#010+
  186. 'override FPCDI','R:=$(FPCDIR)/..'#010+
  187. 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#010+
  188. 'override FPCDIR:=$(FPCDIR)/..'#010+
  189. 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#010+
  190. 'override FPCDIR=c:/pp'#010+
  191. 'endif'#010+
  192. 'endif'#010+
  193. 'endif'#010+
  194. 'endif'#010+
  195. #010+
  196. '# Units dir'#010+
  197. 'UNITSDIR:=$(wildcard $(FPCD','IR)/units/$(OS_TARGET))'#010+
  198. #010+
  199. '# Packages dir'#010+
  200. 'PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)'#010+
  201. #010+
  202. #010+
  203. '[shelltools]'#010+
  204. '#####################################################################'#010+
  205. '# Shell tools'#010+
  206. '###############################################','#####################'+
  207. '#'#010+
  208. #010+
  209. '# Echo that can redir (must be able run in the default OS shell)'#010+
  210. 'ifndef ECHOREDIR'#010+
  211. 'ECHOREDIR:=$(subst /,$(PATHSEP),$(ECHO))'#010+
  212. 'endif'#010+
  213. #010+
  214. '# To copy pograms'#010+
  215. 'ifndef COPY'#010+
  216. 'COPY:=$(CPPROG) -fp'#010+
  217. 'endif'#010+
  218. #010+
  219. '# Copy a whole tree'#010+
  220. 'ifndef CO','PYTREE'#010+
  221. 'COPYTREE:=$(CPPROG) -rfp'#010+
  222. 'endif'#010+
  223. #010+
  224. '# To move pograms'#010+
  225. 'ifndef MOVE'#010+
  226. 'MOVE:=$(MVPROG) -f'#010+
  227. 'endif'#010+
  228. #010+
  229. '# Check delete program'#010+
  230. 'ifndef DEL'#010+
  231. 'DEL:=$(RMPROG) -f'#010+
  232. 'endif'#010+
  233. #010+
  234. '# Check deltree program'#010+
  235. 'ifndef DELTREE'#010+
  236. 'DELTREE:=$(RMPROG) -rf'#010+
  237. 'endif'#010+
  238. #010+
  239. '# To install file','s'#010+
  240. 'ifndef INSTALL'#010+
  241. 'ifdef inUnix'#010+
  242. 'INSTALL:=$(GINSTALL) -c -m 644'#010+
  243. 'else'#010+
  244. 'INSTALL:=$(COPY)'#010+
  245. 'endif'#010+
  246. 'endif'#010+
  247. #010+
  248. '# To install programs'#010+
  249. 'ifndef INSTALLEXE'#010+
  250. 'ifdef inUnix'#010+
  251. 'INSTALLEXE:=$(GINSTALL) -c -m 755'#010+
  252. 'else'#010+
  253. 'INSTALLEXE:=$(COPY)'#010+
  254. 'endif'#010+
  255. 'endif'#010+
  256. #010+
  257. '# To make a directo','ry.'#010+
  258. 'ifndef MKDIR'#010+
  259. 'MKDIR:=$(GINSTALL) -m 755 -d'#010+
  260. 'endif'#010+
  261. #010+
  262. 'export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKD'+
  263. 'IR'#010+
  264. #010+
  265. #010+
  266. '[defaulttools]'#010+
  267. '#####################################################################'#010+
  268. '# Default Tools'#010+
  269. '###########','#########################################################'+
  270. '#'#010+
  271. #010+
  272. '# assembler, redefine it if cross compiling'#010+
  273. 'ifndef AS'#010+
  274. 'AS=as'#010+
  275. 'endif'#010+
  276. #010+
  277. '# linker, but probably not used'#010+
  278. 'ifndef LD'#010+
  279. 'LD=ld'#010+
  280. 'endif'#010+
  281. #010+
  282. '# Resource compiler'#010+
  283. 'ifndef RC'#010+
  284. 'RC=rc'#010+
  285. 'endif'#010+
  286. #010+
  287. '# ppas.bat / pp','as.sh'#010+
  288. 'PPAS=ppas$(BATCHEXT)'#010+
  289. #010+
  290. '# ldconfig to rebuild .so cache'#010+
  291. 'ifdef inUnix'#010+
  292. 'LDCONFIG=ldconfig'#010+
  293. 'else'#010+
  294. 'LDCONFIG='#010+
  295. 'endif'#010+
  296. #010+
  297. 'ifdef DATE'#010+
  298. 'DATESTR:=$(shell $(DATE) +%Y%m%d)'#010+
  299. 'else'#010+
  300. 'DATESTR='#010+
  301. 'endif'#010+
  302. #010+
  303. '# Look if UPX is found for go32v2 and win32. We can'#039't use $UP','X b'+
  304. 'ecuase'#010+
  305. '# upx uses that one itself (PFV)'#010+
  306. 'ifndef UPXPROG'#010+
  307. 'ifeq ($(OS_TARGET),go32v2)'#010+
  308. 'UPXPROG:=1'#010+
  309. 'endif'#010+
  310. 'ifeq ($(OS_TARGET),win32)'#010+
  311. 'UPXPROG:=1'#010+
  312. 'endif'#010+
  313. 'ifdef UPXPROG'#010+
  314. 'UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)'+
  315. ')))'#010+
  316. 'ifeq ($','(UPXPROG),)'#010+
  317. 'UPXPROG='#010+
  318. 'else'#010+
  319. 'UPXPROG:=$(firstword $(UPXPROG))'#010+
  320. 'endif'#010+
  321. 'else'#010+
  322. 'UPXPROG='#010+
  323. 'endif'#010+
  324. 'endif'#010+
  325. 'export UPXPROG'#010+
  326. #010+
  327. '# Zip options'#010+
  328. 'ZIPOPT=-9'#010+
  329. 'ZIPEXT=.zip'#010+
  330. #010+
  331. '# Tar options'#010+
  332. 'ifeq ($(USETAR),bz2)'#010+
  333. 'TAROPT=vI'#010+
  334. 'TAREXT=.tar.bz2'#010+
  335. 'else'#010+
  336. 'TAROPT=vz'#010+
  337. 'TAREXT=.tar.gz'#010+
  338. 'endif',#010+
  339. #010+
  340. #010+
  341. '[extensions]'#010+
  342. '#####################################################################'#010+
  343. '# Default extensions'#010+
  344. '#####################################################################'#010+
  345. #010+
  346. '# Default needed extensions (Go32v2,Linux)'#010+
  347. 'LOADEREXT=.as'#010+
  348. 'EXEEX','T=.exe'#010+
  349. 'PPLEXT=.ppl'#010+
  350. 'PPUEXT=.ppu'#010+
  351. 'OEXT=.o'#010+
  352. 'ASMEXT=.s'#010+
  353. 'SMARTEXT=.sl'#010+
  354. 'STATICLIBEXT=.a'#010+
  355. 'SHAREDLIBEXT=.so'#010+
  356. 'STATICLIBPREFIX=libp'#010+
  357. 'RSTEXT=.rst'#010+
  358. 'FPCMADE=fpcmade'#010+
  359. #010+
  360. #010+
  361. '# Go32v1'#010+
  362. 'ifeq ($(OS_TARGET),go32v1)'#010+
  363. 'PPUEXT=.pp1'#010+
  364. 'OEXT=.o1'#010+
  365. 'ASMEXT=.s1'#010+
  366. 'SMARTEXT=.sl1'#010+
  367. 'STATICLIBEXT','=.a1'#010+
  368. 'SHAREDLIBEXT=.so1'#010+
  369. 'STATICLIBPREFIX='#010+
  370. 'FPCMADE=fpcmade.v1'#010+
  371. 'PACKAGESUFFIX=v1'#010+
  372. 'endif'#010+
  373. #010+
  374. '# Go32v2'#010+
  375. 'ifeq ($(OS_TARGET),go32v2)'#010+
  376. 'STATICLIBPREFIX='#010+
  377. 'FPCMADE=fpcmade.dos'#010+
  378. 'ZIPSUFFIX=go32'#010+
  379. 'endif'#010+
  380. #010+
  381. '# Linux'#010+
  382. 'ifeq ($(OS_TARGET),linux)'#010+
  383. 'EXEEXT='#010+
  384. 'HASSHAREDLIB=1'#010+
  385. 'FPCMA','DE=fpcmade.lnx'#010+
  386. 'ZIPSUFFIX=linux'#010+
  387. 'endif'#010+
  388. #010+
  389. '# FreeBSD'#010+
  390. 'ifeq ($(OS_TARGET),freebsd)'#010+
  391. 'EXEEXT='#010+
  392. 'HASSHAREDLIB=1'#010+
  393. 'FPCMADE=fpcmade.freebsd'#010+
  394. 'ZIPSUFFIX=freebsd'#010+
  395. 'endif'#010+
  396. #010+
  397. '# NetBSD'#010+
  398. 'ifeq ($(OS_TARGET),netbsd)'#010+
  399. 'EXEEXT='#010+
  400. 'HASSHAREDLIB=1'#010+
  401. 'FPCMADE=fpcmade.netbsd'#010+
  402. 'ZIPSUFFIX=','netbsd'#010+
  403. 'endif'#010+
  404. #010+
  405. '# Win32'#010+
  406. 'ifeq ($(OS_TARGET),win32)'#010+
  407. 'PPUEXT=.ppw'#010+
  408. 'OEXT=.ow'#010+
  409. 'ASMEXT=.sw'#010+
  410. 'SMARTEXT=.slw'#010+
  411. 'STATICLIBEXT=.aw'#010+
  412. 'SHAREDLIBEXT=.dll'#010+
  413. 'FPCMADE=fpcmade.w32'#010+
  414. 'ZIPSUFFIX=w32'#010+
  415. 'endif'#010+
  416. #010+
  417. '# OS/2'#010+
  418. 'ifeq ($(OS_TARGET),os2)'#010+
  419. 'PPUEXT=.ppo'#010+
  420. 'ASMEXT=.so2'#010+
  421. 'OEXT=.oo2'#010+
  422. 'AOUTE','XT=.out'#010+
  423. 'SMARTEXT=.so'#010+
  424. 'STATICLIBEXT=.ao2'#010+
  425. 'SHAREDLIBEXT=.dll'#010+
  426. 'FPCMADE=fpcmade.os2'#010+
  427. 'ZIPSUFFIX=emx'#010+
  428. 'endif'#010+
  429. #010+
  430. '# Amiga'#010+
  431. 'ifeq ($(OS_TARGET),amiga)'#010+
  432. 'EXEEXT='#010+
  433. 'PPUEXT=.ppa'#010+
  434. 'ASMEXT=.asm'#010+
  435. 'OEXT=.o'#010+
  436. 'SMARTEXT=.sl'#010+
  437. 'STATICLIBEXT=.a'#010+
  438. 'SHAREDLIBEXT=.library'#010+
  439. 'FPCMADE=fpcmade.a','mg'#010+
  440. 'endif'#010+
  441. #010+
  442. '# Atari'#010+
  443. 'ifeq ($(OS_TARGET),atari)'#010+
  444. 'PPUEXT=.ppt'#010+
  445. 'ASMEXT=.s'#010+
  446. 'OEXT=.o'#010+
  447. 'SMARTEXT=.sl'#010+
  448. 'STATICLIBEXT=.a'#010+
  449. 'EXEEXT=.ttp'#010+
  450. 'FPCMADE=fpcmade.ata'#010+
  451. 'endif'#010+
  452. #010+
  453. '# BeOS'#010+
  454. 'ifeq ($(OS_TARGET),beos)'#010+
  455. 'PPUEXT=.ppu'#010+
  456. 'ASMEXT=.s'#010+
  457. 'OEXT=.o'#010+
  458. 'SMARTEXT=.sl'#010+
  459. 'STATICLIBEXT=.a'#010+
  460. 'EXEEXT=',#010+
  461. 'FPCMADE=fpcmade.be'#010+
  462. 'ZIPSUFFIX=be'#010+
  463. 'endif'#010+
  464. #010+
  465. '# Solaris'#010+
  466. 'ifeq ($(OS_TARGET),sunos)'#010+
  467. 'PPUEXT=.ppu'#010+
  468. 'ASMEXT=.s'#010+
  469. 'OEXT=.o'#010+
  470. 'SMARTEXT=.sl'#010+
  471. 'STATICLIBEXT=.a'#010+
  472. 'EXEEXT='#010+
  473. 'FPCMADE=fpcmade.sun'#010+
  474. 'ZIPSUFFIX=sun'#010+
  475. 'endif'#010+
  476. #010+
  477. '# QNX'#010+
  478. 'ifeq ($(OS_TARGET),qnx)'#010+
  479. 'PPUEXT=.ppu'#010+
  480. 'ASMEXT=.s'#010+
  481. 'OEXT','=.o'#010+
  482. 'SMARTEXT=.sl'#010+
  483. 'STATICLIBEXT=.a'#010+
  484. 'EXEEXT='#010+
  485. 'FPCMADE=fpcmade.qnx'#010+
  486. 'ZIPSUFFIX=qnx'#010+
  487. 'endif'#010+
  488. #010+
  489. #010+
  490. #010+
  491. '[defaultdirs]'#010+
  492. '#####################################################################'#010+
  493. '# Default Directories'#010+
  494. '##################################################','##################'+
  495. '#'#010+
  496. #010+
  497. '# Units dir'#010+
  498. 'ifdef REQUIRE_UNITSDIR'#010+
  499. 'override UNITSDIR+=$(REQUIRE_UNITSDIR)'#010+
  500. 'endif'#010+
  501. #010+
  502. '# Units dir'#010+
  503. 'ifdef REQUIRE_PACKAGESDIR'#010+
  504. 'override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)'#010+
  505. 'endif'#010+
  506. #010+
  507. #010+
  508. '# Linux, netbsd and freebsd use unix dirs with ','/usr/bin, /usr/lib'#010+
  509. '# When zipping use the target as default, when normal install then'#010+
  510. '# use the source os as default'#010+
  511. 'ifdef ZIPINSTALL'#010+
  512. '# Zipinstall'#010+
  513. 'ifeq ($(OS_TARGET),linux)'#010+
  514. 'UNIXINSTALLDIR=1'#010+
  515. 'endif'#010+
  516. 'ifeq ($(OS_TARGET),freebsd)'#010+
  517. 'UNIXINSTALLDIR=1',#010+
  518. 'endif'#010+
  519. 'ifeq ($(OS_TARGET),netbsd)'#010+
  520. 'UNIXINSTALLDIR=1'#010+
  521. 'endif'#010+
  522. 'else'#010+
  523. '# Normal install'#010+
  524. 'ifeq ($(OS_SOURCE),linux)'#010+
  525. 'UNIXINSTALLDIR=1'#010+
  526. 'endif'#010+
  527. 'ifeq ($(OS_SOURCE),freebsd)'#010+
  528. 'UNIXINSTALLDIR=1'#010+
  529. 'endif'#010+
  530. 'ifeq ($(OS_SOURCE),netbsd)'#010+
  531. 'UNIXINSTALLDIR=1'#010+
  532. 'endif'#010+
  533. 'endif'#010+
  534. #010+
  535. '# se','t the prefix directory where to install everything'#010+
  536. 'ifndef INSTALL_PREFIX'#010+
  537. 'ifdef UNIXINSTALLDIR'#010+
  538. 'INSTALL_PREFIX=/usr/local'#010+
  539. 'else'#010+
  540. 'ifdef INSTALL_FPCPACKAGE'#010+
  541. 'INSTALL_BASEDIR:=/pp'#010+
  542. 'else'#010+
  543. 'INSTALL_BASEDIR:=/$(PACKAGE_NAME)'#010+
  544. 'endif'#010+
  545. 'endif'#010+
  546. 'endif'#010+
  547. 'export INSTA','LL_PREFIX'#010+
  548. #010+
  549. '# Where to place the resulting zip files'#010+
  550. 'ifndef DIST_DESTDIR'#010+
  551. 'DIST_DESTDIR:=$(BASEDIR)'#010+
  552. 'endif'#010+
  553. 'export DIST_DESTDIR'#010+
  554. #010+
  555. #010+
  556. '#####################################################################'#010+
  557. '# Install Directories'#010+
  558. '#######################','#############################################'+
  559. '#'#010+
  560. #010+
  561. '# set the base directory where to install everything'#010+
  562. 'ifndef INSTALL_BASEDIR'#010+
  563. 'ifdef UNIXINSTALLDIR'#010+
  564. 'ifdef INSTALL_FPCPACKAGE'#010+
  565. 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)'#010+
  566. 'else'#010+
  567. 'INSTALL','_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)'#010+
  568. 'endif'#010+
  569. 'else'#010+
  570. 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)'#010+
  571. 'endif'#010+
  572. 'endif'#010+
  573. #010+
  574. '# set the directory where to install the binaries'#010+
  575. 'ifndef INSTALL_BINDIR'#010+
  576. 'ifdef UNIXINSTALLDIR'#010+
  577. 'INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin'#010+
  578. 'el','se'#010+
  579. 'INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin'#010+
  580. '# for FPC packages install the binaries under their os target subdir'#010+
  581. 'ifdef INSTALL_FPCPACKAGE'#010+
  582. 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(OS_TARGET)'#010+
  583. 'endif'#010+
  584. 'endif'#010+
  585. 'endif'#010+
  586. #010+
  587. '# set the directory where to install t','he units.'#010+
  588. 'ifndef INSTALL_UNITDIR'#010+
  589. 'INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(OS_TARGET)'#010+
  590. 'ifdef INSTALL_FPCPACKAGE'#010+
  591. 'ifdef PACKAGE_NAME'#010+
  592. 'INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)'#010+
  593. 'endif'#010+
  594. 'endif'#010+
  595. 'endif'#010+
  596. #010+
  597. '# Where to install shared libraries'#010+
  598. 'i','fndef INSTALL_LIBDIR'#010+
  599. 'ifdef UNIXINSTALLDIR'#010+
  600. 'INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib'#010+
  601. 'else'#010+
  602. 'INSTALL_LIBDIR:=$(INSTALL_UNITDIR)'#010+
  603. 'endif'#010+
  604. 'endif'#010+
  605. #010+
  606. '# Where the source files will be stored'#010+
  607. 'ifndef INSTALL_SOURCEDIR'#010+
  608. 'ifdef UNIXINSTALLDIR'#010+
  609. 'ifdef INSTALL_FPCPACK','AGE'#010+
  610. 'INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/fpc-$(FPC_VERSION)/$(PACKAGE_'+
  611. 'NAME)'#010+
  612. 'else'#010+
  613. 'INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/$(PACKAGE_NAME)-$(PACKAGE_VER'+
  614. 'SION)'#010+
  615. 'endif'#010+
  616. 'else'#010+
  617. 'ifdef INSTALL_FPCPACKAGE'#010+
  618. 'INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/sourc','e/$(PACKAGE_NAME)'#010+
  619. 'else'#010+
  620. 'INSTALL_SOURCEDIRL:=$(INSTALL_BASEDIR)/source'#010+
  621. 'endif'#010+
  622. 'endif'#010+
  623. 'endif'#010+
  624. #010+
  625. '# Where the doc files will be stored'#010+
  626. 'ifndef INSTALL_DOCDIR'#010+
  627. 'ifdef UNIXINSTALLDIR'#010+
  628. 'ifdef INSTALL_FPCPACKAGE'#010+
  629. 'INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC','_VERSION)/$(PACKAGE_N'+
  630. 'AME)'#010+
  631. 'else'#010+
  632. 'INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSIO'+
  633. 'N)'#010+
  634. 'endif'#010+
  635. 'else'#010+
  636. 'ifdef INSTALL_FPCPACKAGE'#010+
  637. 'INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)'#010+
  638. 'else'#010+
  639. 'INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc'#010+
  640. 'e','ndif'#010+
  641. 'endif'#010+
  642. 'endif'#010+
  643. #010+
  644. '# Where to install the examples, under linux we use the doc dir'#010+
  645. '# because the copytree command will create a subdir itself'#010+
  646. 'ifndef INSTALL_EXAMPLEDIR'#010+
  647. 'ifdef UNIXINSTALLDIR'#010+
  648. 'ifdef INSTALL_FPCPACKAGE'#010+
  649. 'INSTALL_EXAMPLEDIR:=$(INSTA','LL_PREFIX)/doc/fpc-$(FPC_VERSION)/example'+
  650. 's/$(PACKAGE_NAME)'#010+
  651. 'else'#010+
  652. 'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VE'+
  653. 'RSION)'#010+
  654. 'endif'#010+
  655. 'else'#010+
  656. 'ifdef INSTALL_FPCPACKAGE'#010+
  657. 'INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)',#010+
  658. 'else'#010+
  659. 'INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples'#010+
  660. 'endif'#010+
  661. 'endif'#010+
  662. 'endif'#010+
  663. #010+
  664. '# Where the some extra (data)files will be stored'#010+
  665. 'ifndef INSTALL_DATADIR'#010+
  666. 'INSTALL_DATADIR=$(INSTALL_BASEDIR)'#010+
  667. 'endif'#010+
  668. #010+
  669. #010+
  670. '[dirlibc]'#010+
  671. '# On linux, try to find where libgcc.a is','.'#010+
  672. 'ifdef inUnix'#010+
  673. 'ifndef GCCLIBDIR'#010+
  674. 'GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '#039'{ print'+
  675. ' $$4 } '#039'`)'#010+
  676. 'endif'#010+
  677. 'ifeq ($(OS_TARGET),linux)'#010+
  678. 'ifndef OTHERLIBDIR'#010+
  679. 'OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '#039'{ ORS=" '+
  680. '"; print $1 }'#039,')'#010+
  681. 'endif'#010+
  682. 'endif'#010+
  683. 'ifeq ($(OS_TARGET),netbsd)'#010+
  684. 'OTHERLIBDIR+=/usr/pkg/lib'#010+
  685. 'endif'#010+
  686. 'export GCCLIBDIR OTHERLIB'#010+
  687. 'endif'#010+
  688. #010+
  689. #010+
  690. '[command_begin]'#010+
  691. '#####################################################################'#010+
  692. '# Compiler Command Line'#010+
  693. '#######################','#############################################'+
  694. '#'#010+
  695. #010+
  696. '# Load commandline OPTDEF and add FPC_CPU define, for compiling the'#010+
  697. '# compiler this needs to be turned off'#010+
  698. 'ifndef NOCPUDEF'#010+
  699. 'override FPCOPTDEF=$(CPU_TARGET)'#010+
  700. 'endif'#010+
  701. #010+
  702. '# Load commandline OPT and ad','d target and unit dir to be sure'#010+
  703. 'ifneq ($(OS_TARGET),$(OS_SOURCE))'#010+
  704. 'override FPCOPT+=-T$(OS_TARGET)'#010+
  705. 'endif'#010+
  706. #010+
  707. '# User dirs should be first, so they are looked at first'#010+
  708. 'ifdef UNITDIR'#010+
  709. 'override FPCOPT+=$(addprefix -Fu,$(UNITDIR))'#010+
  710. 'endif'#010+
  711. 'ifdef LIBDIR',#010+
  712. 'override FPCOPT+=$(addprefix -Fl,$(LIBDIR))'#010+
  713. 'endif'#010+
  714. 'ifdef OBJDIR'#010+
  715. 'override FPCOPT+=$(addprefix -Fo,$(OBJDIR))'#010+
  716. 'endif'#010+
  717. 'ifdef INCDIR'#010+
  718. 'override FPCOPT+=$(addprefix -Fi,$(INCDIR))'#010+
  719. 'endif'#010+
  720. #010+
  721. '# Smartlinking'#010+
  722. 'ifdef LINKSMART'#010+
  723. 'override FPCOPT+=-XX'#010+
  724. 'endif'#010+
  725. #010+
  726. '# S','martlinking creation'#010+
  727. 'ifdef CREATESMART'#010+
  728. 'override FPCOPT+=-CX'#010+
  729. 'endif'#010+
  730. #010+
  731. '# Debug'#010+
  732. 'ifdef DEBUG'#010+
  733. 'override FPCOPT+=-gl'#010+
  734. 'override FPCOPTDEF+=DEBUG'#010+
  735. 'endif'#010+
  736. #010+
  737. '# Release mode (strip, optimize and don'#039't load ppc386.cfg)'#010+
  738. 'ifdef RELEASE'#010+
  739. 'ifeq ($(CPU_TARGET),i386)'#010,
  740. 'FPCCPUOPT:=-OG2p3'#010+
  741. 'else'#010+
  742. 'FPCCPUOPT:='#010+
  743. 'endif'#010+
  744. 'override FPCOPT+=-Xs $(FPCCPUOPT) -n'#010+
  745. 'override FPCOPTDEF+=RELEASE'#010+
  746. 'endif'#010+
  747. #010+
  748. '# Strip'#010+
  749. 'ifdef STRIP'#010+
  750. 'override FPCOPT+=-Xs'#010+
  751. 'endif'#010+
  752. #010+
  753. '# Optimizer (i386 only for now)'#010+
  754. 'ifdef OPTIMIZE'#010+
  755. 'ifeq ($(CPU_TARGET),i386)'#010+
  756. 'overri','de FPCOPT+=-OG2p3'#010+
  757. 'endif'#010+
  758. 'endif'#010+
  759. #010+
  760. '# Verbose settings (warning,note,info)'#010+
  761. 'ifdef VERBOSE'#010+
  762. 'override FPCOPT+=-vwni'#010+
  763. 'endif'#010+
  764. #010+
  765. '# Needed compiler options'#010+
  766. 'ifdef COMPILER_OPTIONS'#010+
  767. 'override FPCOPT+=$(COMPILER_OPTIONS)'#010+
  768. 'endif'#010+
  769. 'ifdef COMPILER_UNITDIR'#010+
  770. 'override FP','COPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))'#010+
  771. 'endif'#010+
  772. 'ifdef COMPILER_LIBRARYDIR'#010+
  773. 'override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))'#010+
  774. 'endif'#010+
  775. 'ifdef COMPILER_OBJECTDIR'#010+
  776. 'override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))'#010+
  777. 'endif'#010+
  778. 'ifdef COMPILER_','INCLUDEDIR'#010+
  779. 'override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))'#010+
  780. 'endif'#010+
  781. #010+
  782. '# Target dirs and the prefix to use for clean/install'#010+
  783. 'ifdef COMPILER_TARGETDIR'#010+
  784. 'override FPCOPT+=-FE$(COMPILER_TARGETDIR)'#010+
  785. 'ifeq ($(COMPILER_TARGETDIR),.)'#010+
  786. 'override TARG','ETDIRPREFIX='#010+
  787. 'else'#010+
  788. 'override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/'#010+
  789. 'endif'#010+
  790. 'endif'#010+
  791. #010+
  792. '# Unit target dir'#010+
  793. 'ifdef COMPILER_UNITTARGETDIR'#010+
  794. 'override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)'#010+
  795. 'ifeq ($(COMPILER_UNITTARGETDIR),.)'#010+
  796. 'override UNITTARGETDIRPREFIX='#010+
  797. 'els','e'#010+
  798. 'override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/'#010+
  799. 'endif'#010+
  800. 'else'#010+
  801. 'ifdef COMPILER_TARGETDIR'#010+
  802. 'override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)'#010+
  803. 'override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)'#010+
  804. 'endif'#010+
  805. 'endif'#010+
  806. #010+
  807. '[command_libc]'#010+
  808. '# Add GCC lib pa','th if asked'#010+
  809. 'ifdef GCCLIBDIR'#010+
  810. 'override FPCOPT+=-Fl$(GCCLIBDIR)'#010+
  811. 'endif'#010+
  812. 'ifdef OTHERLIBDIR'#010+
  813. 'override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))'#010+
  814. 'endif'#010+
  815. #010+
  816. #010+
  817. '[command_end]'#010+
  818. '# Add commandline options last so they can override'#010+
  819. 'ifdef OPT'#010+
  820. 'override FPCOPT+=$(OPT',')'#010+
  821. 'endif'#010+
  822. #010+
  823. '# Add defines from FPCOPTDEF to FPCOPT'#010+
  824. 'ifdef FPCOPTDEF'#010+
  825. 'override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))'#010+
  826. 'endif'#010+
  827. #010+
  828. '# Was a config file specified ?'#010+
  829. 'ifdef CFGFILE'#010+
  830. 'override FPCOPT+=@$(CFGFILE)'#010+
  831. 'endif'#010+
  832. #010+
  833. '# Use the environment to pass commandline',' options?'#010+
  834. 'ifdef USEENV'#010+
  835. 'override FPCEXTCMD:=$(FPCOPT)'#010+
  836. 'override FPCOPT:=!FPCEXTCMD'#010+
  837. 'export FPCEXTCMD'#010+
  838. 'endif'#010+
  839. #010+
  840. '# Compiler commandline'#010+
  841. 'override COMPILER:=$(FPC) $(FPCOPT)'#010+
  842. #010+
  843. '# also call ppas if with command option -s'#010+
  844. '# but only if the OS_SOURCE and ','OS_TARGET are equal'#010+
  845. 'ifeq (,$(findstring -s ,$(COMPILER)))'#010+
  846. 'EXECPPAS='#010+
  847. 'else'#010+
  848. 'ifeq ($(OS_SOURCE),$(OS_TARGET))'#010+
  849. 'EXECPPAS:=@$(PPAS)'#010+
  850. 'endif'#010+
  851. 'endif'#010+
  852. #010+
  853. #010+
  854. '[loaderrules]'#010+
  855. '#####################################################################'#010+
  856. '# Loaders'#010+
  857. '#######','#############################################################'+
  858. '#'#010+
  859. #010+
  860. '.PHONY: fpc_loaders'#010+
  861. #010+
  862. 'ifdef TARGET_LOADERS'#010+
  863. 'override ALLTARGET+=fpc_loaders'#010+
  864. 'override CLEANTARGET+=fpc_loaders_clean'#010+
  865. 'override INSTALLTARGET+=fpc_loaders_install'#010+
  866. #010+
  867. 'override LOADEROF','ILES:=$(addsuffix $(OEXT),$(TARGET_LOADERS))'#010+
  868. 'endif'#010+
  869. #010+
  870. '%$(OEXT): %$(LOADEREXT)'#010+
  871. ' $(AS) -o $*$(OEXT) $<'#010+
  872. #010+
  873. 'fpc_loaders: $(LOADEROFILES)'#010+
  874. #010+
  875. 'fpc_loaders_clean:'#010+
  876. ' -$(DEL) $(LOADEROFILES)'#010+
  877. #010+
  878. 'fpc_loaders_install:'#010+
  879. ' $(MKDIR) $(INSTALL_UNI','TDIR)'#010+
  880. ' $(INSTALL) $(LOADEROFILES) $(INSTALL_UNITDIR)'#010+
  881. #010+
  882. #010+
  883. '[unitrules]'#010+
  884. '#####################################################################'#010+
  885. '# Units'#010+
  886. '#####################################################################'#010+
  887. #010+
  888. '.PHONY: fpc_units',#010+
  889. #010+
  890. 'ifdef TARGET_UNITS'#010+
  891. 'override ALLTARGET+=fpc_units'#010+
  892. #010+
  893. 'override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))'#010+
  894. 'override INSTALLPPUFILES+=$(UNITPPUFILES)'#010+
  895. 'override CLEANPPUFILES+=$(UNITPPUFILES)'#010+
  896. 'endif'#010+
  897. #010+
  898. 'fpc_units: $(UNITPPUFILES)'#010+
  899. #010+
  900. #010+
  901. '[exerules',']'#010+
  902. '#####################################################################'#010+
  903. '# Exes'#010+
  904. '#####################################################################'#010+
  905. #010+
  906. '.PHONY: fpc_exes'#010+
  907. #010+
  908. 'ifdef TARGET_PROGRAMS'#010+
  909. 'override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_P','ROGRAMS))'#010+
  910. 'override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefi'+
  911. 'x $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))'#010+
  912. #010+
  913. 'override ALLTARGET+=fpc_exes'#010+
  914. 'override INSTALLEXEFILES+=$(EXEFILES)'#010+
  915. 'override CLEANEXEFILES','+=$(EXEFILES) $(EXEOFILES)'#010+
  916. 'ifeq ($(OS_TARGET),os2)'#010+
  917. 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))'#010+
  918. 'endif'#010+
  919. 'endif'#010+
  920. #010+
  921. 'fpc_exes: $(EXEFILES)'#010+
  922. #010+
  923. #010+
  924. '[rstrules]'#010+
  925. '#####################################################################'#010+
  926. '# Re','source strings'#010+
  927. '#####################################################################'#010+
  928. #010+
  929. 'ifdef TARGET_RSTS'#010+
  930. 'override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))'#010+
  931. #010+
  932. 'override CLEANRSTFILES+=$(RSTFILES)'#010+
  933. 'endif'#010+
  934. #010+
  935. #010+
  936. '[examplerules]'#010+
  937. '####################','################################################'+
  938. '#'#010+
  939. '# Examples'#010+
  940. '#####################################################################'#010+
  941. #010+
  942. '.PHONY: fpc_examples'#010+
  943. #010+
  944. 'ifdef TARGET_EXAMPLES'#010+
  945. 'HASEXAMPLES=1'#010+
  946. 'override EXAMPLESOURCEFILES:=$(wildcard $(addsuffi','x .pp,$(TARGET_EXA'+
  947. 'MPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)))'#010+
  948. 'override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))'#010+
  949. 'override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addp'+
  950. 'refix $(STATICLIBPREFIX),$(addsuffix $(ST','ATICLIBEXT),$(TARGET_EXAMPL'+
  951. 'ES)))'#010+
  952. #010+
  953. 'override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)'#010+
  954. 'ifeq ($(OS_TARGET),os2)'#010+
  955. 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))'#010+
  956. 'endif'#010+
  957. 'endif'#010+
  958. 'ifdef TARGET_EXAMPLEDIRS'#010+
  959. 'HASEXAMPLES=1'#010+
  960. 'endif'#010+
  961. #010,
  962. 'fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIR'+
  963. 'S))'#010+
  964. #010+
  965. #010+
  966. '[compilerules]'#010+
  967. '#####################################################################'#010+
  968. '# General compile rules'#010+
  969. '#######################################################','#############'+
  970. '#'#010+
  971. #010+
  972. '.PHONY: fpc_packages fpc_all fpc_smart fpc_debug'#010+
  973. #010+
  974. '$(FPCMADE): $(ALLTARGET)'#010+
  975. ' @$(ECHOREDIR) Compiled > $(FPCMADE)'#010+
  976. #010+
  977. 'fpc_packages: $(COMPILEPACKAGES)'#010+
  978. #010+
  979. 'fpc_all: fpc_packages $(FPCMADE)'#010+
  980. #010+
  981. 'fpc_smart:'#010+
  982. ' $(MAKE) all LINKS','MART=1 CREATESMART=1'#010+
  983. #010+
  984. 'fpc_debug:'#010+
  985. ' $(MAKE) all DEBUG=1'#010+
  986. #010+
  987. '# General compile rules, available for both possible .pp and .pas exte'+
  988. 'nsions'#010+
  989. #010+
  990. '.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp'#010+
  991. #010+
  992. '%$(PPUEXT): %.pp'#010+
  993. ' $(COMPILER) $<'#010+
  994. ' $(E','XECPPAS)'#010+
  995. #010+
  996. '%$(PPUEXT): %.pas'#010+
  997. ' $(COMPILER) $<'#010+
  998. ' $(EXECPPAS)'#010+
  999. #010+
  1000. '%$(EXEEXT): %.pp'#010+
  1001. ' $(COMPILER) $<'#010+
  1002. ' $(EXECPPAS)'#010+
  1003. #010+
  1004. '%$(EXEEXT): %.pas'#010+
  1005. ' $(COMPILER) $<'#010+
  1006. ' $(EXECPPAS)'#010+
  1007. #010+
  1008. '# Search paths for .ppu and .pp and .pas'#010+
  1009. 'vpat','h %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
  1010. 'vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
  1011. 'vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)'#010+
  1012. #010+
  1013. #010+
  1014. '[libraryrules]'#010+
  1015. '#####################################################################'#010+
  1016. '#',' Library'#010+
  1017. '#####################################################################'#010+
  1018. #010+
  1019. '.PHONY: fpc_shared'#010+
  1020. #010+
  1021. 'ifndef LIB_FULLNAME'#010+
  1022. 'ifdef LIB_VERSION'#010+
  1023. 'LIB_FULLNAME=$(LIB_NAME).$(LIB_VERSION)'#010+
  1024. 'else'#010+
  1025. 'LIB_FULLNAME=$(LIB_NAME)'#010+
  1026. 'endif'#010+
  1027. 'endif'#010+
  1028. #010+
  1029. '# Default sharedlib',' units are all unit objects'#010+
  1030. 'ifndef LIB_SHAREDUNITS'#010+
  1031. 'LIB_SHAREDUNITS:=$(TARGET_UNITS)'#010+
  1032. 'endif'#010+
  1033. #010+
  1034. 'fpc_shared: all'#010+
  1035. 'ifdef HASSHAREDLIB'#010+
  1036. ' $(PPUMOVE) $(LIB_SHAREDUNITS) -o$(LIB_FULLNAME)'#010+
  1037. 'else'#010+
  1038. ' @$(ECHO) Shared Libraries not supported'#010+
  1039. 'endif',#010+
  1040. #010+
  1041. #010+
  1042. '[installrules]'#010+
  1043. '#####################################################################'#010+
  1044. '# Install rules'#010+
  1045. '#####################################################################'#010+
  1046. #010+
  1047. '.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall'#010+
  1048. #010+
  1049. 'ifdef I','NSTALL_UNITS'#010+
  1050. 'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))'#010+
  1051. 'endif'#010+
  1052. #010+
  1053. 'ifdef INSTALLPPUFILES'#010+
  1054. 'override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFI'+
  1055. 'LES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATI','CLIBEX'+
  1056. 'T),$(INSTALLPPUFILES)))'#010+
  1057. 'override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALL'+
  1058. 'PPUFILES))'#010+
  1059. 'override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPR'+
  1060. 'EFIX),$(INSTALLPPULINKFILES)))'#010+
  1061. '# Implicitly install Package','.fpc'#010+
  1062. 'override INSTALL_CREATEPACKAGEFPC=1'#010+
  1063. 'endif'#010+
  1064. #010+
  1065. 'ifdef INSTALLEXEFILES'#010+
  1066. 'override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEF'+
  1067. 'ILES))'#010+
  1068. 'endif'#010+
  1069. #010+
  1070. 'fpc_install: all $(INSTALLTARGET)'#010+
  1071. 'ifdef INSTALLEXEFILES'#010+
  1072. ' $(MKDIR) $(INSTALL_BIN','DIR)'#010+
  1073. '# Compress the exes if upx is defined'#010+
  1074. 'ifdef UPXPROG'#010+
  1075. ' -$(UPXPROG) $(INSTALLEXEFILES)'#010+
  1076. 'endif'#010+
  1077. ' $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)'#010+
  1078. 'endif'#010+
  1079. 'ifdef INSTALL_CREATEPACKAGEFPC'#010+
  1080. 'ifdef FPCMAKE'#010+
  1081. '# If the fpcpackage variable',' is set then create and install Package.'+
  1082. 'fpc,'#010+
  1083. '# a safety check is done if Makefile.fpc is available'#010+
  1084. 'ifdef PACKAGE_VERSION'#010+
  1085. 'ifneq ($(wildcard Makefile.fpc),)'#010+
  1086. ' $(FPCMAKE) -p -T$(OS_TARGET) Makefile.fpc'#010+
  1087. ' $(MKDIR) $(INSTALL_UNITDIR)',#010+
  1088. ' $(INSTALL) Package.fpc $(INSTALL_UNITDIR)'#010+
  1089. 'endif'#010+
  1090. 'endif'#010+
  1091. 'endif'#010+
  1092. 'endif'#010+
  1093. 'ifdef INSTALLPPUFILES'#010+
  1094. ' $(MKDIR) $(INSTALL_UNITDIR)'#010+
  1095. ' $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)'#010+
  1096. 'ifneq ($(INSTALLPPULINKFILES),)'#010+
  1097. ' $(INSTALL)',' $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)'#010+
  1098. 'endif'#010+
  1099. 'ifneq ($(wildcard $(LIB_FULLNAME)),)'#010+
  1100. ' $(MKDIR) $(INSTALL_LIBDIR)'#010+
  1101. ' $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)'#010+
  1102. 'ifdef inUnix'#010+
  1103. ' ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LI','B_NAME)'#010+
  1104. 'endif'#010+
  1105. 'endif'#010+
  1106. 'endif'#010+
  1107. 'ifdef INSTALL_FILES'#010+
  1108. ' $(MKDIR) $(INSTALL_DATADIR)'#010+
  1109. ' $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)'#010+
  1110. 'endif'#010+
  1111. #010+
  1112. 'fpc_sourceinstall: distclean'#010+
  1113. ' $(MKDIR) $(INSTALL_SOURCEDIR)'#010+
  1114. ' $(COPYTREE) $(BASEDIR',') $(INSTALL_SOURCEDIR)'#010+
  1115. #010+
  1116. 'fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))'#010+
  1117. 'ifdef HASEXAMPLES'#010+
  1118. ' $(MKDIR) $(INSTALL_EXAMPLEDIR)'#010+
  1119. 'endif'#010+
  1120. 'ifdef EXAMPLESOURCEFILES'#010+
  1121. ' $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)'#010+
  1122. 'en','dif'#010+
  1123. 'ifdef TARGET_EXAMPLEDIRS'#010+
  1124. ' $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EX'+
  1125. 'AMPLEDIR)'#010+
  1126. 'endif'#010+
  1127. #010+
  1128. '[distinstallrules]'#010+
  1129. '#####################################################################'#010+
  1130. '# Dist Install'#010+
  1131. '####################','################################################'+
  1132. '#'#010+
  1133. #010+
  1134. '.PHONY: fpc_distinstall'#010+
  1135. #010+
  1136. 'fpc_distinstall: install exampleinstall'#010+
  1137. #010+
  1138. #010+
  1139. '[zipinstallrules]'#010+
  1140. '#####################################################################'#010+
  1141. '# Zip'#010+
  1142. '############################','########################################'+
  1143. '#'#010+
  1144. #010+
  1145. '.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall'#010+
  1146. #010+
  1147. '# Temporary path to pack a file, can only use a single deep'#010+
  1148. '# subdir, because the deltree can'#039't see the whole tree to remove'#010+
  1149. 'ifnde','f PACKDIR'#010+
  1150. 'ifndef inUnix'#010+
  1151. 'PACKDIR=$(BASEDIR)/../fpc-pack'#010+
  1152. 'else'#010+
  1153. 'PACKDIR=/tmp/fpc-pack'#010+
  1154. 'endif'#010+
  1155. 'endif'#010+
  1156. #010+
  1157. '# Maybe create default zipname from packagename'#010+
  1158. 'ifndef ZIPNAME'#010+
  1159. 'ifdef DIST_ZIPNAME'#010+
  1160. 'ZIPNAME=$(DIST_ZIPNAME)'#010+
  1161. 'else'#010+
  1162. 'ZIPNAME=$(ZIPPREFIX)$(PACKAGE_NAME',')$(ZIPSUFFIX)'#010+
  1163. 'endif'#010+
  1164. 'endif'#010+
  1165. #010+
  1166. '# ZipTarget'#010+
  1167. 'ifndef ZIPTARGET'#010+
  1168. 'ifdef DIST_ZIPTARGET'#010+
  1169. 'ZIPTARGET=DIST_ZIPTARGET'#010+
  1170. 'else'#010+
  1171. 'ZIPTARGET=install'#010+
  1172. 'endif'#010+
  1173. 'endif'#010+
  1174. #010+
  1175. '# Use tar by default under linux'#010+
  1176. 'ifndef USEZIP'#010+
  1177. 'ifdef inUnix'#010+
  1178. 'USETAR=1'#010+
  1179. 'endif'#010+
  1180. 'endif'#010+
  1181. #010+
  1182. '# Use a wrapper scri','pt by default for Os/2'#010+
  1183. 'ifndef inUnix'#010+
  1184. 'USEZIPWRAPPER=1'#010+
  1185. 'endif'#010+
  1186. #010+
  1187. '# We need to be able to run in the current OS so fix'#010+
  1188. '# the path separator'#010+
  1189. 'ifdef USEZIPWRAPPER'#010+
  1190. 'ZIPPATHSEP=$(PATHSEP)'#010+
  1191. 'ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(BATCHEXT','))'#010+
  1192. 'else'#010+
  1193. 'ZIPPATHSEP=/'#010+
  1194. 'endif'#010+
  1195. #010+
  1196. '# Create commands to create the zip/tar file'#010+
  1197. 'ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))'#010+
  1198. 'ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))'#010+
  1199. 'ifdef USETAR'#010+
  1200. 'ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(TAREX','T)'#010+
  1201. 'ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *'#010+
  1202. 'else'#010+
  1203. 'ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(ZIPEXT)'#010+
  1204. 'ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDES'+
  1205. 'TFILE) *'#010+
  1206. 'endif'#010+
  1207. #010+
  1208. 'fpc_zipinstall:'#010+
  1209. ' $(MAKE) $(ZIPTARGET) ','INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1'#010+
  1210. ' $(MKDIR) $(DIST_DESTDIR)'#010+
  1211. ' $(DEL) $(ZIPDESTFILE)'#010+
  1212. 'ifdef USEZIPWRAPPER'#010+
  1213. '# Handle gecho separate as we need to espace \ with \\'#010+
  1214. 'ifneq ($(ECHOREDIR),echo)'#010+
  1215. ' $(ECHOREDIR) -e "$(subst \,\\',',$(ZIPCMD_CDPACK))" > $(ZIPWRAP'+
  1216. 'PER)'#010+
  1217. ' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)'+
  1218. #010+
  1219. ' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPP'+
  1220. 'ER)'#010+
  1221. 'else'#010+
  1222. ' echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)'#010+
  1223. ' ','echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)'#010+
  1224. ' echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)'#010+
  1225. 'endif'#010+
  1226. 'ifdef inUnix'#010+
  1227. ' /bin/sh $(ZIPWRAPPER)'#010+
  1228. 'else'#010+
  1229. ' $(ZIPWRAPPER)'#010+
  1230. 'endif'#010+
  1231. ' $(DEL) $(ZIPWRAPPER)'#010+
  1232. 'else'#010+
  1233. ' $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ','; $(ZIPCMD_CDBASE)'#010+
  1234. 'endif'#010+
  1235. ' $(DELTREE) $(PACKDIR)'#010+
  1236. #010+
  1237. 'fpc_zipsourceinstall:'#010+
  1238. ' $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=src'#010+
  1239. #010+
  1240. 'fpc_zipexampleinstall:'#010+
  1241. 'ifdef HASEXAMPLES'#010+
  1242. ' $(MAKE) fpc_zipinstall ZIPTARGET=exampleins','tall ZIPSUFFIX=ex'+
  1243. 'm'#010+
  1244. 'endif'#010+
  1245. #010+
  1246. 'fpc_zipdistinstall:'#010+
  1247. ' $(MAKE) fpc_zipinstall ZIPTARGET=distinstall'#010+
  1248. #010+
  1249. #010+
  1250. '[cleanrules]'#010+
  1251. '#####################################################################'#010+
  1252. '# Clean rules'#010+
  1253. '##########################################','##########################'+
  1254. '#'#010+
  1255. #010+
  1256. '.PHONY: fpc_clean fpc_cleanall fpc_distclean'#010+
  1257. #010+
  1258. 'ifdef EXEFILES'#010+
  1259. 'override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES'+
  1260. '))'#010+
  1261. 'endif'#010+
  1262. #010+
  1263. 'ifdef CLEAN_UNITS'#010+
  1264. 'override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEA','N_UNITS))'#010+
  1265. 'endif'#010+
  1266. #010+
  1267. 'ifdef CLEANPPUFILES'#010+
  1268. 'override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)'+
  1269. ') $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(C'+
  1270. 'LEANPPUFILES)))'#010+
  1271. 'override CLEANPPUFILES:=$(addprefix $(UNITTARGE','TDIRPREFIX),$(CLEANPP'+
  1272. 'UFILES))'#010+
  1273. 'override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREF'+
  1274. 'IX),$(CLEANPPULINKFILES)))'#010+
  1275. 'endif'#010+
  1276. #010+
  1277. 'fpc_clean: $(CLEANTARGET)'#010+
  1278. 'ifdef CLEANEXEFILES'#010+
  1279. ' -$(DEL) $(CLEANEXEFILES)'#010+
  1280. 'endif'#010+
  1281. 'ifdef CLEANPPUFILES'#010+
  1282. ' ',' -$(DEL) $(CLEANPPUFILES)'#010+
  1283. 'endif'#010+
  1284. 'ifneq ($(CLEANPPULINKFILES),)'#010+
  1285. ' -$(DEL) $(CLEANPPULINKFILES)'#010+
  1286. 'endif'#010+
  1287. 'ifdef CLEANRSTFILES'#010+
  1288. ' -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))'#010+
  1289. 'endif'#010+
  1290. 'ifdef CLEAN_FILES'#010+
  1291. ' -$(DEL) ','$(CLEAN_FILES)'#010+
  1292. 'endif'#010+
  1293. 'ifdef LIB_NAME'#010+
  1294. ' -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)'#010+
  1295. 'endif'#010+
  1296. ' -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(F'+
  1297. 'PCEXTFILE) $(REDIRFILE)'#010+
  1298. #010+
  1299. 'fpc_distclean: clean'#010+
  1300. #010+
  1301. '# Also run clean first if targetdir i','s set. Unittargetdir is always'#010+
  1302. '# set if targetdir or unittargetdir is specified'#010+
  1303. 'ifdef COMPILER_UNITTARGETDIR'#010+
  1304. 'TARGETDIRCLEAN=fpc_clean'#010+
  1305. 'endif'#010+
  1306. #010+
  1307. 'fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)'#010+
  1308. 'ifdef CLEANEXEFILES'#010+
  1309. ' -$(DEL) $(CLEANEXEFILES)',#010+
  1310. 'endif'#010+
  1311. ' -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIB'+
  1312. 'EXT) *$(SHAREDLIBEXT) *$(PPLEXT)'#010+
  1313. ' -$(DELTREE) *$(SMARTEXT)'#010+
  1314. ' -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)'+
  1315. #010+
  1316. 'ifdef AOUTEXT'#010+
  1317. ' -$(D','EL) *$(AOUTEXT)'#010+
  1318. 'endif'#010+
  1319. #010+
  1320. #010+
  1321. '[inforules]'#010+
  1322. '#####################################################################'#010+
  1323. '# Info rules'#010+
  1324. '#####################################################################'#010+
  1325. #010+
  1326. '.PHONY: fpc_info'#010+
  1327. #010+
  1328. 'fpc_info:'#010+
  1329. ' @$(ECHO)'#010+
  1330. ' ',' @$(ECHO) == Package info =='#010+
  1331. ' @$(ECHO) Package Name..... $(PACKAGE_NAME)'#010+
  1332. ' @$(ECHO) Package Version.. $(PACKAGE_VERSION)'#010+
  1333. ' @$(ECHO)'#010+
  1334. ' @$(ECHO) == Configuration info =='#010+
  1335. ' @$(ECHO)'#010+
  1336. ' @$(ECHO) FPC...','....... $(FPC)'#010+
  1337. ' @$(ECHO) FPC Version.. $(FPC_VERSION)'#010+
  1338. ' @$(ECHO) Source CPU... $(CPU_SOURCE)'#010+
  1339. ' @$(ECHO) Target CPU... $(CPU_TARGET)'#010+
  1340. ' @$(ECHO) Source OS.... $(OS_SOURCE)'#010+
  1341. ' @$(ECHO) Target OS.... $(OS_TARG','ET)'#010+
  1342. ' @$(ECHO)'#010+
  1343. ' @$(ECHO) == Directory info =='#010+
  1344. ' @$(ECHO)'#010+
  1345. ' @$(ECHO) Basedir......... $(BASEDIR)'#010+
  1346. ' @$(ECHO) FPCDir.......... $(FPCDIR)'#010+
  1347. ' @$(ECHO) UnitsDir........ $(UNITSDIR)'#010+
  1348. ' @$(ECHO) Package','sDir..... $(PACKAGESDIR)'#010+
  1349. ' @$(ECHO)'#010+
  1350. ' @$(ECHO) GCC library..... $(GCCLIBDIR)'#010+
  1351. ' @$(ECHO) Other library... $(OTHERLIBDIR)'#010+
  1352. ' @$(ECHO)'#010+
  1353. ' @$(ECHO) == Tools info =='#010+
  1354. ' @$(ECHO)'#010+
  1355. ' @$(ECHO) Pwd....... $(','PWD)'#010+
  1356. ' @$(ECHO) Mv........ $(MVPROG)'#010+
  1357. ' @$(ECHO) Cp........ $(CPPROG)'#010+
  1358. ' @$(ECHO) Rm........ $(RMPROG)'#010+
  1359. ' @$(ECHO) GInstall.. $(GINSTALL)'#010+
  1360. ' @$(ECHO) Echo...... $(ECHO)'#010+
  1361. ' @$(ECHO) Date...... $(DATE)'#010+
  1362. ' ',' @$(ECHO) FPCMake... $(FPCMAKE)'#010+
  1363. ' @$(ECHO) PPUMove... $(PPUMOVE)'#010+
  1364. ' @$(ECHO) Upx....... $(UPXPROG)'#010+
  1365. ' @$(ECHO) Zip....... $(ZIPPROG)'#010+
  1366. ' @$(ECHO)'#010+
  1367. ' @$(ECHO) == Object info =='#010+
  1368. ' @$(ECHO)'#010+
  1369. ' @$(EC','HO) Target Loaders...... $(TARGET_LOADERS)'#010+
  1370. ' @$(ECHO) Target Units........ $(TARGET_UNITS)'#010+
  1371. ' @$(ECHO) Target Programs..... $(TARGET_PROGRAMS)'#010+
  1372. ' @$(ECHO) Target Dirs......... $(TARGET_DIRS)'#010+
  1373. ' @$(ECHO) Target Exam','ples..... $(TARGET_EXAMPLES)'#010+
  1374. ' @$(ECHO) Target ExampleDirs.. $(TARGET_EXAMPLEDIRS)'#010+
  1375. ' @$(ECHO)'#010+
  1376. ' @$(ECHO) Clean Units......... $(CLEAN_UNITS)'#010+
  1377. ' @$(ECHO) Clean Files......... $(CLEAN_FILES)'#010+
  1378. ' @$(ECHO)'#010+
  1379. ' ','@$(ECHO) Install Units....... $(INSTALL_UNITS)'#010+
  1380. ' @$(ECHO) Install Files....... $(INSTALL_FILES)'#010+
  1381. ' @$(ECHO)'#010+
  1382. ' @$(ECHO) == Install info =='#010+
  1383. ' @$(ECHO)'#010+
  1384. ' @$(ECHO) DateStr.............. $(DATESTR)'#010+
  1385. ' @$(ECH','O) ZipPrefix............ $(ZIPPREFIX)'#010+
  1386. ' @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)'#010+
  1387. ' @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)'#010+
  1388. ' @$(ECHO)'#010+
  1389. ' @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)'#010+
  1390. ' @$','(ECHO) Install binary dir... $(INSTALL_BINDIR)'#010+
  1391. ' @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)'#010+
  1392. ' @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)'#010+
  1393. ' @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)'#010+
  1394. ' @$(ECH','O) Install doc dir...... $(INSTALL_DOCDIR)'#010+
  1395. ' @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)'#010+
  1396. ' @$(ECHO) Install data dir..... $(INSTALL_DATADIR)'#010+
  1397. ' @$(ECHO)'#010+
  1398. ' @$(ECHO) Dist destination dir. $(DIST_DESTDIR)'#010+
  1399. ' ',' @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)'#010+
  1400. ' @$(ECHO)'#010+
  1401. #010+
  1402. '[localmakefile]'#010+
  1403. '#####################################################################'#010+
  1404. '# Local Makefile'#010+
  1405. '#################################################################','###'+
  1406. '#'#010+
  1407. #010+
  1408. 'ifneq ($(wildcard fpcmake.loc),)'#010+
  1409. 'include fpcmake.loc'#010+
  1410. 'endif'#010+
  1411. #010+
  1412. '[userrules]'#010+
  1413. '#####################################################################'#010+
  1414. '# Users rules'#010+
  1415. '#####################################################################'#010
  1416. );