]>
git.saurik.com Git - apple/xnu.git/blob - SETUP/config/config.h
2 * Copyright (c) 1999-2009 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
25 * Mach Operating System
26 * Copyright (c) 1990 Carnegie-Mellon University
27 * Copyright (c) 1989 Carnegie-Mellon University
28 * Copyright (c) 1988 Carnegie-Mellon University
29 * Copyright (c) 1987 Carnegie-Mellon University
30 * All rights reserved. The CMU software License Agreement specifies
31 * the terms and conditions for use and redistribution.
35 * Copyright (c) 1980 Regents of the University of California.
36 * All rights reserved.
38 * Redistribution and use in source and binary forms are permitted
39 * provided that the above copyright notice and this paragraph are
40 * duplicated in all such forms and that any documentation,
41 * advertising materials, and other materials related to such
42 * distribution and use acknowledge that the software was developed
43 * by the University of California, Berkeley. The name of the
44 * University may not be used to endorse or promote products derived
45 * from this software without specific prior written permission.
46 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
47 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
48 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
50 * @(#)config.h 5.8 (Berkeley) 6/18/88
58 #include <sys/types.h>
59 #include <sys/param.h>
64 struct file_list
*f_next
;
65 char *f_fn
; /* the name */
66 u_char f_type
; /* see below */
67 u_char f_flags
; /* see below */
68 short f_special
; /* requires special make rule */
70 char *f_extra
; /* stuff to add to make line */
84 #define CONFIGDEP 0x01 /* obsolete? */
85 #define OPTIONSDEF 0x02 /* options definition entry */
86 #define LIBRARYDEP 0x04 /* include file in library build */
89 int d_type
; /* CONTROLLER, DEVICE, bus adaptor */
90 const char *d_name
; /* name of device (e.g. rk11) */
91 int d_slave
; /* slave number */
92 #define QUES -1 /* -1 means '?' */
93 #define UNKNOWN -2 /* -2 means not set yet */
94 int d_flags
; /* nlags for device init */
95 struct device
*d_next
; /* Next one in list */
96 char *d_init
; /* pseudo device init routine name */
100 * Config has a global notion of which machine type is
101 * being used. It uses the name of the machine in choosing
102 * files and directories. Thus if the name of the machine is ``vax'',
103 * it will build from ``Makefile.vax'' and use ``../vax/inline''
104 * in the makerules, etc.
106 extern const char *machinename
;
109 * In order to configure and build outside the kernel source tree,
110 * we may wish to specify where the source tree lives.
112 extern const char *source_directory
;
113 extern const char *object_directory
;
114 extern char *config_directory
;
116 FILE *fopenp(const char *fpath
, char *file
, char *complete
, const char *ftype
);
117 const char *get_VPATH(void);
118 #define VPATH get_VPATH()
121 * A set of options may also be specified which are like CPU types,
122 * but which may also specify values for the options.
123 * A separate set of options may be defined for make-style options.
131 extern struct opt
*opt
, *mkopt
, *opt_tail
, *mkopt_tail
;
133 const char *get_word(FILE *fp
);
134 char *ns(const char *str
);
136 char *path(const char *file
);
140 extern struct device
*dtab
;
141 dev_t
nametodev(char *name
, int defunit
, char defpartition
);
142 char *devtoname(dev_t dev
);
144 extern char errbuf
[80];
147 extern struct file_list
*ftab
, *conf_list
, **confp
;
148 extern char *build_directory
;
150 extern int profiling
;
152 #define eq(a, b) (!strcmp(a,b))
157 /* External function references */
158 char *get_rest(FILE *fp
);
161 void yyerror(const char *s
);
167 int opteq(const char *cp
, const char *dp
);
169 void init_dev(struct device
*dp
);
170 void newdev(struct device
*dp
);
171 void dev_param(struct device
*dp
, const char *str
, long num
);
173 int searchp(const char *spath
, char *file
, char *fullname
, int (*func
)(char *));