home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 594a.lha / imake / imakemdep.h < prev    next >
C/C++ Source or Header  |  1991-10-18  |  5KB  |  217 lines

  1. /*
  2.  * $XConsortium: imakemdep.h,v 1.10 89/12/18 16:56:38 jim Exp $
  3.  *
  4.  * This file contains machine-dependent constants for the imake utility.  When
  5.  * porting imake, read each of the steps below and add in any necessary
  6.  * definitions.  Do *not* edit ccimake.c or imake.c!
  7.  */
  8.  
  9. #ifdef CCIMAKE
  10. /*
  11.  * Step 1:  imake_ccflags
  12.  *     Define any special flags that will be needed to get imake.c to compile.
  13.  *     These will be passed to the compile along with the contents of the
  14.  *     make variable BOOTSTRAPCFLAGS.
  15.  */
  16. #ifdef hpux
  17. #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
  18. #endif
  19.  
  20. #ifdef macII
  21. #define imake_ccflags "-DSYSV"
  22. #endif
  23.  
  24. #ifdef stellar
  25. #define imake_ccflags "-DSYSV"
  26. #endif
  27.  
  28. #ifdef att
  29. #define imake_ccflags "-DSYSV -DUSG"
  30. #endif
  31.  
  32. #ifdef CRAY
  33. #define imake_ccflags "-DSYSV -DUSG"
  34. #endif
  35.  
  36. #ifdef aix
  37. #define imake_ccflags "-Daix -DSYSV"
  38. #endif
  39.  
  40. #ifdef umips
  41. #ifdef SYSTYPE_SYSV
  42. #define imake_ccflags "-DSYSV -I../../lib/X/mips -I/usr/include/bsd ../../lib/X/mips/mipssysvc.c -lbsd"
  43. #endif
  44. #endif
  45.  
  46. #ifdef AMIGA
  47. #ifdef __SASC
  48. #define imake_ccflags "-L"
  49. #endif
  50. #endif
  51.  
  52. #else /* not CCIMAKE */
  53. #ifndef MAKEDEPEND
  54. /*
  55.  * Step 2:  dup2
  56.  *     If your OS doesn't have a dup2() system call to duplicate one file
  57.  *     descriptor onto another, define such a mechanism here (if you don't
  58.  *     already fall under the existing category(ies).
  59.  */
  60. #if defined(SYSV) && !defined(CRAY)
  61. #define dup2(fd1,fd2)   ((fd1 == fd2) ? fd1 : (close(fd2), \
  62.                            fcntl(fd1, F_DUPFD, fd2)))
  63. #endif
  64.  
  65.  
  66. /*
  67.  * Step 3:  FIXUP_CPP_WHITESPACE
  68.  *     If your cpp collapses tabs macro expansions into a single space and
  69.  *     replaces escaped newlines with a space, define this symbol.  This will
  70.  *     cause imake to attempt to patch up the generated Makefile by looking
  71.  *     for lines that have colons in them (this is why the rules file escapes
  72.  *     all colons).  One way to tell if you need this is to see whether or not
  73.  *     your Makefiles have no tabs in them and lots of @@ strings.
  74.  */
  75. #if defined(sun) || defined(SYSV) || defined(AMIGA)
  76. #define FIXUP_CPP_WHITESPACE
  77. #endif
  78.  
  79.  
  80. /*
  81.  * Step 4:  DEFAULT_CPP
  82.  *     If the C preprocessor does not live in /lib/cpp, set this symbol to
  83.  *     the appropriate location.
  84.  */
  85. #ifdef apollo
  86. #define DEFAULT_CPP "/usr/lib/cpp"
  87. #endif
  88.  
  89. #ifdef AMIGA
  90. #define DEFAULT_CPP "cpp"
  91. #endif
  92.  
  93. /*
  94.  * Step 5:  cpp_argv
  95.  *     The following table contains the cpp flags that should be passed to
  96.  *     cpp whenever a Makefile is being generated.  If your preprocessor
  97.  *     doesn't predefine any unique symbols, choose one and add it to the
  98.  *     end of this table.  Then, do the following:
  99.  *
  100.  *       a.  Use this symbol at the top of Imake.tmpl when setting MacroFile.
  101.  *       b.  Put this symbol in the definition of BootstrapCFlags in your
  102.  *           <platform>.cf file.
  103.  *       c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol"
  104.  *           to the end of the command line.
  105.  *
  106.  *     Note that you may define more than one symbols (useful for platforms
  107.  *     that support multiple operating systems).
  108.  */
  109.  
  110. #define ARGUMENTS 50    /* number of arguments in various arrays */
  111. char *cpp_argv[ARGUMENTS] = {
  112.     "cpp",          /* replaced by the actual cpp program to exec */
  113. #ifdef AMIGA
  114.     "-I",
  115. #else
  116.     "-I.",          /* add current directory to include path */
  117. #endif
  118. #ifdef unix
  119.     "-Uunix",       /* remove unix symbol so that filename unix.c okay */
  120. #endif
  121. #ifdef M4330
  122.     "-DM4330",      /* Tektronix */
  123. #endif
  124. #ifdef M4310
  125.     "-DM4310",      /* Tektronix */
  126. #endif
  127. #ifdef macII
  128.     "-DmacII",      /* Apple A/UX */
  129. #endif
  130. #ifdef att
  131.     "-Datt",        /* AT&T products */
  132. #endif
  133. #ifdef aix
  134.     "-Daix",        /* AIX instead of AOS */
  135. #ifndef ibm
  136. #define ibm        /* allow BOOTSTRAPCFLAGS="-Daix" */
  137. #endif
  138. #endif
  139. #ifdef ibm
  140.     "-Dibm",        /* IBM PS/2 and RT under both AOS and AIX */
  141. #endif
  142. };
  143. #else /* else MAKEDEPEND */
  144. /*
  145.  * Step 6:  predefs
  146.  *     If your compiler and/or preprocessor define any specific symbols, add
  147.  *     them to the the following table.  The definition of struct symtab is
  148.  *     in util/makedepend/main.c.
  149.  */
  150. struct symtab    predefs[] = {
  151. #ifdef apollo
  152.     {"apollo", "1"},
  153. #endif
  154. #ifdef ibm032
  155.     {"ibm032", "1"},
  156. #endif
  157. #ifdef ibm
  158.     {"ibm", "1"},
  159. #endif
  160. #ifdef aix
  161.     {"aix", "1"},
  162. #endif
  163. #ifdef sun
  164.     {"sun", "1"},
  165. #endif
  166. #ifdef hpux
  167.     {"hpux", "1"},
  168. #endif
  169. #ifdef vax
  170.     {"vax", "1"},
  171. #endif
  172. #ifdef VMS
  173.     {"VMS", "1"},
  174. #endif
  175. #ifdef cray
  176.     {"cray", "1"},
  177. #endif
  178. #ifdef CRAY
  179.     {"CRAY", "1"},
  180. #endif
  181. #ifdef att
  182.     {"att", "1"},
  183. #endif
  184. #ifdef mips
  185.     {"mips", "1"},
  186. #endif
  187. #ifdef ultrix
  188.     {"ultrix", "1"},
  189. #endif
  190. #ifdef stellar
  191.     {"stellar", "1"},
  192. #endif
  193. #ifdef mc68000
  194.     {"mc68000", "1"},
  195. #endif
  196. #ifdef mc68020
  197.     {"mc68020", "1"},
  198. #endif
  199. #ifdef __GNUC__
  200.     {"__GNUC__", "1"},
  201. #endif
  202. #ifdef __STDC__
  203.     {"__STDC__", "1"},
  204. #endif
  205. #ifdef __HIGHC__
  206.     {"__HIGHC__", "1"},
  207. #endif
  208. #ifdef CMU
  209.     {"CMU", "1"},
  210. #endif
  211.     /* add any additional symbols before this line */
  212.     {NULL, NULL}
  213. };
  214.  
  215. #endif /* MAKEDEPEND */
  216. #endif /* CCIMAKE */
  217.