]> git.saurik.com Git - apple/xnu.git/blame - security/conf/Makefile.template
xnu-2422.1.72.tar.gz
[apple/xnu.git] / security / conf / Makefile.template
CommitLineData
2d21ac55
A
1#
2# Mach Operating System
3# Copyright (c) 1986 Carnegie-Mellon University
4# All rights reserved. The CMU software License Agreement specifies
5# the terms and conditions for use and redistribution.
6#
7
2d21ac55
A
8export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
9export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
10export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
11export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
12
13include $(MakeInc_cmd)
14include $(MakeInc_def)
15
16#
17# XXX: CFLAGS
18#
39236c6e
A
19CFLAGS+= -include meta_features.h -DBSD_KERNEL_PRIVATE
20
21# Objects that don't want -Wcast-align warning (8474835)
22OBJS_NO_CAST_ALIGN = \
23 mac_alloc.o \
24 mac_base.o
25
26$(foreach file,$(OBJS_NO_CAST_ALIGN),$(eval $(call add_perfile_cflags,$(file),-Wno-cast-align)))
2d21ac55
A
27
28#
39236c6e 29# INCFLAGS to include security prototypes
2d21ac55 30#
39236c6e 31INCFLAGS_MAKEFILE= -I$(SOURCE)/..
2d21ac55 32
39236c6e
A
33#
34# Directories for mig generated files
35#
36COMP_SUBDIRS =
2d21ac55 37
39236c6e 38#
2d21ac55
A
39# Make sure we don't remove this by accident if interrupted at the wrong
40# time.
41#
42.PRECIOUS: Makefile
43
44VERSION_FILES= \
45 $(SOURCE_DIR)/$(COMPONENT)/conf/version.major \
46 $(SOURCE_DIR)/$(COMPONENT)/conf/version.minor \
47 $(SOURCE_DIR)/$(COMPONENT)/conf/version.variant
48
49COPYRIGHT_FILES = \
50 $(SOURCE_DIR)/$(COMPONENT)/conf/copyright.nai
51
52#
53# Theses macros are filled in by the config program depending on the
54# current configuration. The MACHDEP macro is replaced by the
55# contents of the machine dependent makefile template and the others
56# are replaced by the corresponding symbol definitions for the
57# configuration.
58#
59
60%OBJS
61
62%CFILES
63
2d21ac55
A
64%SFILES
65
2d21ac55
A
66%MACHDEP
67
68#
69# OBJSDEPS is the set of files (defined in the machine dependent
70# template if necessary) which all objects depend on (such as an
71# in-line assembler expansion filter)
72#
73${OBJS}: ${OBJSDEPS}
74
2d21ac55
A
75LDOBJS = $(OBJS)
76
39236c6e 77$(COMPONENT).filelist: $(LDOBJS) vers.o
b0d623f7
A
78 @echo LDFILELIST $(COMPONENT)
79 $(_v)( for obj in ${LDOBJS} vers.o; do \
39236c6e 80 echo $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
6d2010ae 81 done; ) > $(COMPONENT).filelist
2d21ac55 82
6d2010ae 83do_all: $(COMPONENT).filelist
2d21ac55 84
39236c6e 85do_build_all:: do_all
2d21ac55 86
39236c6e
A
87vers.o: vers.c
88 @echo CC $@
89 $(_v)${KCC} $(CFLAGS) -o ${@} -c ${INCFLAGS} $<
2d21ac55 90
39236c6e
A
91vers.c:
92 $(_v)$(SRCROOT)/SETUP/newvers \
93 `$(CAT) ${VERSION_FILES}` ${COPYRIGHT_FILES}
2d21ac55
A
94
95%RULES
96
97include $(MakeInc_rule)
98include $(MakeInc_dir)