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.
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
13 include $(MakeInc_cmd)
14 include $(MakeInc_def)
16 CFLAGS += -Wassign-enum -Wswitch-enum
19 # Directories for mig generated files
24 # Make sure we don't remove this by accident if interrupted at the wrong
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
47 # Rebuild if per-file overrides change
48 ${OBJS}: $(firstword $(MAKEFILE_LIST))
50 # Rebuild if global compile flags change
53 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
56 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
59 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
61 # rebuild file list if kasan-ness changes
63 $(_v)$(REPLACECONTENTS) $@ $(KASAN)
65 $(COMPONENT).filelist: $(OBJS) .KASANFLAGS
66 $(call makelog,$(ColorL)LDFILELIST$(Color0) $(ColorLF)$(COMPONENT)$(Color0))
67 $(_v)for obj in ${OBJS}; do \
68 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
69 done > $(COMPONENT).filelist
71 $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h: $(SRCROOT)/$(COMPONENT)/kasan-blacklist-dynamic
72 $(call makelog,$(ColorH)GENERATING$(Color0) $(ColorLF)$(notdir $@)$(Color0))
73 @$(SRCROOT)/$(COMPONENT)/tools/generate_dynamic_blacklist.py "$<" > "$@"
75 $(SRCROOT)/$(COMPONENT)/kasan_dynamic_blacklist.c: $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h
77 do_all: $(COMPONENT).filelist
83 include $(MakeInc_rule)
84 include $(MakeInc_dir)