]> git.saurik.com Git - apple/xnu.git/blame - bsd/conf/Makefile.template
xnu-1699.22.73.tar.gz
[apple/xnu.git] / bsd / conf / Makefile.template
CommitLineData
91447636 1#
5d5c5d0d 2# Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
91447636 3#
6601e61a 4# @APPLE_LICENSE_HEADER_START@
91447636 5#
8f6c56a5
A
6# The contents of this file constitute Original Code as defined in and
7# are subject to the Apple Public Source License Version 1.1 (the
8# "License"). You may not use this file except in compliance with the
9# License. Please obtain a copy of the License at
10# http://www.apple.com/publicsource and read it before using this file.
11#
12# This Original Code and all software distributed under the License are
13# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17# License for the specific language governing rights and limitations
18# under the License.
19#
6601e61a 20# @APPLE_LICENSE_HEADER_END@
91447636
A
21#
22
1c79356b
A
23#
24# Mach Operating System
25# Copyright (c) 1986 Carnegie-Mellon University
26# All rights reserved. The CMU software License Agreement specifies
27# the terms and conditions for use and redistribution.
28#
29
30#
31# Export IDENT for sub-makefiles
32#
33export IDENT
34
1c79356b
A
35export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
36export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
37export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
38export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
39
40include $(MakeInc_cmd)
41include $(MakeInc_def)
42
43#
44# XXX: CFLAGS
45#
6d2010ae 46CFLAGS+= -include meta_features.h -DARCH_PRIVATE -DDRIVER_PRIVATE \
9bccf70c 47 -D_KERNEL_BUILD -DKERNEL_BUILD -DMACH_KERNEL -DBSD_BUILD \
b0d623f7 48 -DBSD_KERNEL_PRIVATE -DLP64KERN=1 -DLP64_DEBUG=0 -I. $(CFLAGS_INLINE_CONFIG)
0b4e3aa0 49
6d2010ae
A
50dp_backing_file.o_CFLAGS_ADD += -Wshorten-64-to-32
51ubc_subr.o_CFLAGS_ADD += -Wshorten-64-to-32
52vnode_pager.o_CFLAGS_ADD += -Wshorten-64-to-32
53vm_unix.o_CFLAGS_ADD += -Wshorten-64-to-32
54
55# Objects that don't want -Wsign-compare
56OBJS_NO_SIGN_COMPARE = \
57 radix.o \
58 route.o \
59 rtsock.o \
60 dhcp_options.o \
61 igmp.o \
62 in_cksum.o \
63 ip_divert.o \
64 ip_dummynet.o \
65 ip_flow.o \
66 ip_fw2.o \
67 ip_fw2_compat.o \
68 ip_icmp.o \
69 ip_input.o \
70 ip_mroute.o \
71 ip_output.o \
72 raw_ip.o \
73 tcp_input.o \
74 tcp_output.o \
75 tcp_subr.o \
76 tcp_usrreq.o \
77 tcp_timer.o \
78 udp_usrreq.o \
79 ah_input.o \
80 ah_core.o \
81 ah_output.o \
82 esp_core.o \
83 esp_input.o \
84 esp_output.o \
85 esp_rijndael.o \
86 ipsec.o \
87 dest6.o \
88 frag6.o \
89 icmp6.o \
90 in6.o \
91 in6_src.o \
92 in6_cksum.o \
93 ip6_fw.o \
94 ip6_forward.o \
95 in6_ifattach.o \
96 ip6_input.o \
97 ip6_mroute.o \
98 ip6_output.o \
99 ipcomp_input.o \
100 ipcomp_output.o \
101 in6_proto.o \
102 mld6.o \
103 nd6.o \
104 nd6_nbr.o \
105 nd6_rtr.o \
106 raw_ip6.o \
107 route6.o \
108 scope6.o \
109 udp6_usrreq.o \
110 key.o \
111 keysock.o \
112 keydb.o \
113 des_setkey.o \
114 uipc_mbuf.o \
115 uipc_mbuf2.o \
116 uipc_socket.o \
117 uipc_socket2.o
118
119$(foreach file,$(OBJS_NO_SIGN_COMPARE),$(eval $(call add_perfile_cflags,$(file),-Wno-sign-compare)))
120
1c79356b
A
121#
122# Directories for mig generated files
123#
124COMP_SUBDIRS =
125
126#
127# Make sure we don't remove this by accident if interrupted at the wrong
128# time.
129#
130.PRECIOUS: Makefile
131
1c79356b
A
132#
133# Theses macros are filled in by the config program depending on the
134# current configuration. The MACHDEP macro is replaced by the
135# contents of the machine dependent makefile template and the others
136# are replaced by the corresponding symbol definitions for the
137# configuration.
138#
139
140%OBJS
141
142%CFILES
143
144%MFILES
145
146%SFILES
147
148%BFILES
149
150%ORDERED
151%MACHDEP
152
55e303ae
A
153#
154# This rule insures that the subr_prof.c does NOT get compiled with
155# profiling. It implements mcount() and profiling it leads to recursion.
156#
157
158subr_prof.o_CFLAGS_RM = -pg
159
1c79356b
A
160#
161# OBJSDEPS is the set of files (defined in the machine dependent
162# template if necessary) which all objects depend on (such as an
163# in-line assembler expansion filter)
164#
165${OBJS}: ${OBJSDEPS}
166
167
168%LOAD
169
170LDOBJS = $(OBJS)
171
6d2010ae 172$(COMPONENT).filelist: $(LDOBJS)
b0d623f7
A
173 @echo LDFILELIST $(COMPONENT)
174 $(_v)( for obj in ${LDOBJS}; do \
175 echo $(TARGET)$(COMP_OBJ_DIR)/$(KERNEL_CONFIG)/$${obj}; \
6d2010ae 176 done; ) > $(COMPONENT).filelist
b0d623f7
A
177
178MAKESYSCALLS = $(SRCROOT)/bsd/kern/makesyscalls.sh
179
180init_sysent.c: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS)
181 @echo "Generating $@ from $<";
182 $(_v)$(MAKESYSCALLS) $< table > /dev/null
183
184syscalls.c: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS)
185 @echo "Generating $@ from $<";
186 $(_v)$(MAKESYSCALLS) $< names > /dev/null
187
188audit_kevents.c: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS)
189 @echo "Generating $@ from $<";
190 $(_v)$(MAKESYSCALLS) $< audit > /dev/null
1c79356b
A
191
192do_depend: do_all
2d21ac55 193 $(_v)${MD} -u Makedep -f -d `ls *.d`;
b0d623f7 194
6d2010ae 195do_all: $(COMPONENT).filelist
1c79356b
A
196
197do_build_all: do_depend
198
199%RULES
200
1c79356b
A
201include $(MakeInc_rule)
202include $(MakeInc_dir)