2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * @(#)config.h 8.1 (Berkeley) 6/6/93
40 #include <sys/types.h>
45 struct file_list *f_next;
46 char *f_fn; /* the name */
47 int f_type; /* type or count */
48 u_char f_flags; /* see below */
49 char *f_compilewith; /* special make rule if present */
50 char *f_depends; /* additional dependancies */
51 char *f_clean; /* File list to add to clean rule */
53 char *f_warn; /* warning message */
64 #define DEVDONE 0x80000000
65 #define TYPEMASK 0x7fffffff
70 #define NO_IMPLCT_RULE 1
72 #define BEFORE_DEPEND 4
77 int d_done; /* processed */
78 char *d_name; /* name of device (e.g. rk11) */
79 int d_count; /* device count */
80 #define UNKNOWN -2 /* -2 means not set yet */
81 struct device *d_next; /* Next one in list */
89 * Config has a global notion of which machine type is
90 * being used. It uses the name of the machine in choosing
91 * files and directories. Thus if the name of the machine is ``i386'',
92 * it will build from ``Makefile.i386'' and use ``../i386/inline''
93 * in the makerules, etc.
98 * For each machine, a set of CPU's may be specified as supported.
99 * These and the options (below) are put in the C flags in the makefile.
103 struct cputype *cpu_next;
107 * A set of options may also be specified which are like CPU types,
108 * but which may also specify values for the options.
109 * A separate set of options may be defined for make-style options.
114 int op_ownfile; /* true = own file, false = makefile */
121 struct opt_list *o_next;
131 char *get_word(FILE *);
132 char *get_quoted_word(FILE *);
133 char *path(const char *);
134 char *raisestr(char *);
135 void remember(const char *);
136 void moveifchanged(const char *, const char *);
143 extern struct device *dtab;
145 extern char errbuf[80];
147 extern const char *yyfile;
149 extern struct file_list *ftab;
151 extern int profiling;
152 extern int debugging;
156 extern char *PREFIX; /* Config file name - for error messages */
157 extern char srcdir[]; /* root of the kernel source tree */
159 #define eq(a,b) (!strcmp(a,b))
160 #define ns(s) strdup(s)