]> git.saurik.com Git - apple/xnu.git/blame - bsd/conf/Makefile.template
xnu-1228.15.4.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#
9bccf70c
A
46CFLAGS+= -imacros meta_features.h -DARCH_PRIVATE -DKERNEL -DDRIVER_PRIVATE \
47 -D_KERNEL_BUILD -DKERNEL_BUILD -DMACH_KERNEL -DBSD_BUILD \
48 -DBSD_KERNEL_PRIVATE -DNCPUS=1 -Wno-four-char-constants -fpascal-strings \
2d21ac55 49 -D__APPLE__ -DLP64KERN=1 -DLP64_DEBUG=0 -I. $(CFLAGS_INLINE_CONFIG)
1c79356b 50
0b4e3aa0
A
51# XXX: ld flags for bsd.o
52export LDFLAGS_COMPONENT += -keep_private_externs
53
1c79356b
A
54#
55# Directories for mig generated files
56#
57COMP_SUBDIRS =
58
59#
60# Make sure we don't remove this by accident if interrupted at the wrong
61# time.
62#
63.PRECIOUS: Makefile
64
1c79356b
A
65#
66# Theses macros are filled in by the config program depending on the
67# current configuration. The MACHDEP macro is replaced by the
68# contents of the machine dependent makefile template and the others
69# are replaced by the corresponding symbol definitions for the
70# configuration.
71#
72
73%OBJS
74
75%CFILES
76
77%MFILES
78
79%SFILES
80
81%BFILES
82
83%ORDERED
84%MACHDEP
85
55e303ae
A
86#
87# This rule insures that the subr_prof.c does NOT get compiled with
88# profiling. It implements mcount() and profiling it leads to recursion.
89#
90
91subr_prof.o_CFLAGS_RM = -pg
92
1c79356b
A
93#
94# OBJSDEPS is the set of files (defined in the machine dependent
95# template if necessary) which all objects depend on (such as an
96# in-line assembler expansion filter)
97#
98${OBJS}: ${OBJSDEPS}
99
100
101%LOAD
102
103LDOBJS = $(OBJS)
104
105$(COMPONENT).o: $(LDOBJS)
2d21ac55
A
106 @echo LD $(COMPONENT)
107 $(_v)$(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT).o ${LDOBJS}
1c79356b
A
108
109do_depend: do_all
2d21ac55 110 $(_v)${MD} -u Makedep -f -d `ls *.d`;
1c79356b
A
111
112do_all: $(COMPONENT).o
113
114do_build_all: do_depend
115
116%RULES
117
1c79356b
A
118include $(MakeInc_rule)
119include $(MakeInc_dir)