]> git.saurik.com Git - apple/xnu.git/blob - iokit/conf/Makefile.template
xnu-7195.60.75.tar.gz
[apple/xnu.git] / iokit / conf / Makefile.template
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 # XXX: CFLAGS
18 #
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
22 #-DIOKITDEBUG=-1
23
24 CFLAGS_RELEASE += -DIOASSERT=0
25 CFLAGS_DEVELOPMENT += -DIOASSERT=1
26 CFLAGS_DEBUG += -DIOASSERT=1
27
28 #
29 # Directories for generated files
30 #
31 COMP_SUBDIRS = \
32 DriverKit
33
34 #
35 # Make sure we don't remove this by accident if interrupted at the wrong
36 # time.
37 #
38 .PRECIOUS: Makefile
39
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
50 %CFILES
51
52 %CXXFILES
53
54 %SFILES
55
56 %MACHDEP
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 IODataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
65 IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
66 IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-cast-align
67 IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
68 IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
69 IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
70 # -Wno-cast-qual
71 DINetBootHook.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
72 IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
73 IODMAController.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
74 IODataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
75 IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
76 IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
77 IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
78 IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
79 IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
80 IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
81 IOLocks.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
82 IOMapper.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
83 IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
84 IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
85 IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
86 IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
87 IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
88 IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
89 IOService.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
90 IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
91 IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
92 IOSimpleReporter.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
93 IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
94 IOStateReporter.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
95 IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
96 IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
97 RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
98 # -Wno-missing-prototypes
99 IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
100 IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
101 IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
102 IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
103 # -Wno-shadow
104 IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
105 IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
106 IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
107 IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
108 IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
109 IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
110 IOService.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
111 IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
112 IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
113 IOTimerEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
114 IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
115 TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
116 Tests.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
117 # -Wno-shadow-field-in-constructor
118 IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-shadow-field-in-constructor
119 # -Wno-sign-conversion
120 DINetBootHook.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
121 IOBufferMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
122 IOCPU.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
123 IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
124 IOCommandQueue.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
125 IODMACommand.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
126 IODMAEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
127 IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
128 IOFilterInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
129 IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
130 IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-sign-conversion
131 IOHistogramReporter.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
132 IOInterleavedMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
133 IOInterruptAccounting.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
134 IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
135 IOInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
136 IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
137 IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
138 IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
139 IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
140 IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
141 IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
142 IOPMPowerSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
143 IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
144 IOPlatformActions.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
145 IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
146 IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
147 IORTC.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
148 IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
149 IOService.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
150 IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
151 IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
152 IOStartIOKit.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
153 IOStatistics.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
154 IOStringFuncs.o_CFLAGS_ADD += -Wno-sign-conversion
155 IOTimerEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
156 IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
157 IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
158 IOWorkLoop.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
159 RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
160 TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
161 # -Wno-unused-parameter
162 IOBufferMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
163 IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
164 IOCommandGate.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
165 IODMACommand.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
166 IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
167 IOFilterInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
168 IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
169 IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-unused-parameter
170 IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
171 IOInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
172 IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
173 IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
174 IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
175 IOLocks.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
176 IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
177 IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
178 IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
179 IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
180 IOPerfControl.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
181 IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
182 IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
183 IORTC.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
184 IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
185 IOReporter.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
186 IOService.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
187 IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
188 IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
189 IOStateReporter.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
190 IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
191 IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
192 IOWatchDogTimer.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
193 IOWorkLoop.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
194 PassthruInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
195 RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
196 TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
197 Tests.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
198 IODMACommand.iig.cpo_CXXWARNFLAGS_ADD += -Wno-duplicate-decl-specifier
199
200 # Rebuild if per-file overrides change
201 ${OBJS}: $(firstword $(MAKEFILE_LIST))
202
203 # Rebuild if global compile flags change
204 $(COBJS): .CFLAGS
205 .CFLAGS: ALWAYS
206 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
207 $(CXXOBJS): .CXXFLAGS
208 .CXXFLAGS: ALWAYS
209 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
210 $(SOBJS): .SFLAGS
211 .SFLAGS: ALWAYS
212 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
213
214 $(COMPONENT).filelist: $(OBJS)
215 $(_v)for hib_file in ${HIB_FILES}; \
216 do \
217 $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} || exit 1; \
218 mv $${hib_file}__ $${hib_file} || exit 1; \
219 done
220 @$(LOG_LDFILELIST) "$(COMPONENT)"
221 $(_v)for obj in ${OBJS}; do \
222 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
223 done > $(COMPONENT).filelist
224
225 do_all: $(COMPONENT).filelist
226
227 do_build_all:: do_all
228
229 %RULES
230
231 include $(MakeInc_rule)
232 include $(MakeInc_dir)