home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / cool.lha / ice / pisces / pimake / pimake.h < prev   
Encoding:
C/C++ Source or Header  |  1991-09-04  |  4.6 KB  |  201 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. #else /* not CCIMAKE */
  47. #ifndef MAKEDEPEND
  48. /*
  49.  * Step 2:  dup2
  50.  *     If your OS doesn't have a dup2() system call to duplicate one file
  51.  *     descriptor onto another, define such a mechanism here (if you don't
  52.  *     already fall under the existing category(ies).
  53.  */
  54. #if defined(SYSV) && !defined(CRAY)
  55. #define    dup2(fd1,fd2)    ((fd1 == fd2) ? fd1 : (close(fd2), \
  56.                            fcntl(fd1, F_DUPFD, fd2)))
  57. #endif
  58.  
  59.  
  60. /*
  61.  * Step 3:  FIXUP_CPP_WHITESPACE
  62.  *     If your cpp collapses tabs macro expansions into a single space and
  63.  *     replaces escaped newlines with a space, define this symbol.  This will
  64.  *     cause imake to attempt to patch up the generated Makefile by looking
  65.  *     for lines that have colons in them (this is why the rules file escapes
  66.  *     all colons).  One way to tell if you need this is to see whether or not
  67.  *     your Makefiles have no tabs in them and lots of @@ strings.
  68.  */
  69. #if defined(sun) || defined(SYSV)
  70. #define FIXUP_CPP_WHITESPACE
  71. #endif
  72.  
  73.  
  74. /*
  75.  * Step 4:  DEFAULT_CPP
  76.  *     If the C preprocessor does not live in /lib/cpp, set this symbol to 
  77.  *     the appropriate location.
  78.  */
  79. #ifdef apollo
  80. #define DEFAULT_CPP "/usr/lib/cpp"
  81. #endif
  82.  
  83.  
  84. /*
  85.  * Step 5:  cpp_argv
  86.  *     The following table contains the cpp flags that should be passed to 
  87.  *     cpp whenever a Makefile is being generated.  If your preprocessor 
  88.  *     doesn't predefine any unique symbols, choose one and add it to the
  89.  *     end of this table.  Then, do the following:
  90.  * 
  91.  *         a.  Use this symbol at the top of Imake.tmpl when setting MacroFile.
  92.  *         b.  Put this symbol in the definition of BootstrapCFlags in your
  93.  *             <platform>.cf file.
  94.  *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
  95.  *             to the end of the command line.
  96.  * 
  97.  *     Note that you may define more than one symbols (useful for platforms 
  98.  *     that support multiple operating systems).
  99.  */
  100.  
  101. #define    ARGUMENTS 50    /* number of arguments in various arrays */
  102. char *cpp_argv[ARGUMENTS] = {
  103.     "cpp",        /* replaced by the actual cpp program to exec */
  104.     "-I.",        /* add current directory to include path */
  105. #ifdef M4330
  106.     "-DM4330",    /* Tektronix */
  107. #endif
  108. #ifdef M4310
  109.     "-DM4310",    /* Tektronix */
  110. #endif
  111. #ifdef macII
  112.     "-DmacII",    /* Apple A/UX */
  113. #endif
  114. #ifdef att
  115.     "-Datt",    /* AT&T products */
  116. #endif
  117. #ifdef aix
  118.     "-Daix",    /* AIX instead of AOS */
  119. #ifndef ibm
  120. #define ibm        /* allow BOOTSTRAPCFLAGS="-Daix" */
  121. #endif
  122. #endif
  123. #ifdef ibm
  124.     "-Dibm",    /* IBM PS/2 and RT under both AOS and AIX */
  125. #endif
  126. };
  127. #else /* else MAKEDEPEND */
  128. /*
  129.  * Step 6:  predefs
  130.  *     If your compiler and/or preprocessor define any specific symbols, add
  131.  *     them to the the following table.  The definition of struct symtab is
  132.  *     in util/makedepend/main.c.
  133.  */
  134. struct symtab    predefs[] = {
  135. #ifdef apollo
  136.     {"apollo", "1"},
  137. #endif
  138. #ifdef ibm032
  139.     {"ibm032", "1"},
  140. #endif
  141. #ifdef ibm
  142.     {"ibm", "1"},
  143. #endif
  144. #ifdef aix
  145.     {"aix", "1"},
  146. #endif
  147. #ifdef sun
  148.     {"sun", "1"},
  149. #endif
  150. #ifdef hpux
  151.     {"hpux", "1"},
  152. #endif
  153. #ifdef vax
  154.     {"vax", "1"},
  155. #endif
  156. #ifdef VMS
  157.     {"VMS", "1"},
  158. #endif
  159. #ifdef cray
  160.     {"cray", "1"},
  161. #endif
  162. #ifdef CRAY
  163.     {"CRAY", "1"},
  164. #endif
  165. #ifdef att
  166.     {"att", "1"},
  167. #endif
  168. #ifdef mips
  169.     {"mips", "1"},
  170. #endif
  171. #ifdef ultrix
  172.     {"ultrix", "1"},
  173. #endif
  174. #ifdef stellar
  175.     {"stellar", "1"},
  176. #endif
  177. #ifdef mc68000
  178.     {"mc68000", "1"},
  179. #endif
  180. #ifdef mc68020
  181.     {"mc68020", "1"},
  182. #endif
  183. #ifdef __GNUC__
  184.     {"__GNUC__", "1"},
  185. #endif
  186. #ifdef __STDC__
  187.     {"__STDC__", "1"},
  188. #endif
  189. #ifdef __HIGHC__
  190.     {"__HIGHC__", "1"},
  191. #endif
  192. #ifdef CMU
  193.     {"CMU", "1"},
  194. #endif
  195.     /* add any additional symbols before this line */
  196.     {NULL, NULL}
  197. };
  198.  
  199. #endif /* MAKEDEPEND */
  200. #endif /* CCIMAKE */
  201.