home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / extras / mkmk / mkmk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-24  |  3.0 KB  |  118 lines

  1. /****************************************************/
  2. /*                                                  */
  3. /* Copyright (c) 1993 SAS Institute, Inc.           */
  4. /*                                                  */
  5. /* Support: walker                                  */
  6. /* Script:  splatam                                 */
  7. /* Date:    07/12/93                                */
  8. /*                                                  */
  9. /****************************************************/
  10.  
  11. #define __USE_SYSBASE
  12. #include <stdlib.h>
  13. #include <string.h>
  14. #include <stdarg.h>
  15. #include <dos.h>
  16. #include <dos/dosextens.h>
  17. #include <dos/rdargs.h>
  18. #include <exec/execbase.h>
  19.  
  20. #include <proto/dos.h>
  21. #include <proto/exec.h>
  22. #include <proto/icon.h>
  23.  
  24. // Flags for file descriptor 'flags' field
  25. #define FD_CSRC   0x80000000    // C source file
  26. #define FD_HDR    0x40000000    // Header file
  27. #define FD_CXXSRC 0x20000000    // C++ source file
  28. #define FD_ASM    0x10000000    // Assembler file
  29. #define FD_OPTS   0x08000000    // Options file
  30. #define FD_MAKE   0x04000000    // Makefile
  31.  
  32. // File descriptor structure.  Contains information on the file like filename, file type,
  33. // direct dependancies (files directly #included by this file), as well as linkage
  34. // information to allow FileDesc structures to be linked into a list.
  35. typedef struct FileDesc
  36. {
  37.    struct FileDesc *next;
  38.    struct FileDesc *prev;
  39.    char *name;                 // Name of file
  40.    unsigned long flags;        // See above
  41.    int ndirect;                // Number of direct dependancies
  42.    int adirect;                // Available slots for dd's
  43.    struct FileDesc **Direct;   // Direct dependancies
  44. } FileDesc;
  45.  
  46. // The FileList structure is basically just a header to allow lists of FileDesc structures
  47. // to be created.
  48. typedef struct FileList
  49. {
  50.    struct FileDesc *head;
  51.    struct FileDesc *tail;
  52.    struct FileDesc *cur;
  53. } FileList;
  54.  
  55. /* Prototypes for functions defined in
  56. dofile.c
  57.  */
  58.  
  59. extern unsigned char buf[1024];
  60.  
  61. void AddDep(struct FileDesc * , struct FileDesc * );
  62.  
  63. unsigned char * scopy(unsigned char * );
  64.  
  65. void DoFile(struct FileList * , struct FileDesc * );
  66.  
  67. /* Prototypes for functions defined in
  68. gensmake.c
  69.  */
  70.  
  71. int filetype(unsigned char * );
  72.  
  73. unsigned char * suffix(unsigned char * );
  74.  
  75. unsigned char * prefix(unsigned char * );
  76.  
  77. unsigned char * objout(unsigned char * );
  78.  
  79. void ExpandDeps(struct FileDesc * );
  80.  
  81. void GenSmake(FileList * );
  82.  
  83. void makeicon(unsigned char * );
  84.  
  85. int iconexists(unsigned char * );
  86.  
  87. /* Prototypes for functions defined in
  88. mkmk.c
  89.  */
  90.  
  91. extern BPTR out;
  92.  
  93. extern unsigned char * makefile;
  94.  
  95. extern unsigned char * target;
  96.  
  97. extern int force;
  98.  
  99. void panic(unsigned char * );
  100.  
  101. void AddPattern(FileList * , unsigned char * );
  102.  
  103. struct FileDesc * FindFile(FileList * , unsigned char * );
  104.  
  105. struct FileDesc * AddFile(FileList * , unsigned char * );
  106.  
  107. struct FileDesc * NextFile(FileList * );
  108.  
  109. int main(void);
  110.  
  111. int __stdargs myfprintf(BPTR , unsigned char * , ...);
  112.  
  113. int __stdargs mysprintf(unsigned char * , unsigned char * , ...);
  114.  
  115. #define TOOLVER "6.55"
  116. #define TOOLDATE " " __AMIGADATE__
  117.  
  118.