]> git.saurik.com Git - apple/xnu.git/blame_incremental - libkern/conf/Makefile.template
xnu-7195.101.1.tar.gz
[apple/xnu.git] / libkern / conf / Makefile.template
... / ...
CommitLineData
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
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#
17# CFLAGS
18#
19CFLAGS+= -include meta_features.h -DLIBKERN_KERNEL_PRIVATE -DOSALLOCDEBUG=1
20SFLAGS+= -include meta_features.h
21
22# Runtime support functions don't interact well with LTO (9294679)
23stack_protector.o_CFLAGS_ADD += $(CFLAGS_NOLTO_FLAG)
24
25#
26# Directories for mig generated files
27#
28COMP_SUBDIRS =
29
30#
31# Make sure we don't remove this by accident if interrupted at the wrong
32# time.
33#
34.PRECIOUS: Makefile
35
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%LIBOBJS
47
48%CFILES
49
50%CXXFILES
51
52%SFILES
53
54%MACHDEP
55
56#
57# Machine-independent per-file flags
58#
59
60#
61# Diagnostic opt-outs. We need to make this list empty.
62#
63# DO NOT ADD MORE HERE.
64#
65# -Wno-cast-align
66OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
67OSKextLib.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
68OSMetaClass.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
69OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-cast-align
70corecrypto_md5.o_CFLAGS_ADD += -Wno-cast-align
71corecrypto_sha1.o_CFLAGS_ADD += -Wno-cast-align
72# -Wno-cast-qual
73OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
74compress.o_CFLAGS_ADD += -Wno-cast-qual
75deflate.o_CFLAGS_ADD += -Wno-cast-qual
76runtime.cpo_CXXWARNFLAGS_ADD += -Wno-cast-qual
77trees.o_CFLAGS_ADD += -Wno-cast-qual
78uncompr.o_CFLAGS_ADD += -Wno-cast-qual
79# -Wno-implicit-int-conversion
80OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-implicit-int-conversion
81OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-implicit-int-conversion
82kxld_sym.o_CFLAGS_ADD += -Wno-implicit-int-conversion
83log.o_CFLAGS_ADD += -Wno-implicit-int-conversion
84scanf.o_CFLAGS_ADD += -Wno-implicit-int-conversion
85# -Wno-missing-prototypes
86OSRuntime.cpo_CXXWARNFLAGS_ADD += -Wno-missing-prototypes
87# -Wno-shorten-64-to-32
88OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32
89OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32
90OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-shorten-64-to-32
91log.o_CFLAGS_ADD += -Wno-shorten-64-to-32
92scanf.o_CFLAGS_ADD += -Wno-shorten-64-to-32
93# -Wno-sign-conversion
94OSCollection.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
95OSData.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
96OSDebug.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
97OSKext.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
98OSKextVersion.o_CFLAGS_ADD += -Wno-sign-conversion
99OSMetaClass.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
100OSNumber.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
101OSObject.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
102OSRuntime.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
103OSSerializeBinary.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
104OSSet.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
105OSString.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
106OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
107OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-sign-conversion
108adler32.o_CFLAGS_ADD += -Wno-sign-conversion
109corecrypto_aes.o_CFLAGS_ADD += -Wno-sign-conversion
110corecrypto_aesxts.o_CFLAGS_ADD += -Wno-sign-conversion
111deflate.o_CFLAGS_ADD += -Wno-sign-conversion
112inet_aton.o_CFLAGS_ADD += -Wno-sign-conversion
113infback.o_CFLAGS_ADD += -Wno-sign-conversion
114inflate.o_CFLAGS_ADD += -Wno-sign-conversion
115kxld_array.o_CFLAGS_ADD += -Wno-sign-conversion
116kxld_copyright.o_CFLAGS_ADD += -Wno-sign-conversion
117kxld_dict.o_CFLAGS_ADD += -Wno-sign-conversion
118kxld_object.o_CFLAGS_ADD += -Wno-sign-conversion
119kxld_reloc.o_CFLAGS_ADD += -Wno-sign-conversion
120kxld_sym.o_CFLAGS_ADD += -Wno-sign-conversion
121kxld_symtab.o_CFLAGS_ADD += -Wno-sign-conversion
122kxld_util.o_CFLAGS_ADD += -Wno-sign-conversion
123log.o_CFLAGS_ADD += -Wno-sign-conversion
124refcnt.o_CFLAGS_ADD += -Wno-sign-conversion
125scanf.o_CFLAGS_ADD += -Wno-sign-conversion
126trees.o_CFLAGS_ADD += -Wno-sign-conversion
127uuid.o_CFLAGS_ADD += -Wno-sign-conversion
128# -Wno-unreachable-code
129OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code
130OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code
131OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code-break
132OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-unreachable-code-break
133# -Wno-zero-as-null-pointer-constant
134OSUnserialize.cpo_CXXWARNFLAGS_ADD += -Wno-zero-as-null-pointer-constant
135OSUnserializeXML.cpo_CXXWARNFLAGS_ADD += -Wno-zero-as-null-pointer-constant
136
137# Rebuild if per-file overrides change
138${OBJS}: $(firstword $(MAKEFILE_LIST))
139
140# Rebuild if global compile flags change
141$(COBJS): .CFLAGS
142.CFLAGS: ALWAYS
143 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
144$(CXXOBJS): .CXXFLAGS
145.CXXFLAGS: ALWAYS
146 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
147$(SOBJS): .SFLAGS
148.SFLAGS: ALWAYS
149 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
150
151$(COMPONENT).filelist: $(OBJS)
152 $(_v)for hib_file in ${HIB_FILES}; \
153 do \
154 $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} || exit 1; \
155 mv $${hib_file}__ $${hib_file} || exit 1; \
156 done
157 @$(LOG_LDFILELIST) "$(COMPONENT)"
158 $(_v)for obj in ${OBJS}; do \
159 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
160 done > $(COMPONENT).filelist
161
162$(COMPONENT).libfilelist: $(LIBOBJS)
163 @$(LOG_LDFILELIST) "lib$(COMPONENT)"
164 $(_v)for obj in ${LIBOBJS}; do \
165 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
166 done > $(COMPONENT).libfilelist
167
168ifeq ($(RC_ProjectName),xnu_libraries)
169do_all: $(COMPONENT).libfilelist
170else
171do_all: $(COMPONENT).filelist
172endif
173
174do_build_all:: do_all
175
176%RULES
177
178include $(MakeInc_rule)
179include $(MakeInc_dir)