2 # Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 # @APPLE_LICENSE_OSREFERENCE_HEADER_START@
6 # This file contains Original Code and/or Modifications of Original Code
7 # as defined in and that are subject to the Apple Public Source License
8 # Version 2.0 (the 'License'). You may not use this file except in
9 # compliance with the License. The rights granted to you under the
10 # License may not be used to create, or enable the creation or
11 # redistribution of, unlawful or unlicensed copies of an Apple operating
12 # system, or to circumvent, violate, or enable the circumvention or
13 # violation of, any terms of an Apple operating system software license
16 # Please obtain a copy of the License at
17 # http://www.opensource.apple.com/apsl/ and read it before using this
20 # The Original Code and all software distributed under the License are
21 # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 # Please see the License for the specific language governing rights and
26 # limitations under the License.
28 # @APPLE_LICENSE_OSREFERENCE_HEADER_END@
32 # Mach Operating System
33 # Copyright (c) 1986 Carnegie-Mellon University
34 # All rights reserved. The CMU software License Agreement specifies
35 # the terms and conditions for use and redistribution.
39 # Export IDENT for sub-makefiles
43 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
44 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
45 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
46 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
48 include $(MakeInc_cmd)
49 include $(MakeInc_def)
54 CFLAGS+= -imacros meta_features.h -DARCH_PRIVATE -DKERNEL -DDRIVER_PRIVATE \
55 -D_KERNEL_BUILD -DKERNEL_BUILD -DMACH_KERNEL -DBSD_BUILD \
56 -DBSD_KERNEL_PRIVATE -DNCPUS=1 -Wno-four-char-constants -fpascal-strings \
57 -D__APPLE__ -DLP64KERN=1 -DLP64_DEBUG=0 -I.
59 # XXX: ld flags for bsd.o
60 export LDFLAGS_COMPONENT += -keep_private_externs
63 # Directories for mig generated files
68 # Make sure we don't remove this by accident if interrupted at the wrong
74 # Theses macros are filled in by the config program depending on the
75 # current configuration. The MACHDEP macro is replaced by the
76 # contents of the machine dependent makefile template and the others
77 # are replaced by the corresponding symbol definitions for the
95 # This rule insures that the subr_prof.c does NOT get compiled with
96 # profiling. It implements mcount() and profiling it leads to recursion.
99 subr_prof.o_CFLAGS_RM = -pg
102 # OBJSDEPS is the set of files (defined in the machine dependent
103 # template if necessary) which all objects depend on (such as an
104 # in-line assembler expansion filter)
113 $(COMPONENT).o: $(LDOBJS)
114 @echo "[ creating $(COMPONENT).o ]"
115 @echo [ updating $(COMPONENT).o ${BSD_KERNEL_CONFIG} ]
116 $(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT).o ${LDOBJS}
119 ${MD} -u Makedep -f -d `ls *.d`;
121 do_all: $(COMPONENT).o
123 do_build_all: do_depend
127 include $(MakeInc_rule)
128 include $(MakeInc_dir)