]> git.saurik.com Git - apple/xnu.git/blame - libkern/conf/Makefile.template
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / libkern / 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# CFLAGS
1c79356b 18#
39236c6e 19CFLAGS+= -include meta_features.h -DLIBKERN_KERNEL_PRIVATE -DOSALLOCDEBUG=1
5ba3f43e 20SFLAGS+= -include meta_features.h
39236c6e 21
316670eb
A
22# Runtime support functions don't interact well with LTO (9294679)
23stack_protector.o_CFLAGS_ADD += $(CFLAGS_NOLTO_FLAG)
24
1c79356b
A
25#
26# Directories for mig generated files
27#
39037602 28COMP_SUBDIRS =
1c79356b
A
29
30#
31# Make sure we don't remove this by accident if interrupted at the wrong
32# time.
33#
34.PRECIOUS: Makefile
35
1c79356b
A
36#
37# Theses macros are filled in by the config program depending on the
38# current configuration. The MACHDEP macro is replaced by the
39# contents of the machine dependent makefile template and the others
40# are replaced by the corresponding symbol definitions for the
41# configuration.
42#
43
44%OBJS
45
46%CFILES
47
fe8ab488
A
48%CXXFILES
49
1c79356b
A
50%SFILES
51
1c79356b
A
52%MACHDEP
53
f427ee49
A
54#
55# Machine-independent per-file flags
56#
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
64OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
65OSKextLib.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
66OSMetaClass.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
67OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
68corecrypto_md5.o_CFLAGS_ADD += -Wno-cast-align
69corecrypto_sha1.o_CFLAGS_ADD += -Wno-cast-align
70# -Wno-cast-qual
71OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
72compress.o_CFLAGS_ADD += -Wno-cast-qual
73deflate.o_CFLAGS_ADD += -Wno-cast-qual
74runtime.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
75trees.o_CFLAGS_ADD += -Wno-cast-qual
76uncompr.o_CFLAGS_ADD += -Wno-cast-qual
77# -Wno-implicit-int-conversion
78OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-implicit-int-conversion
79OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-implicit-int-conversion
80kxld_sym.o_CFLAGS_ADD += -Wno-implicit-int-conversion
81log.o_CFLAGS_ADD += -Wno-implicit-int-conversion
82scanf.o_CFLAGS_ADD += -Wno-implicit-int-conversion
83# -Wno-missing-prototypes
84OSRuntime.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
85# -Wno-shorten-64-to-32
86OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32
87OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32
88OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32
89log.o_CFLAGS_ADD += -Wno-shorten-64-to-32
90scanf.o_CFLAGS_ADD += -Wno-shorten-64-to-32
91# -Wno-sign-conversion
92OSCollection.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
93OSData.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
94OSDebug.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
95OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
96OSKextVersion.o_CFLAGS_ADD += -Wno-sign-conversion
97OSMetaClass.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
98OSNumber.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
99OSObject.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
100OSRuntime.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
101OSSerializeBinary.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
102OSSet.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
103OSString.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
104OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
105OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
106adler32.o_CFLAGS_ADD += -Wno-sign-conversion
107corecrypto_aes.o_CFLAGS_ADD += -Wno-sign-conversion
108corecrypto_aesxts.o_CFLAGS_ADD += -Wno-sign-conversion
109deflate.o_CFLAGS_ADD += -Wno-sign-conversion
110inet_aton.o_CFLAGS_ADD += -Wno-sign-conversion
111infback.o_CFLAGS_ADD += -Wno-sign-conversion
112inflate.o_CFLAGS_ADD += -Wno-sign-conversion
113kxld_array.o_CFLAGS_ADD += -Wno-sign-conversion
114kxld_copyright.o_CFLAGS_ADD += -Wno-sign-conversion
115kxld_dict.o_CFLAGS_ADD += -Wno-sign-conversion
116kxld_object.o_CFLAGS_ADD += -Wno-sign-conversion
117kxld_reloc.o_CFLAGS_ADD += -Wno-sign-conversion
118kxld_sym.o_CFLAGS_ADD += -Wno-sign-conversion
119kxld_symtab.o_CFLAGS_ADD += -Wno-sign-conversion
120kxld_util.o_CFLAGS_ADD += -Wno-sign-conversion
121log.o_CFLAGS_ADD += -Wno-sign-conversion
122refcnt.o_CFLAGS_ADD += -Wno-sign-conversion
123scanf.o_CFLAGS_ADD += -Wno-sign-conversion
124trees.o_CFLAGS_ADD += -Wno-sign-conversion
125uuid.o_CFLAGS_ADD += -Wno-sign-conversion
126# -Wno-unreachable-code
127OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code
128OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code
129OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code-break
130OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code-break
131# -Wno-zero-as-null-pointer-constant
132OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-zero-as-null-pointer-constant
133OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-zero-as-null-pointer-constant
134
fe8ab488
A
135# Rebuild if per-file overrides change
136${OBJS}: $(firstword $(MAKEFILE_LIST))
137
138# Rebuild if global compile flags change
139$(COBJS): .CFLAGS
140.CFLAGS: ALWAYS
141 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
142$(CXXOBJS): .CXXFLAGS
143.CXXFLAGS: ALWAYS
144 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
145$(SOBJS): .SFLAGS
146.SFLAGS: ALWAYS
147 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
148
149$(COMPONENT).filelist: $(OBJS)
39236c6e 150 $(_v)for hib_file in ${HIB_FILES}; \
6d2010ae 151 do \
3e170ce0
A
152 $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} || exit 1; \
153 mv $${hib_file}__ $${hib_file} || exit 1; \
39236c6e 154 done
f427ee49 155 @$(LOG_LDFILELIST) "$(COMPONENT)"
3e170ce0 156 $(_v)for obj in ${OBJS}; do \
cb323159 157 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
3e170ce0 158 done > $(COMPONENT).filelist
1c79356b 159
6d2010ae 160do_all: $(COMPONENT).filelist
1c79356b 161
39236c6e 162do_build_all:: do_all
1c79356b
A
163
164%RULES
165
1c79356b 166include $(MakeInc_rule)
1c79356b 167include $(MakeInc_dir)