]>
Commit | Line | Data |
---|---|---|
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 | ||
8 | export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd | |
9 | export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def | |
10 | export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule | |
11 | export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir | |
12 | ||
13 | include $(MakeInc_cmd) | |
14 | include $(MakeInc_def) | |
15 | ||
16 | CFLAGS+= | |
17 | ||
18 | # | |
19 | # Directories for mig generated files | |
20 | # | |
21 | COMP_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 | ||
39 | %CFILES | |
40 | ||
41 | %CXXFILES | |
42 | ||
43 | %SFILES | |
44 | ||
45 | %MACHDEP | |
46 | ||
47 | # Rebuild if per-file overrides change | |
48 | ${OBJS}: $(firstword $(MAKEFILE_LIST)) | |
49 | ||
50 | ifneq ($(KASAN),1) | |
51 | # nothing to build for non-KASAN | |
52 | OBJS = | |
53 | COBJS = | |
54 | SOBJS = | |
55 | endif | |
56 | ||
57 | # Rebuild if global compile flags change | |
58 | $(COBJS): .CFLAGS | |
59 | .CFLAGS: ALWAYS | |
60 | $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS) | |
61 | $(CXXOBJS): .CXXFLAGS | |
62 | .CXXFLAGS: ALWAYS | |
63 | $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS) | |
64 | $(SOBJS): .SFLAGS | |
65 | .SFLAGS: ALWAYS | |
66 | $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS) | |
67 | ||
68 | # rebuild file list if kasan-ness changes | |
69 | .KASANFLAGS: ALWAYS | |
70 | $(_v)$(REPLACECONTENTS) $@ $(KASAN) | |
71 | ||
72 | $(COMPONENT).filelist: $(OBJS) .KASANFLAGS | |
73 | @echo "$(ColorL)LDFILELIST$(Color0) $(ColorLF)$(COMPONENT)$(Color0)" | |
74 | $(_v)for obj in ${OBJS}; do \ | |
75 | echo $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ | |
76 | done > $(COMPONENT).filelist | |
77 | ||
78 | $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h: $(SRCROOT)/$(COMPONENT)/kasan-blacklist-dynamic | |
79 | @echo "$(ColorH)GENERATING$(Color0) $(ColorLF)$(notdir $@)$(Color0)" | |
80 | @$(SRCROOT)/$(COMPONENT)/tools/generate_dynamic_blacklist.py "$<" > "$@" | |
81 | ||
82 | $(SRCROOT)/$(COMPONENT)/kasan_dynamic_blacklist.c: $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h | |
83 | ||
84 | do_all: $(COMPONENT).filelist | |
85 | ||
86 | do_build_all:: do_all | |
87 | ||
88 | %RULES | |
89 | ||
90 | include $(MakeInc_rule) | |
91 | include $(MakeInc_dir) |