]> git.saurik.com Git - apple/xnu.git/blame_incremental - bsd/conf/Makefile.template
xnu-792.13.8.tar.gz
[apple/xnu.git] / bsd / conf / Makefile.template
... / ...
CommitLineData
1#
2# Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
3#
4# @APPLE_LICENSE_OSREFERENCE_HEADER_START@
5#
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
14# agreement.
15#
16# Please obtain a copy of the License at
17# http://www.opensource.apple.com/apsl/ and read it before using this
18# file.
19#
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.
27#
28# @APPLE_LICENSE_OSREFERENCE_HEADER_END@
29#
30
31#
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.
36#
37
38#
39# Export IDENT for sub-makefiles
40#
41export IDENT
42
43export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
44export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
45export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
46export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
47
48include $(MakeInc_cmd)
49include $(MakeInc_def)
50
51#
52# XXX: CFLAGS
53#
54CFLAGS+= -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.
58
59# XXX: ld flags for bsd.o
60export LDFLAGS_COMPONENT += -keep_private_externs
61
62#
63# Directories for mig generated files
64#
65COMP_SUBDIRS =
66
67#
68# Make sure we don't remove this by accident if interrupted at the wrong
69# time.
70#
71.PRECIOUS: Makefile
72
73#
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
78# configuration.
79#
80
81%OBJS
82
83%CFILES
84
85%MFILES
86
87%SFILES
88
89%BFILES
90
91%ORDERED
92%MACHDEP
93
94#
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.
97#
98
99subr_prof.o_CFLAGS_RM = -pg
100
101#
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)
105#
106${OBJS}: ${OBJSDEPS}
107
108
109%LOAD
110
111LDOBJS = $(OBJS)
112
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}
117
118do_depend: do_all
119 ${MD} -u Makedep -f -d `ls *.d`;
120
121do_all: $(COMPONENT).o
122
123do_build_all: do_depend
124
125%RULES
126
127include $(MakeInc_rule)
128include $(MakeInc_dir)
129