]>
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 to include libsa prototypes | |
15 | # | |
16 | INCFLAGS_MAKEFILE= -I$(SOURCE)libsa | |
17 | ||
18 | export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd | |
19 | export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def | |
20 | export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule | |
21 | export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir | |
22 | ||
23 | include $(MakeInc_cmd) | |
24 | include $(MakeInc_def) | |
25 | ||
26 | # | |
27 | # XXX: CFLAGS | |
28 | # | |
29 | CFLAGS+= -DMACH_KERNEL_PRIVATE | |
30 | ||
31 | # | |
32 | # Directories for mig generated files | |
33 | # | |
34 | COMP_SUBDIRS = \ | |
35 | default_pager \ | |
36 | device \ | |
37 | mach_debug \ | |
38 | mach \ | |
39 | UserNotification | |
40 | ||
41 | COMP_SUBDIRS_I386 = \ | |
42 | mach | |
43 | ||
44 | # | |
45 | # Make sure we don't remove this by accident if interrupted at the wrong | |
46 | # time. | |
47 | # | |
48 | .PRECIOUS: Makefile | |
49 | ||
50 | VERSION_FILES= \ | |
51 | $(SOURCE_DIR)/$(COMPONENT)/conf/version.major \ | |
52 | $(SOURCE_DIR)/$(COMPONENT)/conf/version.minor \ | |
53 | $(SOURCE_DIR)/$(COMPONENT)/conf/version.variant | |
54 | ||
55 | COPYRIGHT_FILES = \ | |
56 | $(SOURCE_DIR)/$(COMPONENT)/conf/copyright.osf \ | |
57 | $(SOURCE_DIR)/$(COMPONENT)/conf/copyright.cmu | |
58 | ||
59 | # | |
60 | # Theses macros are filled in by the config program depending on the | |
61 | # current configuration. The MACHDEP macro is replaced by the | |
62 | # contents of the machine dependent makefile template and the others | |
63 | # are replaced by the corresponding symbol definitions for the | |
64 | # configuration. | |
65 | # | |
66 | ||
67 | %OBJS | |
68 | ||
69 | %CFILES | |
70 | ||
71 | %MFILES | |
72 | ||
73 | %SFILES | |
74 | ||
75 | %BFILES | |
76 | ||
77 | %ORDERED | |
78 | %MACHDEP | |
79 | ||
80 | # | |
81 | # OBJSDEPS is the set of files (defined in the machine dependent | |
82 | # template if necessary) which all objects depend on (such as an | |
83 | # in-line assembler expansion filter) | |
84 | # | |
85 | ${OBJS}: ${OBJSDEPS} | |
86 | ||
87 | ||
88 | %LOAD | |
89 | ||
90 | LDOBJS = $(OBJS) | |
91 | ||
92 | $(COMPONENT).o: $(LDOBJS) assym.s | |
93 | @echo "[ creating $(COMPONENT).o ]" | |
94 | $(RM) $(RMFLAGS) vers.c | |
95 | $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/newvers \ | |
96 | `$(CAT) ${VERSION_FILES}` ${COPYRIGHT_FILES} | |
97 | ${KCC} $(CFLAGS) $(INCLUDES) -c vers.c | |
98 | @echo [ updating $(COMPONENT).o ${OSFMK_KERNEL_CONFIG} ] | |
99 | $(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT).o ${LDOBJS} vers.o | |
100 | ||
101 | do_all: $(COMPONENT).o | |
102 | ||
103 | do_depend: do_all | |
104 | ${MD} -u Makedep -f -d `ls *.d`; | |
105 | ||
106 | do_build_all: do_depend | |
107 | ||
108 | # genassym.o actually is an assembly file, | |
109 | # we name it genassym.o to help with the automatic | |
110 | # dependency generation | |
111 | ||
112 | genassym.o: $(SOURCE_DIR)/$(COMPONENT)/$(arch_config)/genassym.c | |
113 | ${KCC} ${CFLAGS} -MD ${_HOST_EXTRA_CFLAGS} -S -o ${@} -c ${INCFLAGS} $< | |
114 | ||
115 | assym.s: genassym.o | |
116 | sed -e '/#DEFINITION#/!d' -e 's/^.*#DEFINITION#//' -e 's/\$$//' genassym.o > ${@} | |
117 | ||
118 | ${SOBJS}: assym.s | |
119 | ||
120 | ||
121 | %RULES | |
122 | ||
123 | -include Makedep | |
124 | ||
125 | include $(MakeInc_rule) | |
126 | include $(MakeInc_dir) | |
127 |