2 # Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 # @APPLE_LICENSE_HEADER_START@
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.
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
20 # @APPLE_LICENSE_HEADER_END@
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.
31 # Export IDENT for sub-makefiles
35 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
36 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
37 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
38 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
40 include $(MakeInc_cmd)
41 include $(MakeInc_def)
46 CFLAGS+= -include meta_features.h -DARCH_PRIVATE -DDRIVER_PRIVATE \
47 -D_KERNEL_BUILD -DKERNEL_BUILD -DMACH_KERNEL -DBSD_BUILD \
48 -DBSD_KERNEL_PRIVATE -DLP64KERN=1 -DLP64_DEBUG=0 -I. $(CFLAGS_INLINE_CONFIG)
50 dp_backing_file.o_CFLAGS_ADD += -Wshorten-64-to-32
51 ubc_subr.o_CFLAGS_ADD += -Wshorten-64-to-32
52 vnode_pager.o_CFLAGS_ADD += -Wshorten-64-to-32
53 vm_unix.o_CFLAGS_ADD += -Wshorten-64-to-32
55 # Objects that don't want -Wsign-compare
56 OBJS_NO_SIGN_COMPARE = \
119 $(foreach file,$(OBJS_NO_SIGN_COMPARE),$(eval $(call add_perfile_cflags,$(file),-Wno-sign-compare)))
122 # Directories for mig generated files
127 # Make sure we don't remove this by accident if interrupted at the wrong
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
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.
158 subr_prof.o_CFLAGS_RM = -pg
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)
172 $(COMPONENT).filelist: $(LDOBJS)
173 @echo LDFILELIST $(COMPONENT)
174 $(_v)( for obj in ${LDOBJS}; do \
175 echo $(TARGET)$(COMP_OBJ_DIR)/$(KERNEL_CONFIG)/$${obj}; \
176 done; ) > $(COMPONENT).filelist
178 MAKESYSCALLS = $(SRCROOT)/bsd/kern/makesyscalls.sh
180 init_sysent.c: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS)
181 @echo "Generating $@ from $<";
182 $(_v)$(MAKESYSCALLS) $< table > /dev/null
184 syscalls.c: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS)
185 @echo "Generating $@ from $<";
186 $(_v)$(MAKESYSCALLS) $< names > /dev/null
188 audit_kevents.c: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS)
189 @echo "Generating $@ from $<";
190 $(_v)$(MAKESYSCALLS) $< audit > /dev/null
193 $(_v)${MD} -u Makedep -f -d `ls *.d`;
195 do_all: $(COMPONENT).filelist
197 do_build_all: do_depend
201 include $(MakeInc_rule)
202 include $(MakeInc_dir)