]>
Commit | Line | Data |
---|---|---|
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 | export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd | |
9 | export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def | |
10 | export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule | |
11 | export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir | |
12 | ||
13 | include $(MakeInc_cmd) | |
14 | include $(MakeInc_def) | |
15 | ||
16 | # | |
17 | # CFLAGS | |
18 | # | |
19 | CFLAGS+= -include meta_features.h -DLIBKERN_KERNEL_PRIVATE -DOSALLOCDEBUG=1 | |
20 | SFLAGS+= -include meta_features.h | |
21 | ||
22 | # Runtime support functions don't interact well with LTO (9294679) | |
23 | stack_protector.o_CFLAGS_ADD += $(CFLAGS_NOLTO_FLAG) | |
24 | ||
25 | # | |
26 | # Directories for mig generated files | |
27 | # | |
28 | COMP_SUBDIRS = | |
29 | ||
30 | # | |
31 | # Make sure we don't remove this by accident if interrupted at the wrong | |
32 | # time. | |
33 | # | |
34 | .PRECIOUS: Makefile | |
35 | ||
36 | # | |
37 | # Theses macros are filled in by the config program depending on the | |
38 | # current configuration. The MACHDEP macro is replaced by the | |
39 | # contents of the machine dependent makefile template and the others | |
40 | # are replaced by the corresponding symbol definitions for the | |
41 | # configuration. | |
42 | # | |
43 | ||
44 | %OBJS | |
45 | ||
46 | %CFILES | |
47 | ||
48 | %CXXFILES | |
49 | ||
50 | %SFILES | |
51 | ||
52 | %MACHDEP | |
53 | ||
54 | # | |
55 | # Machine-independent per-file flags | |
56 | # | |
57 | ||
58 | # | |
59 | # Diagnostic opt-outs. We need to make this list empty. | |
60 | # | |
61 | # DO NOT ADD MORE HERE. | |
62 | # | |
63 | # -Wno-cast-align | |
64 | OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
65 | OSKextLib.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
66 | OSMetaClass.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
67 | OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
68 | corecrypto_md5.o_CFLAGS_ADD += -Wno-cast-align | |
69 | corecrypto_sha1.o_CFLAGS_ADD += -Wno-cast-align | |
70 | # -Wno-cast-qual | |
71 | OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
72 | compress.o_CFLAGS_ADD += -Wno-cast-qual | |
73 | deflate.o_CFLAGS_ADD += -Wno-cast-qual | |
74 | runtime.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
75 | trees.o_CFLAGS_ADD += -Wno-cast-qual | |
76 | uncompr.o_CFLAGS_ADD += -Wno-cast-qual | |
77 | # -Wno-implicit-int-conversion | |
78 | OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-implicit-int-conversion | |
79 | OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-implicit-int-conversion | |
80 | kxld_sym.o_CFLAGS_ADD += -Wno-implicit-int-conversion | |
81 | log.o_CFLAGS_ADD += -Wno-implicit-int-conversion | |
82 | scanf.o_CFLAGS_ADD += -Wno-implicit-int-conversion | |
83 | # -Wno-missing-prototypes | |
84 | OSRuntime.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes | |
85 | # -Wno-shorten-64-to-32 | |
86 | OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32 | |
87 | OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32 | |
88 | OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32 | |
89 | log.o_CFLAGS_ADD += -Wno-shorten-64-to-32 | |
90 | scanf.o_CFLAGS_ADD += -Wno-shorten-64-to-32 | |
91 | # -Wno-sign-conversion | |
92 | OSCollection.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
93 | OSData.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
94 | OSDebug.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
95 | OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
96 | OSKextVersion.o_CFLAGS_ADD += -Wno-sign-conversion | |
97 | OSMetaClass.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
98 | OSNumber.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
99 | OSObject.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
100 | OSRuntime.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
101 | OSSerializeBinary.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
102 | OSSet.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
103 | OSString.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
104 | OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
105 | OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
106 | adler32.o_CFLAGS_ADD += -Wno-sign-conversion | |
107 | corecrypto_aes.o_CFLAGS_ADD += -Wno-sign-conversion | |
108 | corecrypto_aesxts.o_CFLAGS_ADD += -Wno-sign-conversion | |
109 | deflate.o_CFLAGS_ADD += -Wno-sign-conversion | |
110 | inet_aton.o_CFLAGS_ADD += -Wno-sign-conversion | |
111 | infback.o_CFLAGS_ADD += -Wno-sign-conversion | |
112 | inflate.o_CFLAGS_ADD += -Wno-sign-conversion | |
113 | kxld_array.o_CFLAGS_ADD += -Wno-sign-conversion | |
114 | kxld_copyright.o_CFLAGS_ADD += -Wno-sign-conversion | |
115 | kxld_dict.o_CFLAGS_ADD += -Wno-sign-conversion | |
116 | kxld_object.o_CFLAGS_ADD += -Wno-sign-conversion | |
117 | kxld_reloc.o_CFLAGS_ADD += -Wno-sign-conversion | |
118 | kxld_sym.o_CFLAGS_ADD += -Wno-sign-conversion | |
119 | kxld_symtab.o_CFLAGS_ADD += -Wno-sign-conversion | |
120 | kxld_util.o_CFLAGS_ADD += -Wno-sign-conversion | |
121 | log.o_CFLAGS_ADD += -Wno-sign-conversion | |
122 | refcnt.o_CFLAGS_ADD += -Wno-sign-conversion | |
123 | scanf.o_CFLAGS_ADD += -Wno-sign-conversion | |
124 | trees.o_CFLAGS_ADD += -Wno-sign-conversion | |
125 | uuid.o_CFLAGS_ADD += -Wno-sign-conversion | |
126 | # -Wno-unreachable-code | |
127 | OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code | |
128 | OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code | |
129 | OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code-break | |
130 | OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code-break | |
131 | # -Wno-zero-as-null-pointer-constant | |
132 | OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-zero-as-null-pointer-constant | |
133 | OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-zero-as-null-pointer-constant | |
134 | ||
135 | # Rebuild if per-file overrides change | |
136 | ${OBJS}: $(firstword $(MAKEFILE_LIST)) | |
137 | ||
138 | # Rebuild if global compile flags change | |
139 | $(COBJS): .CFLAGS | |
140 | .CFLAGS: ALWAYS | |
141 | $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS) | |
142 | $(CXXOBJS): .CXXFLAGS | |
143 | .CXXFLAGS: ALWAYS | |
144 | $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS) | |
145 | $(SOBJS): .SFLAGS | |
146 | .SFLAGS: ALWAYS | |
147 | $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS) | |
148 | ||
149 | $(COMPONENT).filelist: $(OBJS) | |
150 | $(_v)for hib_file in ${HIB_FILES}; \ | |
151 | do \ | |
152 | $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} || exit 1; \ | |
153 | mv $${hib_file}__ $${hib_file} || exit 1; \ | |
154 | done | |
155 | @$(LOG_LDFILELIST) "$(COMPONENT)" | |
156 | $(_v)for obj in ${OBJS}; do \ | |
157 | $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ | |
158 | done > $(COMPONENT).filelist | |
159 | ||
160 | do_all: $(COMPONENT).filelist | |
161 | ||
162 | do_build_all:: do_all | |
163 | ||
164 | %RULES | |
165 | ||
166 | include $(MakeInc_rule) | |
167 | include $(MakeInc_dir) |