]> git.saurik.com Git - apple/xnu.git/blame - san/conf/Makefile.template
xnu-7195.101.1.tar.gz
[apple/xnu.git] / san / conf / Makefile.template
CommitLineData
5ba3f43e
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
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
a39ff7e2 16CFLAGS += -Wassign-enum -Wswitch-enum
5ba3f43e
A
17
18#
19# Directories for mig generated files
20#
21COMP_SUBDIRS =
22
23#
24# Make sure we don't remove this by accident if interrupted at the wrong
25# time.
26#
27.PRECIOUS: Makefile
28
29#
30# Theses macros are filled in by the config program depending on the
31# current configuration. The MACHDEP macro is replaced by the
32# contents of the machine dependent makefile template and the others
33# are replaced by the corresponding symbol definitions for the
34# configuration.
35#
36
37%OBJS
38
a991bd8d
A
39%LIBOBJS
40
5ba3f43e
A
41%CFILES
42
43%CXXFILES
44
45%SFILES
46
47%MACHDEP
48
49# Rebuild if per-file overrides change
50${OBJS}: $(firstword $(MAKEFILE_LIST))
51
5ba3f43e
A
52# Rebuild if global compile flags change
53$(COBJS): .CFLAGS
54.CFLAGS: ALWAYS
55 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
56$(CXXOBJS): .CXXFLAGS
57.CXXFLAGS: ALWAYS
58 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
59$(SOBJS): .SFLAGS
60.SFLAGS: ALWAYS
61 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
62
63# rebuild file list if kasan-ness changes
64.KASANFLAGS: ALWAYS
65 $(_v)$(REPLACECONTENTS) $@ $(KASAN)
66
67$(COMPONENT).filelist: $(OBJS) .KASANFLAGS
f427ee49 68 @$(LOG_LDFILELIST) "$(COMPONENT)"
5ba3f43e 69 $(_v)for obj in ${OBJS}; do \
cb323159 70 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
5ba3f43e
A
71 done > $(COMPONENT).filelist
72
a991bd8d
A
73$(COMPONENT).libfilelist: $(LIBOBJS)
74 @$(LOG_LDFILELIST) "lib$(COMPONENT)"
75 $(_v)for obj in ${LIBOBJS}; do \
76 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
77 done > $(COMPONENT).libfilelist
78
5ba3f43e 79$(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h: $(SRCROOT)/$(COMPONENT)/kasan-blacklist-dynamic
f427ee49 80 @$(LOG_GENERATE) "$(notdir $@)"
5ba3f43e
A
81 @$(SRCROOT)/$(COMPONENT)/tools/generate_dynamic_blacklist.py "$<" > "$@"
82
83$(SRCROOT)/$(COMPONENT)/kasan_dynamic_blacklist.c: $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h
84
a991bd8d
A
85ifeq ($(RC_ProjectName),xnu_libraries)
86do_all: $(COMPONENT).libfilelist
87else
5ba3f43e 88do_all: $(COMPONENT).filelist
a991bd8d 89endif
5ba3f43e
A
90
91do_build_all:: do_all
92
93%RULES
94
95include $(MakeInc_rule)
96include $(MakeInc_dir)