fpccfg.inc 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. {$ifdef Delphi}
  2. const DefaultConfig : array[0..28] of string[240]=(
  3. {$else Delphi}
  4. const DefaultConfig : array[0..28,1..240] of char=(
  5. {$endif Delphi}
  6. '#'#013#010+
  7. '# Config file generated by fpcmkcfg on %BUILDDATE% - %BUILDTIME%'#013#010+
  8. '# Example fpc.cfg for Free Pascal Compiler'#013#010+
  9. '#'#013#010+
  10. #013#010+
  11. '# ----------------------'#013#010+
  12. '# Defines (preprocessor)'#013#010+
  13. '# ----------------------'#013#010+
  14. #013#010+
  15. '#'#013#010+
  16. '# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE',', #DEFINE, #UNDEF are allowed'+
  17. #013#010+
  18. '#'#013#010+
  19. '# -d is the same as #DEFINE'#013#010+
  20. '# -u is the same as #UNDEF'#013#010+
  21. '#'#013#010+
  22. #013#010+
  23. '#'#013#010+
  24. '# Some examples (for switches see below, and the -? helppages)'#013#010+
  25. '#'#013#010+
  26. '# Try compiling with the -dRELEASE or -dDEBUG on the commandline'#013#010+
  27. '#'#013#010+
  28. #013#010+
  29. '# F','or a release compile with optimizes and strip debuginfo'#013#010+
  30. '#IFDEF RELEASE'#013#010+
  31. ' -O2'#013#010+
  32. ' -Xs'#013#010+
  33. ' #WRITE Compiling Release Version'#013#010+
  34. '#ENDIF'#013#010+
  35. #013#010+
  36. '# For a debug version compile with debuginfo and all codegeneration ch'+
  37. 'ecks on'#013#010+
  38. '#IFDEF DEBUG'#013#010+
  39. ' -gl'#013#010+
  40. ' -Crto','i'#013#010+
  41. ' #WRITE Compiling Debug Version'#013#010+
  42. '#ENDIF'#013#010+
  43. #013#010+
  44. '# assembling'#013#010+
  45. '#ifdef darwin'#013#010+
  46. '# use pipes instead of temporary files for assembling'#013#010+
  47. '-ap'#013#010+
  48. '# path to Xcode 4.3+ utilities (no problem if it doesn'#039't exist)'#013+
  49. #010+
  50. '-FD/Applications/Xcode.app/Contents/Dev','eloper/usr/bin'#013#010+
  51. '#endif'#013#010+
  52. #013#010+
  53. '# ----------------'#013#010+
  54. '# Parsing switches'#013#010+
  55. '# ----------------'#013#010+
  56. #013#010+
  57. '# Pascal language mode'#013#010+
  58. '# -Mfpc free pascal dialect (default)'#013#010+
  59. '# -Mobjfpc switch some Delphi 2 extensions on'#013#010+
  60. '# -Mdelphi tries t','o be Delphi compatible'#013#010+
  61. '# -Mtp tries to be TP/BP 7.0 compatible'#013#010+
  62. '# -Mgpc tries to be gpc compatible'#013#010+
  63. '# -Mmacpas tries to be compatible to the macintosh pascal diale'+
  64. 'cts'#013#010+
  65. '#'#013#010+
  66. '# Turn on Object Pascal extensions by de','fault'#013#010+
  67. '#-Mobjfpc'#013#010+
  68. #013#010+
  69. '# Assembler reader mode'#013#010+
  70. '# -Rdefault use default assembler'#013#010+
  71. '# -Ratt read AT&T style assembler'#013#010+
  72. '# -Rintel read Intel style assembler'#013#010+
  73. '#'#013#010+
  74. '# All assembler blocks are AT&T styled by default'#013#010+
  75. '#-Ratt'#013#010+
  76. #013,#010+
  77. '# Semantic checking'#013#010+
  78. '# -S2 same as -Mobjfpc'#013#010+
  79. '# -Sc supports operators like C (*=,+=,/= and -=)'#013#010+
  80. '# -Sa include assertion code.'#013#010+
  81. '# -Sd same as -Mdelphi'#013#010+
  82. '# -Se<x> error options. <x> is ','a combination of the followi'+
  83. 'ng:'#013#010+
  84. '# <n> : compiler stops after <n> errors (default is 1)'#013#010+
  85. '# w : compiler stops also after warnings'#013#010+
  86. '# n : compiler stops also after notes'#013#010+
  87. '# h : compiler stops also after ','hints'#013#010+
  88. '# -Sg allow LABEL and GOTO'#013#010+
  89. '# -Sh Use ansistrings'#013#010+
  90. '# -Si support C++ styled INLINE'#013#010+
  91. '# -Sk load fpcylix unit'#013#010+
  92. '# -SI<x> set interface style to <x>'#013#010+
  93. '# -SIcom COM compat','ible interface (default)'#013#010+
  94. '# -SIcorba CORBA compatible interface'#013#010+
  95. '# -Sm support macros like C (global)'#013#010+
  96. '# -So same as -Mtp'#013#010+
  97. '# -Sp same as -Mgpc'#013#010+
  98. '# -Ss constructor name must be init (de','structor must be '+
  99. 'done)'#013#010+
  100. '# -Sx enable exception keywords (default in Delphi/ObjFPC '+
  101. 'modes)'#013#010+
  102. '#'#013#010+
  103. '# Allow goto, inline, C-operators, C-vars'#013#010+
  104. '-Sgic'#013#010+
  105. #013#010+
  106. '# ---------------'#013#010+
  107. '# Code generation'#013#010+
  108. '# ---------------'#013#010+
  109. #013#010+
  110. '# Uncomment the next lin','e if you always want static/dynamic units by'+
  111. ' default'#013#010+
  112. '# (can be overruled with -CD, -CS at the commandline)'#013#010+
  113. '#-CS'#013#010+
  114. '#-CD'#013#010+
  115. #013#010+
  116. '# Set the default heapsize to 8Mb'#013#010+
  117. '#-Ch8000000'#013#010+
  118. #013#010+
  119. '# Set default codegeneration checks (iocheck, overflow, range, stac','k'+
  120. ')'#013#010+
  121. '#-Ci'#013#010+
  122. '#-Co'#013#010+
  123. '#-Cr'#013#010+
  124. '#-Ct'#013#010+
  125. #013#010+
  126. '# Optimizer switches'#013#010+
  127. '# -Os generate smaller code'#013#010+
  128. '# -Oa=N set alignment to N'#013#010+
  129. '# -O1 level 1 optimizations (quick optimizations, debuggable)'#013+
  130. #010+
  131. '# -O2 level 2 optimizations (-O1 + optimiz','ations which make d'+
  132. 'ebugging more difficult)'#013#010+
  133. '# -O3 level 3 optimizations (-O2 + optimizations which also may'+
  134. ' make the program slower rather than faster)'#013#010+
  135. '# -Oo<x> switch on optimalization x. See fpc -i for possible value'+
  136. 's'#013#010+
  137. '# -OoN','O<x> switch off optimalization x. See fpc -i for possible va'+
  138. 'lues'#013#010+
  139. '# -Op<x> set target cpu for optimizing, see fpc -i for possible va'+
  140. 'lues'#013#010+
  141. #013#010+
  142. '#ifdef darwin'#013#010+
  143. '#ifdef cpui386'#013#010+
  144. '-Cppentiumm'#013#010+
  145. '-Oppentiumm'#013#010+
  146. '#endif'#013#010+
  147. '#endif'#013#010+
  148. #013#010+
  149. '# -----------------','------'#013#010+
  150. '# Set Filenames and Paths'#013#010+
  151. '# -----------------------'#013#010+
  152. #013#010+
  153. '# Both slashes and backslashes are allowed in paths'#013#010+
  154. #013#010+
  155. '# path to the messagefile, not necessary anymore but can be used to ov'+
  156. 'erride'#013#010+
  157. '# the default language'#013#010+
  158. '#-Fr%basepath%/msg/','errore.msg'#013#010+
  159. '#-Fr%basepath%/msg/errorn.msg'#013#010+
  160. '#-Fr%basepath%/msg/errores.msg'#013#010+
  161. '#-Fr%basepath%/msg/errord.msg'#013#010+
  162. '#-Fr%basepath%/msg/errorr.msg'#013#010+
  163. #013#010+
  164. '# search path for unicode binary files'#013#010+
  165. '-FM%sharepath%/unicode/'#013#010+
  166. #013#010+
  167. '# searchpath for units and other s','ystem dependent things'#013#010+
  168. '-Fu%basepath%/units/$fpctarget'#013#010+
  169. '-Fu%basepath%/units/$fpctarget/*'#013#010+
  170. '-Fu%basepath%/units/$fpctarget/rtl'#013#010+
  171. #013#010+
  172. '#IFDEF FPCAPACHE_1_3'#013#010+
  173. '-Fu%basepath%/units/$fpctarget/httpd13/'#013#010+
  174. '#ELSE'#013#010+
  175. '#IFDEF FPCAPACHE_2_0'#013#010+
  176. '-Fu%basepath%/units/','$fpctarget/httpd20'#013#010+
  177. '#ELSE'#013#010+
  178. '-Fu%basepath%/units/$fpctarget/httpd22'#013#010+
  179. '#ENDIF'#013#010+
  180. '#ENDIF'#013#010+
  181. #013#010+
  182. '# searchpath for fppkg user-specific packages'#013#010+
  183. '-Fu%localbasepath%/units/$FPCTARGET/*'#013#010+
  184. #013#010+
  185. '# path to the gcclib'#013#010+
  186. '%gcclibpath%'#013#010+
  187. #013#010+
  188. '# searchpath for libraries'#013#010+
  189. '#','-Fl%basepath%/lib'#013#010+
  190. '#-Fl/lib;/usr/lib'#013#010+
  191. '-Fl%basepath%/lib/$FPCTARGET'#013#010+
  192. #013#010+
  193. '# searchpath for tools'#013#010+
  194. '-FD%basepath%/bin/$FPCTARGET'#013#010+
  195. #013#010+
  196. '%NEEDCROSSBINUTILSIFDEF%'#013#010+
  197. #013#010+
  198. '# never need cross-prefix when targeting the JVM'#013#010+
  199. '# (no native compiler, always cross-','compiling)'#013#010+
  200. '#ifdef cpujvm'#013#010+
  201. '#undef NEEDCROSSBINUTILS'#013#010+
  202. '#endif'#013#010+
  203. #013#010+
  204. '# for android cross-prefix is set by compiler'#013#010+
  205. '#ifdef android'#013#010+
  206. '#undef NEEDCROSSBINUTILS'#013#010+
  207. '#endif'#013#010+
  208. #013#010+
  209. '# binutils prefix for cross compiling'#013#010+
  210. '#IFDEF FPC_CROSSCOMPILING'#013#010+
  211. '#IFDEF NEEDC','ROSSBINUTILS'#013#010+
  212. ' -XP$FPCTARGET-'#013#010+
  213. '#ENDIF'#013#010+
  214. '#ENDIF'#013#010+
  215. #013#010+
  216. #013#010+
  217. '# -------------'#013#010+
  218. '# Linking'#013#010+
  219. '# -------------'#013#010+
  220. #013#010+
  221. '# generate always debugging information for GDB (slows down the compil'+
  222. 'ing'#013#010+
  223. '# process)'#013#010+
  224. '# -gc generate checks for pointers'#013#010+
  225. '# ',' -gd use dbx'#013#010+
  226. '# -gg use gsym'#013#010+
  227. '# -gh use heap trace unit (for memory leak debugging)'#013#010+
  228. '# -gl use line info unit to show more info for backtraces'#013+
  229. #010+
  230. '# -gv generates programs tracable with va','lgrind'#013#010+
  231. '# -gw generate dwarf debugging info'#013#010+
  232. '#'#013#010+
  233. '# Enable debuginfo and use the line info unit by default'#013#010+
  234. '#-gl'#013#010+
  235. #013#010+
  236. '# always pass an option to the linker'#013#010+
  237. '#-k-s'#013#010+
  238. #013#010+
  239. '# Always strip debuginfo from the executable'#013#010+
  240. '-Xs'#013#010+
  241. #013#010+
  242. #013#010+
  243. '# ---------','----'#013#010+
  244. '# Miscellaneous'#013#010+
  245. '# -------------'#013#010+
  246. #013#010+
  247. '# Write always a nice FPC logo ;)'#013#010+
  248. '-l'#013#010+
  249. #013#010+
  250. '# Verbosity'#013#010+
  251. '# e : Show errors (default) d : Show debug info'#013#010+
  252. '# w : Show warnings u : Show unit info'#013#010+
  253. '# n : Show notes ',' t : Show tried/used files'#013+
  254. #010+
  255. '# h : Show hints s : Show time stamps'#013#010+
  256. '# i : Show general info q : Show message numbers'#013#010+
  257. '# l : Show linenumbers c : Show conditionals'#013#010+
  258. '# a : ','Show everything 0 : Show nothing (except erro'+
  259. 'rs)'#013#010+
  260. '# b : Write file names messages r : Rhide/GCC compatibility mod'+
  261. 'e'#013#010+
  262. '# with full path x : Executable info (Win32 only'+
  263. ')'#013#010+
  264. '# v : write fpcdebug.txt wi','th p : Write tree.log with parse'+
  265. ' tree'#013#010+
  266. '# lots of debugging info'#013#010+
  267. '#'#013#010+
  268. '# Display Info, Warnings and Notes'#013#010+
  269. '-viwn'#013#010+
  270. '# If you don'#039't want so much verbosity use'#013#010+
  271. '#-vw'#013#010
  272. );