]>
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 | ||
a39ff7e2 | 16 | CFLAGS += -Wassign-enum -Wswitch-enum |
5ba3f43e A |
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 | ||
5ba3f43e A |
50 | # Rebuild if global compile flags change |
51 | $(COBJS): .CFLAGS | |
52 | .CFLAGS: ALWAYS | |
53 | $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS) | |
54 | $(CXXOBJS): .CXXFLAGS | |
55 | .CXXFLAGS: ALWAYS | |
56 | $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS) | |
57 | $(SOBJS): .SFLAGS | |
58 | .SFLAGS: ALWAYS | |
59 | $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS) | |
60 | ||
61 | # rebuild file list if kasan-ness changes | |
62 | .KASANFLAGS: ALWAYS | |
63 | $(_v)$(REPLACECONTENTS) $@ $(KASAN) | |
64 | ||
65 | $(COMPONENT).filelist: $(OBJS) .KASANFLAGS | |
cb323159 | 66 | $(call makelog,$(ColorL)LDFILELIST$(Color0) $(ColorLF)$(COMPONENT)$(Color0)) |
5ba3f43e | 67 | $(_v)for obj in ${OBJS}; do \ |
cb323159 | 68 | $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ |
5ba3f43e A |
69 | done > $(COMPONENT).filelist |
70 | ||
71 | $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h: $(SRCROOT)/$(COMPONENT)/kasan-blacklist-dynamic | |
cb323159 | 72 | $(call makelog,$(ColorH)GENERATING$(Color0) $(ColorLF)$(notdir $@)$(Color0)) |
5ba3f43e A |
73 | @$(SRCROOT)/$(COMPONENT)/tools/generate_dynamic_blacklist.py "$<" > "$@" |
74 | ||
75 | $(SRCROOT)/$(COMPONENT)/kasan_dynamic_blacklist.c: $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h | |
76 | ||
77 | do_all: $(COMPONENT).filelist | |
78 | ||
79 | do_build_all:: do_all | |
80 | ||
81 | %RULES | |
82 | ||
83 | include $(MakeInc_rule) | |
84 | include $(MakeInc_dir) |