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
49 # Rebuild if per-file overrides change
50 ${OBJS}: $(firstword $(MAKEFILE_LIST))
52 # Rebuild if global compile flags change
55 $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS)
58 $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS)
61 $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS)
63 # rebuild file list if kasan-ness changes
65 $(_v)$(REPLACECONTENTS) $@ $(KASAN)
67 $(COMPONENT).filelist: $(OBJS) .KASANFLAGS
68 @$(LOG_LDFILELIST) "$(COMPONENT)"
69 $(_v)for obj in ${OBJS}; do \
70 $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
71 done > $(COMPONENT).filelist
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
79 $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h: $(SRCROOT)/$(COMPONENT)/kasan-blacklist-dynamic
80 @$(LOG_GENERATE) "$(notdir $@)"
81 @$(SRCROOT)/$(COMPONENT)/tools/generate_dynamic_blacklist.py "$<" > "$@"
83 $(SRCROOT)/$(COMPONENT)/kasan_dynamic_blacklist.c: $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h
85 ifeq ($(RC_ProjectName),xnu_libraries)
86 do_all: $(COMPONENT).libfilelist
88 do_all: $(COMPONENT).filelist
95 include $(MakeInc_rule)
96 include $(MakeInc_dir)