home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / tools / make / nmake / make.h < prev    next >
Text File  |  1987-07-21  |  3KB  |  119 lines

  1. /* make.h */
  2.  
  3. /* define the compiler to be used */
  4. #define CI86 0
  5. #define UNIX 0
  6. #define LC   0
  7. #define MSC  1
  8.  
  9. /*some useful macros*/
  10. #define NUL '\0'
  11. #define isnull(X) (X == '\0' ? TRUE : FALSE)
  12. #define notnull(X) (X == '\0' ? FALSE : TRUE )
  13. #define MkListMem() (struct llist *)get_mem((unsigned) sizeof(struct llist))
  14.  
  15. /* for the c86 compiler*/
  16. #if CI86
  17. #define max(a,b) ((a)>(b)?(a):(b))
  18. #define min(a,b) ((a)<=(b)?(a):(b))
  19. #define DEF_CC "\\BIN\\CC%d.EXE"
  20. #define DEF_PASS 4
  21. #endif
  22.  
  23. /* to run on UNIX */
  24. #if UNIX
  25. #define max(a,b) ((a)>(b)?(a):(b))
  26. #define min(a,b) ((a)<=(b)?(a):(b))
  27. #define DEF_CC "cc"
  28. #define DEF_PASS 1
  29. #endif
  30.  
  31. /* to run under Microsoft C */
  32. #if MSC
  33. #define max(a,b) ((a)>(b)?(a):(b))
  34. #define min(a,b) ((a)<=(b)?(a):(b))
  35. #define DEF_CC "msc"
  36. #define DEF_PASS 1
  37. #endif
  38.  
  39. /* for the lattice C compiler */
  40. #if LC
  41. /* increase the stack size from default (2K) */
  42. #define SIZ_STK 4096
  43. #define DEF_CC "\\BIN\\LC.COM"
  44. #define DEF_PASS 1
  45. #endif
  46.  
  47. /* for the fortran compiler, when needed */
  48. /*
  49. #define DEF_CC "\\BIN\\FOR%d.EXE"
  50. #define DEF_PASS 2
  51. */
  52.  
  53. /*for some reason, the compilers I use barf on '\\' */
  54. #define BKSLSH '\134'
  55. #define ERROR -1
  56. #define TRUE 1
  57. #define FALSE 0
  58.  
  59. /*
  60. flags for expand. Report and ignore errors, and no_target means error if
  61. $@ or $* is attempted ( as in $* : a.obj )
  62. */
  63. #define NO_TARG  2
  64. #define REPT_ERR 1
  65. #define IGN_ERR  0
  66.  
  67. #define DEFAULT "MAKEFILE"
  68. #define LINE_DEFAULT '+'
  69. #define DRIVE_DEFAULT "C:"
  70.  
  71. #define INMAX   500     /* maximum input line length */
  72.                         /*(allow for inline expansion) */
  73. #define INMAXSH 80      /*length for short strings*/
  74.  
  75. #define DEPENDANT   1   /* used in calling getmodified */
  76. #define DEFINED     2
  77.  
  78. struct llist {
  79.     char *name;
  80.     struct llist *next;
  81. };
  82.  
  83. struct defnrec {
  84.     char *name;
  85.     int uptodate;
  86.     long modified;
  87.     struct llist *dependson;
  88.     struct llist *howto;
  89.     struct defnrec *nextdefn;
  90. };
  91.  
  92. struct macrec {
  93.     char *name,*mexpand;
  94.     struct macrec *nextmac;
  95. };
  96.  
  97. struct rulerec {
  98.     char *dep,*targ;      /*order here is important because there are defaults*/
  99.     struct llist *rule;
  100.     struct rulerec *nextrule;
  101. };
  102.  
  103. struct dta {
  104.     char dosuse[21];
  105.     char attr_found;
  106.     long dttime;
  107. #if CI86
  108.     unsigned long dta_size;
  109. #endif
  110. #if LC
  111.     long dta_size;
  112. #endif
  113. #if UNIX | MSC
  114.     unsigned long dta_size;
  115. #endif
  116.     char dta_name[13];
  117.     char dta_fill[90];
  118. };
  119.