]> git.saurik.com Git - apple/xnu.git/blame - iokit/conf/Makefile.template
xnu-4570.1.46.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 \
39236c6e 20 -DIOKIT_KERNEL_PRIVATE -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
A
50#
51# Directories for mig generated files
52#
39037602 53COMP_SUBDIRS =
1c79356b
A
54
55#
56# Make sure we don't remove this by accident if interrupted at the wrong
57# time.
58#
59.PRECIOUS: Makefile
60
1c79356b
A
61#
62# Theses macros are filled in by the config program depending on the
63# current configuration. The MACHDEP macro is replaced by the
64# contents of the machine dependent makefile template and the others
65# are replaced by the corresponding symbol definitions for the
66# configuration.
67#
68
69%OBJS
70
71%CFILES
72
fe8ab488
A
73%CXXFILES
74
1c79356b
A
75%SFILES
76
1c79356b
A
77%MACHDEP
78
fe8ab488
A
79# Rebuild if per-file overrides change
80${OBJS}: $(firstword $(MAKEFILE_LIST))
81
82# Rebuild if global compile flags change
83$(COBJS): .CFLAGS
84.CFLAGS: ALWAYS
85 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
86$(CXXOBJS): .CXXFLAGS
87.CXXFLAGS: ALWAYS
88 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
89$(SOBJS): .SFLAGS
90.SFLAGS: ALWAYS
91 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
92
93$(COMPONENT).filelist: $(OBJS)
39236c6e 94 $(_v)for hib_file in ${HIB_FILES}; \
d1ecb069 95 do \
3e170ce0
A
96 $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} || exit 1; \
97 mv $${hib_file}__ $${hib_file} || exit 1; \
39236c6e 98 done
39037602 99 @echo "$(ColorL)LDFILELIST$(Color0) $(ColorLF)$(COMPONENT)$(Color0)"
3e170ce0 100 $(_v)for obj in ${OBJS}; do \
39236c6e 101 echo $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
3e170ce0 102 done > $(COMPONENT).filelist
1c79356b 103
6d2010ae 104do_all: $(COMPONENT).filelist
1c79356b 105
39236c6e 106do_build_all:: do_all
1c79356b
A
107
108%RULES
109
1c79356b 110include $(MakeInc_rule)
1c79356b 111include $(MakeInc_dir)