makecfg 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. #!/bin/sh
  2. #
  3. # $Id$
  4. # This file is part of the Free Pascal run time library.
  5. # Copyright (c) 1996-98 by Michael van Canneyt and Peter Vreman
  6. #
  7. # Generate a configuration creationfile which will create /etc/ppc386.cfg
  8. #
  9. # Needs 4 Arguments:
  10. # $1 = filename to create
  11. # $2 = Path to the RTL Units
  12. # $3 = Path to the .msg files
  13. # $4 = Path to the GCC lib
  14. #
  15. cat <<EOFCREATE >$1
  16. #!/bin/sh
  17. #
  18. # Generate Free Pascal configuration file
  19. #
  20. if [ -f /etc/ppc386.cfg ] ; then
  21. mv -f /etc/ppc386.cfg /etc/ppc386.orig
  22. echo Saved old config to /etc/ppc386.orig
  23. fi
  24. echo Writing sample configuration file to /etc/ppc386.cfg
  25. cat <<EOFCFG > /etc/ppc386.cfg
  26. #
  27. # Example ppc386.cfg for Free Pascal Compiler Version 0.99.0
  28. #
  29. # Note: Older versions (before 10 March 1998) doesn't like spaces at the
  30. # start of lines!
  31. #
  32. # ----------------------
  33. # Defines (preprocessor)
  34. # ----------------------
  35. #
  36. # nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
  37. #
  38. # -d is the same as #DEFINE
  39. # -u is the same as #UNDEF
  40. #
  41. # When not m68k is defined at the commandline, define i386
  42. #IFNDEF m68k
  43. #DEFINE i386
  44. #ENDIF
  45. #
  46. # Some examples (for switches see below, and the -? helppages)
  47. #
  48. # Try compiling with the -dRELEASE or -dDEBUG on the commandline
  49. #
  50. # For a release compile with optimizes and strip debuginfo
  51. #IFDEF RELEASE
  52. -OGa5
  53. -Xs
  54. #WRITE Compiling Release Version
  55. #ENDIF
  56. # For a debug version compile with debuginfo and all codegeneration checks on
  57. #IFDEF DEBUG
  58. -g
  59. -Crtoi
  60. #WRITE Compiling Debug Version
  61. #ENDIF
  62. # ----------------
  63. # Parsing switches
  64. # ----------------
  65. # All assembler blocks are intel styled by default
  66. #-Rintel
  67. # All assembler blocks are AT&T styled by default
  68. #-Ratt
  69. # Semantic checking
  70. # -S2 switch some Delphi 2 extension on
  71. # -Sc supports operators like C (*=,+=,/= and -=)
  72. # -Sg allows LABEL and GOTO
  73. # -Si support C++ stlyed INLINE
  74. # -Sm support macros like C (global)
  75. # -So tries to be TP/BP 7.0 compatible
  76. # -Ss constructor name must be init (destructor must be done)
  77. # -St allows static keyword in objects
  78. # Allow goto, inline, C-operators
  79. -Sgic
  80. # ---------------
  81. # Code generation
  82. # ---------------
  83. # Uncomment the next line if you always want static/dynamic linking by default
  84. # (can be overruled with -CD, -CS at the commandline)
  85. #-CS
  86. #-CD
  87. # Set the default heapsize to 8Mb
  88. #-Ch8000000
  89. # Set default codegeneration checks (iocheck, overflow, range, stack)
  90. #-Ci
  91. #-Co
  92. #-Cr
  93. #-Ct
  94. # Optimize always for Size and Pentium
  95. #-OGa5
  96. # -----------------------
  97. # Set Filenames and Paths
  98. # -----------------------
  99. # Slashes are also allowed under dos
  100. # path to the messagefile, not necessary anymore but can be used to override
  101. # the default language
  102. #-Fr$3/errore.msg
  103. #-Fr$3/errorn.msg
  104. # path to the gcclib
  105. -Fg$4
  106. # searchpath for includefiles
  107. #-Fi/pp/inc;/pp/rtl/inc
  108. # searchpath for units (does the same as -Up)
  109. -Fu$2
  110. #-Fu/pp/units;/pp/rtl/dos/go32v2
  111. #-Fu/usr/lib/ppc/units;/usr/lib/ppc/linuxunits
  112. # searchpath for libraries
  113. #-Fl/pp/lib
  114. #-Fl/lib;/usr/lib
  115. # -------------
  116. # Linking
  117. # -------------
  118. # generate always debugging information for GDB (slows down the compiling
  119. # process)
  120. #-g
  121. # always pass an option to the linker
  122. #-k-s
  123. # Always strip debuginfo from the executable
  124. #-Xs
  125. # -------------
  126. # Miscellaneous
  127. # -------------
  128. # Write always a nice FPC logo ;)
  129. -l
  130. # Verbosity
  131. # e : Show errors (default) d : Show debug info
  132. # w : Show warnings u : Show used files
  133. # n : Show notes t : Show tried files
  134. # h : Show hints m : Show defined macros
  135. # i : Show general info p : Show compiled procedures
  136. # l : Show linenumbers c : Show conditionals
  137. # a : Show everything 0 : Show nothing (except errors)
  138. # Display Info, Warnings, Notes and Hints
  139. -viwnh
  140. # If you don't want so much verbosity use
  141. #-vw
  142. #
  143. # That's all folks
  144. #
  145. EOFCFG
  146. EOFCREATE
  147. chmod 755 $1