fpcmake.5 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. .TH fpcmake 5 "12 Dec 1999" FreePascal "Free Pascal Makefile.fpc format"
  2. .SH NAME
  3. Makefile.fpc \- Configuration file for fpcmake.
  4. .SH SYNOPSIS
  5. .I Makefile.fpc
  6. is a configuration file for the fpcmake command. Starting from this file a
  7. .I Makefile
  8. is created to compile Free Pascal units and programs.
  9. .SH DESCRIPTION
  10. .B Makefile.fpc
  11. is a plain ASCII file that contains a number of sections as in a Windows
  12. .I ini
  13. file. The following sections are recognized (in alphabetical order):
  14. .TP
  15. .B clean
  16. Specifies rules for cleaning the directory of units and programs.
  17. The following entries are recognized:
  18. .RS
  19. .TP
  20. .I units
  21. names of all units that should be removed when cleaning. Don't specify
  22. extensions, the makefile will append these by itself.
  23. .TP
  24. .I files
  25. names of files that should be removed. Specify full filenames.
  26. .RE
  27. .TP
  28. .B defaults
  29. The defaults section contains some default settings. The following keywords
  30. are recognized:
  31. .RS
  32. .TP
  33. .RE
  34. .TP
  35. .B dirs
  36. .TP
  37. .B info
  38. .TP
  39. .B install
  40. Contains instructions for installation of your units and programs. The
  41. following keywods are recognized:
  42. .RS
  43. .TP
  44. .I dirprefix
  45. the directory below wchich all installs are done. This corresponds to the
  46. .I \-\-prefix
  47. argument to GNU
  48. .I configure
  49. It is used for the installation of programs and units. By default, this is
  50. . /usr
  51. on linux, and
  52. . /pp
  53. on all other platforms.
  54. .TP
  55. .I dirbase
  56. The directory that is used as the base directory for the installation of
  57. units. Default this is
  58. .I dirprefix
  59. appended with
  60. .I /lib/fpc/FPC\_VERSION
  61. for linux or simply the dirprefix on other platforms.
  62. .RE
  63. Units will be installed in the subdirectory
  64. .I units/$(OS\_TARGET)
  65. of the
  66. .I dirbase
  67. entry.
  68. .TP
  69. .B libs
  70. This section specifies what units should be merged into a library, and what
  71. external libraries are needed. It can contain the following keywords:
  72. .RS
  73. .TP
  74. .I libname
  75. the name of the library that should be created.
  76. .TP
  77. .I libunits
  78. a comma-separated list of units that should be moved into one library.
  79. .TP
  80. .I needgcclib
  81. a boolean value that specifies whether the gcc library is needed. This will
  82. make sure that the path to the GCC library is inserted in the library search
  83. path.
  84. .TP
  85. .I needotherlib
  86. a boolean value that tells the makefile that other library directories will
  87. be needed.
  88. .RE
  89. .TP
  90. .B packages
  91. Which packages must be used. This section can contain the following keywords:
  92. .RS
  93. .TP
  94. .I packages
  95. A comma-separated list of packages that are needed to compile the targets.
  96. Valid for all platforms. In order to differentiate between platforms, you
  97. can prepend the keyword
  98. .I packages
  99. with the OS you are compiling for, e.g.
  100. .I linuxpackages
  101. if you want the makefile to use the listed packages on linux only.
  102. .TP
  103. .I fcl
  104. This is a boolean value (0 or 1) that indicates whether the FCL is used.
  105. .TP
  106. .I rtl
  107. This is a boolean value (0 or 1) that indicates whether the RTL should be
  108. recompiled.
  109. .RE
  110. .TP
  111. .B postsettings
  112. Anything that is in this section will be inserted as-is in the makefile
  113. .I after
  114. the makefile rules that are generated by fpcmake, but
  115. .I before
  116. the general configuration rules.
  117. . In it, you cannot use variables that are defined by fpcmake rules, but you
  118. can define additional rules and configuration variables.
  119. .TP
  120. .B presettings
  121. Anything that is in this section will be inserted as-is in the makefile
  122. .I before
  123. the makefile target rules that are generated by fpcmake. This means that
  124. you cannot use any variables that are normally defined by
  125. .TP
  126. .B rules
  127. In this section you can insert dependency rules and any other targets
  128. you wish to have. Do not insert 'default rules' here.
  129. .TP
  130. .B sections
  131. Here you can specify which 'rule sections' should be included in the Makefile.
  132. The sections consist of a series of boolean keywords; each keyword decies
  133. whether a particular section will be written to the makefile. By default,
  134. all sections are written.
  135. You can have the following boolean keywords in this section.
  136. .RS
  137. .TP
  138. .I none
  139. If this is set to true, then no sections are written.
  140. .TP
  141. .I units
  142. If set to
  143. .I false
  144. ,
  145. .B fpcmake
  146. omits the rules for compiling units.
  147. .TP
  148. .I exes
  149. If set to
  150. .I false
  151. ,
  152. .B fpcmake
  153. omits the rules for compiling executables.
  154. .TP
  155. .I loaders
  156. If set to
  157. .I false
  158. ,
  159. .B fpcmake
  160. omits the rules for assembling assembler files.
  161. .TP
  162. .I examples
  163. If set to
  164. .I false
  165. ,
  166. .B fpcmake
  167. omits the rules for compiling examples.
  168. .TP
  169. .I package
  170. If set to
  171. .I false
  172. ,
  173. .B fpcmake
  174. omits the rules for making packages.
  175. .TP
  176. .I compile
  177. If set to
  178. .I false
  179. ,
  180. .B fpcmake
  181. omits the generic rules for compiling pascal files.
  182. .TP
  183. .I depend
  184. If set to
  185. .I false
  186. ,
  187. .B fpcmake
  188. omits the dependency rules.
  189. .TP
  190. .I install
  191. If set to
  192. .I false
  193. ,
  194. .B fpcmake
  195. omits the rules for installing everything.
  196. .TP
  197. .I sourceinstall
  198. If set to
  199. .I false
  200. ,
  201. .B fpcmake
  202. omits the rules for installing the sources.
  203. .TP
  204. .I zipinstall
  205. If set to
  206. .I false
  207. ,
  208. .B fpcmake
  209. omits the rules for installing archives.
  210. .TP
  211. .I clean
  212. If set to
  213. .I false
  214. ,
  215. .B fpcmake
  216. omits the rules for cleaning the directories.
  217. .TP
  218. .I libs
  219. If set to
  220. .I false
  221. ,
  222. .B fpcmake
  223. omits the rules for making libraries.
  224. .TP
  225. .I command
  226. If set to
  227. .I false
  228. ,
  229. .B fpcmake
  230. omits the rules for composing the command-line based on the various
  231. variables.
  232. .TP
  233. .I exts
  234. If set to
  235. .I false
  236. ,
  237. .B fpcmake
  238. omits the rules for making libraries.
  239. .TP
  240. .I dirs
  241. If set to
  242. .I false
  243. ,
  244. .B fpcmake
  245. omits the rules for running make in subdirectories..
  246. .TP
  247. .I tools
  248. If set to
  249. .I false
  250. ,
  251. .B fpcmake
  252. omits the rules for running some tools as the erchiver, UPX and zip.
  253. .TP
  254. .I info
  255. If set to
  256. .I false
  257. ,
  258. .B fpcmake
  259. omits the rules for generating information.
  260. .RE
  261. .TP
  262. .B targets
  263. In this section you can define the various targets. The following keywords
  264. can be used there:
  265. .RS
  266. .TP
  267. .I dirs
  268. A space separated list of directories where make should also be run.
  269. .TP
  270. .I examples
  271. A space separated list of example programs that need to be compiled when
  272. the user asks to compile the examples. Do not specify an extension,
  273. the extension will be appended.
  274. .TP
  275. .I loaders
  276. A space separated list of names of assembler files that must be assembled.
  277. Don't specify the extension, the extension will be appended.
  278. .TP
  279. .I programs
  280. A space separated list of program names that need to be compiled. Do not
  281. specify an extension, the extension will be appended.
  282. .TP
  283. .I rst
  284. a list of
  285. .I rst
  286. files that needs to be converted to
  287. .I .po
  288. files for use with GNU
  289. .B gettext
  290. and internationalization routines.
  291. .TP
  292. .I units
  293. A space separated list of unit names that need to be compiled. Do not
  294. specify an extension, just the name of the unit as it would appear un a
  295. .I uses
  296. clause is sufficient.
  297. .RE
  298. .TP
  299. .B tools
  300. In this section you can specify which tools are needed. Definitions to
  301. use each of the listed tools will be inserted in the makefile, depending
  302. on the setting in this section.
  303. Each keyword is a boolean keyword; you can switch the use of a tool on or
  304. off with it.
  305. The following keywords are recognised:
  306. .RS
  307. .TP
  308. .I toolppdep
  309. Use
  310. .B ppdep
  311. the dependency tool.
  312. .I True
  313. by default.
  314. .TP
  315. .I toolppumove
  316. Use
  317. .B ppumove
  318. the Free Pascal unit mover.
  319. .I True
  320. by default.
  321. .TP
  322. .I toolppufiles
  323. Use the
  324. .B ppufile
  325. tool to determine dependencies of unit files.
  326. .I True
  327. by default.
  328. .TP
  329. .I toolsed
  330. Use
  331. .B sed
  332. the stream line editor.
  333. .I False
  334. by default.
  335. .TP
  336. .I tooldata2inc
  337. use the
  338. .B data2inc
  339. tool to create include files from data files.
  340. .I False
  341. by default.
  342. .TP
  343. .I tooldiff
  344. Use the GNU
  345. .B diff
  346. tool.
  347. .I False
  348. by default.
  349. .TP
  350. .I toolcmp
  351. Use the
  352. .B cmp
  353. file comparer tool
  354. .I False
  355. by default.
  356. .TP
  357. .I toolupx
  358. Use the
  359. .B upx
  360. executable packer
  361. .I True
  362. by default.
  363. .TP
  364. .I tooldate
  365. use the
  366. .B date
  367. date displaying tool.
  368. .I True
  369. by default.
  370. .TP
  371. .I toolzip
  372. Use the
  373. .B zip
  374. file archiver. This is used by the zip targets.
  375. .I True
  376. by default.
  377. .RE
  378. .TP
  379. .B zip
  380. This section can be used to make zip files from the compiled units and
  381. programs. By default all compiled units are zipped. The zip behaviour can
  382. be influencd with the presettings and postsettings sections.
  383. The following keywords can be used in this unit:
  384. .RS
  385. .TP
  386. .I zipname
  387. this file is the name of the zip file that will be produced.
  388. .TP
  389. .I ziptarget
  390. is the name of a makefile target that will be executed before the zip is
  391. made. By default this is the
  392. .I install
  393. target.
  394. .RE
  395. .SH SEE ALSO
  396. .IP
  397. .BR fpcmake (1)
  398. .BR ppc386 (1)
  399. .BR make (1)