]>
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 | ||
1c79356b A |
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 | # | |
b0d623f7 | 17 | # XXX: CFLAGS |
1c79356b | 18 | # |
6d2010ae | 19 | CFLAGS+= -include meta_features.h -DDRIVER_PRIVATE \ |
cb323159 | 20 | -DIOKIT_KERNEL_PRIVATE -DDRIVERKIT_PRIVATE=1 -DIOMATCHDEBUG=1 -DIOALLOCDEBUG=1 |
5ba3f43e | 21 | SFLAGS+= -include meta_features.h |
1c79356b A |
22 | #-DIOKITDEBUG=-1 |
23 | ||
55e303ae | 24 | CFLAGS_RELEASE += -DIOASSERT=0 |
39236c6e | 25 | CFLAGS_DEVELOPMENT += -DIOASSERT=1 |
55e303ae A |
26 | CFLAGS_DEBUG += -DIOASSERT=1 |
27 | ||
1c79356b | 28 | # |
cb323159 | 29 | # Directories for generated files |
1c79356b | 30 | # |
cb323159 A |
31 | COMP_SUBDIRS = \ |
32 | DriverKit | |
1c79356b A |
33 | |
34 | # | |
35 | # Make sure we don't remove this by accident if interrupted at the wrong | |
36 | # time. | |
37 | # | |
38 | .PRECIOUS: Makefile | |
39 | ||
1c79356b A |
40 | # |
41 | # Theses macros are filled in by the config program depending on the | |
42 | # current configuration. The MACHDEP macro is replaced by the | |
43 | # contents of the machine dependent makefile template and the others | |
44 | # are replaced by the corresponding symbol definitions for the | |
45 | # configuration. | |
46 | # | |
47 | ||
48 | %OBJS | |
49 | ||
a991bd8d A |
50 | %LIBOBJS |
51 | ||
1c79356b A |
52 | %CFILES |
53 | ||
fe8ab488 A |
54 | %CXXFILES |
55 | ||
1c79356b A |
56 | %SFILES |
57 | ||
1c79356b A |
58 | %MACHDEP |
59 | ||
f427ee49 A |
60 | # |
61 | # Diagnostic opt-outs. We need to make this list empty. | |
62 | # | |
63 | # DO NOT ADD MORE HERE. | |
64 | # | |
65 | # -Wno-cast-align | |
66 | IODataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
67 | IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
68 | IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-cast-align | |
69 | IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
70 | IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
71 | IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align | |
72 | # -Wno-cast-qual | |
73 | DINetBootHook.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
74 | IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
75 | IODMAController.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
76 | IODataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
77 | IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
78 | IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
79 | IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
80 | IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
81 | IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
82 | IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
83 | IOLocks.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
84 | IOMapper.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
85 | IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
86 | IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
87 | IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
88 | IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
89 | IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
90 | IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
91 | IOService.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
92 | IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
93 | IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
94 | IOSimpleReporter.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
95 | IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
96 | IOStateReporter.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
97 | IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
98 | IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
99 | RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual | |
100 | # -Wno-missing-prototypes | |
101 | IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes | |
102 | IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes | |
103 | IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes | |
104 | IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes | |
105 | # -Wno-shadow | |
106 | IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
107 | IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
108 | IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
109 | IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
110 | IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
111 | IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
112 | IOService.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
113 | IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
114 | IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
115 | IOTimerEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
116 | IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
117 | TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
118 | Tests.cpo_CXXWARNFLAGS_ADD += -Wno-shadow | |
119 | # -Wno-shadow-field-in-constructor | |
120 | IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-shadow-field-in-constructor | |
121 | # -Wno-sign-conversion | |
122 | DINetBootHook.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
123 | IOBufferMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
124 | IOCPU.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
125 | IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
126 | IOCommandQueue.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
127 | IODMACommand.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
128 | IODMAEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
129 | IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
130 | IOFilterInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
131 | IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
132 | IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-sign-conversion | |
133 | IOHistogramReporter.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
134 | IOInterleavedMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
135 | IOInterruptAccounting.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
136 | IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
137 | IOInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
138 | IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
139 | IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
140 | IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
141 | IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
142 | IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
143 | IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
144 | IOPMPowerSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
145 | IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
146 | IOPlatformActions.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
147 | IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
148 | IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
149 | IORTC.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
150 | IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
151 | IOService.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
152 | IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
153 | IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
154 | IOStartIOKit.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
155 | IOStatistics.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
156 | IOStringFuncs.o_CFLAGS_ADD += -Wno-sign-conversion | |
157 | IOTimerEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
158 | IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
159 | IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
160 | IOWorkLoop.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
161 | RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
162 | TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion | |
163 | # -Wno-unused-parameter | |
164 | IOBufferMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
165 | IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
166 | IOCommandGate.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
167 | IODMACommand.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
168 | IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
169 | IOFilterInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
170 | IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
171 | IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-unused-parameter | |
172 | IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
173 | IOInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
174 | IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
175 | IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
176 | IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
177 | IOLocks.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
178 | IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
179 | IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
180 | IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
181 | IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
182 | IOPerfControl.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
183 | IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
184 | IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
185 | IORTC.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
186 | IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
187 | IOReporter.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
188 | IOService.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
189 | IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
190 | IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
191 | IOStateReporter.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
192 | IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
193 | IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
194 | IOWatchDogTimer.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
195 | IOWorkLoop.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
196 | PassthruInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
197 | RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
198 | TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
199 | Tests.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter | |
200 | IODMACommand.iig.cpo_CXXWARNFLAGS_ADD += -Wno-duplicate-decl-specifier | |
201 | ||
fe8ab488 A |
202 | # Rebuild if per-file overrides change |
203 | ${OBJS}: $(firstword $(MAKEFILE_LIST)) | |
204 | ||
205 | # Rebuild if global compile flags change | |
206 | $(COBJS): .CFLAGS | |
207 | .CFLAGS: ALWAYS | |
208 | $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS) | |
209 | $(CXXOBJS): .CXXFLAGS | |
210 | .CXXFLAGS: ALWAYS | |
211 | $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS) | |
212 | $(SOBJS): .SFLAGS | |
213 | .SFLAGS: ALWAYS | |
214 | $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS) | |
215 | ||
216 | $(COMPONENT).filelist: $(OBJS) | |
39236c6e | 217 | $(_v)for hib_file in ${HIB_FILES}; \ |
d1ecb069 | 218 | do \ |
3e170ce0 A |
219 | $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} || exit 1; \ |
220 | mv $${hib_file}__ $${hib_file} || exit 1; \ | |
39236c6e | 221 | done |
f427ee49 | 222 | @$(LOG_LDFILELIST) "$(COMPONENT)" |
3e170ce0 | 223 | $(_v)for obj in ${OBJS}; do \ |
cb323159 | 224 | $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ |
3e170ce0 | 225 | done > $(COMPONENT).filelist |
1c79356b | 226 | |
a991bd8d A |
227 | $(COMPONENT).libfilelist: $(LIBOBJS) |
228 | @$(LOG_LDFILELIST) "lib$(COMPONENT)" | |
229 | $(_v)for obj in ${LIBOBJS}; do \ | |
230 | $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ | |
231 | done > $(COMPONENT).libfilelist | |
232 | ||
233 | ifeq ($(RC_ProjectName),xnu_libraries) | |
234 | do_all: $(COMPONENT).libfilelist | |
235 | else | |
6d2010ae | 236 | do_all: $(COMPONENT).filelist |
a991bd8d | 237 | endif |
1c79356b | 238 | |
39236c6e | 239 | do_build_all:: do_all |
1c79356b A |
240 | |
241 | %RULES | |
242 | ||
1c79356b | 243 | include $(MakeInc_rule) |
1c79356b | 244 | include $(MakeInc_dir) |