]> git.saurik.com Git - apple/xnu.git/blame - iokit/conf/Makefile.template
xnu-7195.101.1.tar.gz
[apple/xnu.git] / iokit / conf / Makefile.template
CommitLineData
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
8export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
9export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
10export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
11export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
12
13include $(MakeInc_cmd)
14include $(MakeInc_def)
15
16#
b0d623f7 17# XXX: CFLAGS
1c79356b 18#
6d2010ae 19CFLAGS+= -include meta_features.h -DDRIVER_PRIVATE \
cb323159 20 -DIOKIT_KERNEL_PRIVATE -DDRIVERKIT_PRIVATE=1 -DIOMATCHDEBUG=1 -DIOALLOCDEBUG=1
5ba3f43e 21SFLAGS+= -include meta_features.h
1c79356b
A
22#-DIOKITDEBUG=-1
23
55e303ae 24CFLAGS_RELEASE += -DIOASSERT=0
39236c6e 25CFLAGS_DEVELOPMENT += -DIOASSERT=1
55e303ae
A
26CFLAGS_DEBUG += -DIOASSERT=1
27
1c79356b 28#
cb323159 29# Directories for generated files
1c79356b 30#
cb323159
A
31COMP_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
66IODataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
67IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
68IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-cast-align
69IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
70IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
71IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
72# -Wno-cast-qual
73DINetBootHook.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
74IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
75IODMAController.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
76IODataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
77IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
78IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
79IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
80IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
81IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
82IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
83IOLocks.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
84IOMapper.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
85IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
86IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
87IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
88IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
89IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
90IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
91IOService.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
92IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
93IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
94IOSimpleReporter.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
95IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
96IOStateReporter.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
97IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
98IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
99RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
100# -Wno-missing-prototypes
101IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
102IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
103IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
104IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
105# -Wno-shadow
106IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
107IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
108IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
109IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
110IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
111IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
112IOService.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
113IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
114IOSharedDataQueue.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
115IOTimerEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
116IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
117TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
118Tests.cpo_CXXWARNFLAGS_ADD += -Wno-shadow
119# -Wno-shadow-field-in-constructor
120IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-shadow-field-in-constructor
121# -Wno-sign-conversion
122DINetBootHook.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
123IOBufferMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
124IOCPU.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
125IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
126IOCommandQueue.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
127IODMACommand.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
128IODMAEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
129IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
130IOFilterInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
131IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
132IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-sign-conversion
133IOHistogramReporter.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
134IOInterleavedMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
135IOInterruptAccounting.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
136IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
137IOInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
138IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
139IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
140IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
141IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
142IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
143IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
144IOPMPowerSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
145IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
146IOPlatformActions.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
147IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
148IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
149IORTC.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
150IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
151IOService.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
152IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
153IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
154IOStartIOKit.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
155IOStatistics.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
156IOStringFuncs.o_CFLAGS_ADD += -Wno-sign-conversion
157IOTimerEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
158IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
159IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
160IOWorkLoop.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
161RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
162TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
163# -Wno-unused-parameter
164IOBufferMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
165IOCatalogue.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
166IOCommandGate.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
167IODMACommand.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
168IODeviceTreeSupport.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
169IOFilterInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
170IOHibernateIO.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
171IOHibernateRestoreKernel.o_CFLAGS_ADD += -Wno-unused-parameter
172IOInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
173IOInterruptEventSource.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
174IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
175IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
176IOLib.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
177IOLocks.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
178IOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
179IOMultiMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
180IONVRAM.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
181IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
182IOPerfControl.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
183IOPlatformExpert.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
184IOPolledInterface.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
185IORTC.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
186IORegistryEntry.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
187IOReporter.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
188IOService.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
189IOServicePM.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
190IOSkywalkSupport.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
191IOStateReporter.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
192IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
193IOUserServer.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
194IOWatchDogTimer.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
195IOWorkLoop.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
196PassthruInterruptController.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
197RootDomainUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
198TestIOMemoryDescriptor.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
199Tests.cpo_CXXWARNFLAGS_ADD += -Wno-unused-parameter
200IODMACommand.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
233ifeq ($(RC_ProjectName),xnu_libraries)
234do_all: $(COMPONENT).libfilelist
235else
6d2010ae 236do_all: $(COMPONENT).filelist
a991bd8d 237endif
1c79356b 238
39236c6e 239do_build_all:: do_all
1c79356b
A
240
241%RULES
242
1c79356b 243include $(MakeInc_rule)
1c79356b 244include $(MakeInc_dir)