| 1 | # Configuration fragment for Cygnus source tree. |
| 2 | |
| 3 | Set host_libs "mmalloc libiberty opcodes bfd readline" |
| 4 | |
| 5 | Set host_tools "byacc flex binutils ld gas gcc gdb" |
| 6 | |
| 7 | Set target_libs "" |
| 8 | |
| 9 | Set target_tools "" |
| 10 | |
| 11 | Set configdirs "{host_libs} {host_tools} {target_libs} {target_tools}" |
| 12 | Export configdirs |
| 13 | |
| 14 | # Make up a special include directory that tools will share. |
| 15 | |
| 16 | If "`Exists "{objdir}"extra-include`" == "" |
| 17 | NewFolder "{objdir}"extra-include |
| 18 | End If |
| 19 | |
| 20 | Set extradir "{objdir}extra-include:" |
| 21 | |
| 22 | Echo '/* Imitation sys/types.h. */' >"{extradir}"'sys/types.h' |
| 23 | Echo '#ifndef __SYS_TYPES_H__' >>"{extradir}"'sys/types.h' |
| 24 | Echo '#define __SYS_TYPES_H__' >>"{extradir}"'sys/types.h' |
| 25 | Echo '#include <Types.h>' >>"{extradir}"'sys/types.h' |
| 26 | Echo 'typedef short dev_t' >>"{extradir}"'sys/types.h' |
| 27 | Echo 'typedef short ino_t' >>"{extradir}"'sys/types.h' |
| 28 | Echo 'typedef unsigned short mode_t' >>"{extradir}"'sys/types.h' |
| 29 | Echo 'typedef unsigned short uid_t' >>"{extradir}"'sys/types.h' |
| 30 | Echo 'typedef unsigned short gid_t' >>"{extradir}"'sys/types.h' |
| 31 | Echo 'typedef long off_t' >>"{extradir}"'sys/types.h' |
| 32 | Echo '#endif /* __SYS_TYPES_H__ */' >>"{extradir}"'sys/types.h' |
| 33 | |
| 34 | Echo '/* Imitation sys/time.h. */' >"{extradir}"'sys/time.h' |
| 35 | Echo '#ifndef __SYS_TIME_H__' >>"{extradir}"'sys/time.h' |
| 36 | Echo '#define __SYS_TIME_H__' >>"{extradir}"'sys/time.h' |
| 37 | Echo '#include <Time.h>' >"{extradir}"'sys/time.h' |
| 38 | Echo 'struct timeval {' >>"{extradir}"'sys/time.h' |
| 39 | Echo ' long tv_sec;' >>"{extradir}"'sys/time.h' |
| 40 | Echo ' long tv_usec;' >>"{extradir}"'sys/time.h' |
| 41 | Echo '};' >>"{extradir}"'sys/time.h' |
| 42 | Echo '#endif /* __SYS_TIME_H__ */' >>"{extradir}"'sys/time.h' |
| 43 | |
| 44 | Echo '/* Imitation sys/resource.h. */' >"{extradir}"'sys/resource.h' |
| 45 | Echo '#ifndef __SYS_RESOURCE_H__' >>"{extradir}"'sys/resource.h' |
| 46 | Echo '#define __SYS_RESOURCE_H__' >>"{extradir}"'sys/resource.h' |
| 47 | Echo 'struct rusage {' >"{extradir}"'sys/resource.h' |
| 48 | Echo ' struct timeval ru_utime;' >>"{extradir}"'sys/resource.h' |
| 49 | Echo ' struct timeval ru_stime;' >>"{extradir}"'sys/resource.h' |
| 50 | Echo '};' >>"{extradir}"'sys/resource.h' |
| 51 | Echo '#endif /* __SYS_RESOURCE_H__ */' >>"{extradir}"'sys/resource.h' |
| 52 | |
| 53 | Echo "/* varargs.h. */" >"{extradir}"varargs.h |
| 54 | Echo "#ifndef __va_list__" >>"{extradir}"varargs.h |
| 55 | Echo "#define __va_list__" >>"{extradir}"varargs.h |
| 56 | Echo "typedef char *va_list;" >>"{extradir}"varargs.h |
| 57 | Echo "#endif" >>"{extradir}"varargs.h |
| 58 | Echo "#define va_dcl int va_alist;" >>"{extradir}"varargs.h |
| 59 | Echo "#define va_start(list) list = (char *) &va_alist" >>"{extradir}"varargs.h |
| 60 | Echo "#define va_end(list)" >>"{extradir}"varargs.h |
| 61 | Echo "#define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]" >>"{extradir}"varargs.h |
| 62 | |
| 63 | Echo '/* empty */' >"{extradir}"'sys/param.h' |
| 64 | |
| 65 | Echo '/* empty */' >"{extradir}"'sys/file.h' |
| 66 | |
| 67 | Echo '/* Imitation stat.h */' >"{extradir}"'sys/stat.h' |
| 68 | Echo '#ifndef __SYS_STAT_H__' >>"{extradir}"'sys/stat.h' |
| 69 | Echo '#define __SYS_STAT_H__' >>"{extradir}"'sys/stat.h' |
| 70 | Echo '#include <sys/types.h>' >>"{extradir}"'sys/stat.h' |
| 71 | Echo '#include <Time.h>' >>"{extradir}"'sys/stat.h' |
| 72 | Echo 'struct stat {' >>"{extradir}"'sys/stat.h' |
| 73 | Echo ' dev_t st_dev;' >>"{extradir}"'sys/stat.h' |
| 74 | Echo ' ino_t st_ino;' >>"{extradir}"'sys/stat.h' |
| 75 | Echo ' mode_t st_mode;' >>"{extradir}"'sys/stat.h' |
| 76 | Echo ' short st_nlink;' >>"{extradir}"'sys/stat.h' |
| 77 | Echo ' uid_t st_uid;' >>"{extradir}"'sys/stat.h' |
| 78 | Echo ' gid_t st_gid;' >>"{extradir}"'sys/stat.h' |
| 79 | Echo ' dev_t st_rdev;' >>"{extradir}"'sys/stat.h' |
| 80 | Echo ' off_t st_size;' >>"{extradir}"'sys/stat.h' |
| 81 | Echo ' time_t st_atime;' >>"{extradir}"'sys/stat.h' |
| 82 | Echo ' int st_spare1;' >>"{extradir}"'sys/stat.h' |
| 83 | Echo ' time_t st_mtime;' >>"{extradir}"'sys/stat.h' |
| 84 | Echo ' int st_spare2;' >>"{extradir}"'sys/stat.h' |
| 85 | Echo ' time_t st_ctime;' >>"{extradir}"'sys/stat.h' |
| 86 | Echo ' int st_spare3;' >>"{extradir}"'sys/stat.h' |
| 87 | Echo ' long st_blksize;' >>"{extradir}"'sys/stat.h' |
| 88 | Echo ' long st_blocks;' >>"{extradir}"'sys/stat.h' |
| 89 | Echo ' long st_spare4[2];' >>"{extradir}"'sys/stat.h' |
| 90 | Echo '};' >>"{extradir}"'sys/stat.h' |
| 91 | Echo '#define S_IFDIR 0x0010' >>"{extradir}"'sys/stat.h' |
| 92 | Echo '#define S_IFMT 0x0020' >>"{extradir}"'sys/stat.h' |
| 93 | Echo '#define S_IREAD 0x0040' >>"{extradir}"'sys/stat.h' |
| 94 | Echo '#define S_IWRITE 0x0080' >>"{extradir}"'sys/stat.h' |
| 95 | Echo '#define S_IEXEC 0x0100' >>"{extradir}"'sys/stat.h' |
| 96 | Echo 'int stat (char *path, struct stat *buf);' >>"{extradir}"'sys/stat.h' |
| 97 | Echo 'int fstat(int, struct stat *);' >>"{extradir}"'sys/stat.h' |
| 98 | Echo '#endif /* __SYS_STAT_H___ */' >>"{extradir}"'sys/stat.h' |