]> git.saurik.com Git - apple/xnu.git/blame - iokit/conf/Makefile.template
xnu-6153.61.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
6d2010ae
A
24CWARNFLAGS = $(CWARNFLAGS_STD) -Wno-unused-parameter
25CXXWARNFLAGS = $(CXXWARNFLAGS_STD) -Wno-unused-parameter -Wno-cast-qual -Wno-shadow
91447636 26
39236c6e
A
27# Objects that don't want -Wcast-align warning (8474835)
28IOHibernateRestoreKernel.o_CWARNFLAGS_ADD = -Wno-cast-align
29CXXOBJS_NO_CAST_ALIGN = \
30 IODMACommand.cpo \
31 IODataQueue.cpo \
32 IOHibernateIO.cpo \
33 IOMemoryDescriptor.cpo \
34 IONVRAM.cpo \
35 IOPMrootDomain.cpo \
36 IOSharedDataQueue.cpo \
37 IOUserClient.cpo
38
39$(foreach file,$(CXXOBJS_NO_CAST_ALIGN),$(eval $(call add_perfile_cxxflags,$(file),-Wno-cast-align)))
40
55e303ae 41CFLAGS_RELEASE += -DIOASSERT=0
39236c6e 42CFLAGS_DEVELOPMENT += -DIOASSERT=1
55e303ae
A
43CFLAGS_DEBUG += -DIOASSERT=1
44
39037602
A
45IOUserClient.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
46IOKitDebug.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
47IOKitBSDInit.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes -Wno-documentation
48IOPMrootDomain.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
49
1c79356b 50#
cb323159 51# Directories for generated files
1c79356b 52#
cb323159
A
53COMP_SUBDIRS = \
54 DriverKit
1c79356b
A
55
56#
57# Make sure we don't remove this by accident if interrupted at the wrong
58# time.
59#
60.PRECIOUS: Makefile
61
1c79356b
A
62#
63# Theses macros are filled in by the config program depending on the
64# current configuration. The MACHDEP macro is replaced by the
65# contents of the machine dependent makefile template and the others
66# are replaced by the corresponding symbol definitions for the
67# configuration.
68#
69
70%OBJS
71
72%CFILES
73
fe8ab488
A
74%CXXFILES
75
1c79356b
A
76%SFILES
77
1c79356b
A
78%MACHDEP
79
fe8ab488
A
80# Rebuild if per-file overrides change
81${OBJS}: $(firstword $(MAKEFILE_LIST))
82
83# Rebuild if global compile flags change
84$(COBJS): .CFLAGS
85.CFLAGS: ALWAYS
86 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
87$(CXXOBJS): .CXXFLAGS
88.CXXFLAGS: ALWAYS
89 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
90$(SOBJS): .SFLAGS
91.SFLAGS: ALWAYS
92 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
93
94$(COMPONENT).filelist: $(OBJS)
39236c6e 95 $(_v)for hib_file in ${HIB_FILES}; \
d1ecb069 96 do \
3e170ce0
A
97 $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} || exit 1; \
98 mv $${hib_file}__ $${hib_file} || exit 1; \
39236c6e 99 done
cb323159 100 $(call makelog,$(ColorL)LDFILELIST$(Color0) $(ColorLF)$(COMPONENT)$(Color0))
3e170ce0 101 $(_v)for obj in ${OBJS}; do \
cb323159 102 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
3e170ce0 103 done > $(COMPONENT).filelist
1c79356b 104
6d2010ae 105do_all: $(COMPONENT).filelist
1c79356b 106
39236c6e 107do_build_all:: do_all
1c79356b
A
108
109%RULES
110
1c79356b 111include $(MakeInc_rule)
1c79356b 112include $(MakeInc_dir)