]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | # |
2 | # Mach Operating System | |
3 | # Copyright (c) 1986 Carnegie-Mellon University | |
4 | # All rights reserved. The CMU software License Agreement specifies | |
5 | # the terms and conditions for use and redistribution. | |
6 | # | |
7 | ||
8 | # | |
9 | # Export IDENT for sub-makefiles | |
10 | # | |
11 | export IDENT | |
12 | ||
13 | # | |
14 | # XXX: INCFLAGS | |
15 | # | |
16 | INCFLAGS_MAKEFILE= | |
17 | ||
18 | ||
19 | export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd | |
20 | export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def | |
21 | export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule | |
22 | export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir | |
23 | ||
24 | include $(MakeInc_cmd) | |
25 | include $(MakeInc_def) | |
26 | ||
27 | # | |
28 | # XXX: CFLAGS | |
29 | # | |
55e303ae | 30 | CFLAGS+= -DKERNEL -DLIBSA_KERNEL_PRIVATE \ |
1c79356b A |
31 | -Wall -Wno-four-char-constants -fno-common |
32 | ||
33 | SFLAGS+= -DKERNEL | |
34 | ||
35 | # | |
36 | # Directories for mig generated files | |
37 | # | |
38 | COMP_SUBDIRS = | |
39 | ||
40 | # | |
41 | # Make sure we don't remove this by accident if interrupted at the wrong | |
42 | # time. | |
43 | # | |
44 | .PRECIOUS: Makefile | |
45 | ||
1c79356b A |
46 | # |
47 | # Theses macros are filled in by the config program depending on the | |
48 | # current configuration. The MACHDEP macro is replaced by the | |
49 | # contents of the machine dependent makefile template and the others | |
50 | # are replaced by the corresponding symbol definitions for the | |
51 | # configuration. | |
52 | # | |
53 | ||
54 | %OBJS | |
55 | ||
56 | %CFILES | |
57 | ||
58 | %MFILES | |
59 | ||
60 | %SFILES | |
61 | ||
62 | %BFILES | |
63 | ||
64 | %ORDERED | |
65 | %MACHDEP | |
66 | ||
67 | # | |
68 | # OBJSDEPS is the set of files (defined in the machine dependent | |
69 | # template if necessary) which all objects depend on (such as an | |
70 | # in-line assembler expansion filter) | |
71 | # | |
72 | ${OBJS}: ${OBJSDEPS} | |
73 | ||
74 | ||
75 | %LOAD | |
76 | ||
77 | LDOBJS = $(OBJS) | |
78 | ||
79 | $(COMPONENT).o: $(LDOBJS) | |
80 | @echo "creating $(COMPONENT).o" | |
55e303ae | 81 | @echo [ updating $(COMPONENT).o ${LIBSA_KERNEL_CONFIG} ] |
91447636 | 82 | $(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT).o ${LDOBJS} /usr/local/lib/libkld.a |
1c79356b A |
83 | $(SEG_HACK) __KLD $(COMPONENT).o -o $(COMPONENT)_kld.o |
84 | mv $(COMPONENT)_kld.o $(COMPONENT).o | |
85 | ||
86 | do_all: $(COMPONENT).o | |
87 | ||
88 | do_depend: do_all | |
89 | ${MD} -u Makedep -f -d `ls *.d` | |
90 | ||
91 | do_build_all: do_depend | |
92 | ||
93 | %RULES | |
94 | ||
1c79356b | 95 | include $(MakeInc_rule) |
1c79356b A |
96 | include $(MakeInc_dir) |
97 |