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.
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
13 include $(MakeInc_cmd)
14 include $(MakeInc_def)
19 CFLAGS+= -include meta_features.h -DDRIVER_PRIVATE \
20 -DIOKIT_KERNEL_PRIVATE -DDRIVERKIT_PRIVATE=1 -DIOMATCHDEBUG=1 -DIOALLOCDEBUG=1
21 SFLAGS+= -include meta_features.h
24 CFLAGS_RELEASE += -DIOASSERT=0
25 CFLAGS_DEVELOPMENT += -DIOASSERT=1
26 CFLAGS_DEBUG += -DIOASSERT=1
29 # Directories for generated files
35 # Make sure we don't remove this by accident if interrupted at the wrong
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
61 # Diagnostic opt-outs. We need to make this list empty.
63 # DO NOT ADD MORE HERE.
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
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
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
202 # Rebuild if per-file overrides change
203 ${OBJS}: $(firstword $(MAKEFILE_LIST))
205 # Rebuild if global compile flags change
208 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
209 $(CXXOBJS): .CXXFLAGS
211 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
214 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
216 $(COMPONENT).filelist: $(OBJS)
217 $(_v)for hib_file in ${HIB_FILES}; \
219 $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} || exit 1; \
220 mv $${hib_file}__ $${hib_file} || exit 1; \
222 @$(LOG_LDFILELIST) "$(COMPONENT)"
223 $(_v)for obj in ${OBJS}; do \
224 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
225 done > $(COMPONENT).filelist
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
233 ifeq ($(RC_ProjectName),xnu_libraries)
234 do_all: $(COMPONENT).libfilelist
236 do_all: $(COMPONENT).filelist
239 do_build_all:: do_all
243 include $(MakeInc_rule)
244 include $(MakeInc_dir)