]> git.saurik.com Git - apple/xnu.git/blobdiff - san/conf/Makefile.template
xnu-7195.81.3.tar.gz
[apple/xnu.git] / san / conf / Makefile.template
index 03e60fa814bfe62f3961f80c0a10b4255065fe90..f798e2fffa26251b3bd55f0c8ad220b9b5ec21db 100644 (file)
@@ -13,7 +13,7 @@ export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
 include $(MakeInc_cmd)
 include $(MakeInc_def)
 
-CFLAGS+=
+CFLAGS += -Wassign-enum -Wswitch-enum
 
 #
 # Directories for mig generated files
@@ -36,6 +36,8 @@ COMP_SUBDIRS =
 
 %OBJS
 
+%LIBOBJS
+
 %CFILES
 
 %CXXFILES
@@ -47,13 +49,6 @@ COMP_SUBDIRS =
 # Rebuild if per-file overrides change
 ${OBJS}: $(firstword $(MAKEFILE_LIST))
 
-ifneq ($(KASAN),1)
-# nothing to build for non-KASAN
-OBJS =
-COBJS =
-SOBJS =
-endif
-
 # Rebuild if global compile flags change
 $(COBJS): .CFLAGS
 .CFLAGS: ALWAYS
@@ -70,18 +65,28 @@ $(SOBJS): .SFLAGS
        $(_v)$(REPLACECONTENTS) $@ $(KASAN)
 
 $(COMPONENT).filelist: $(OBJS) .KASANFLAGS
-       @echo "$(ColorL)LDFILELIST$(Color0) $(ColorLF)$(COMPONENT)$(Color0)"
+       @$(LOG_LDFILELIST) "$(COMPONENT)"
        $(_v)for obj in ${OBJS}; do     \
-                echo $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
+                $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
        done > $(COMPONENT).filelist
 
+$(COMPONENT).libfilelist: $(LIBOBJS)
+       @$(LOG_LDFILELIST) "lib$(COMPONENT)"
+       $(_v)for obj in ${LIBOBJS}; do  \
+                $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
+       done > $(COMPONENT).libfilelist
+
 $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h: $(SRCROOT)/$(COMPONENT)/kasan-blacklist-dynamic
-       @echo "$(ColorH)GENERATING$(Color0)    $(ColorLF)$(notdir $@)$(Color0)"
+       @$(LOG_GENERATE) "$(notdir $@)"
        @$(SRCROOT)/$(COMPONENT)/tools/generate_dynamic_blacklist.py "$<" > "$@"
 
 $(SRCROOT)/$(COMPONENT)/kasan_dynamic_blacklist.c: $(TARGET)/$(CURRENT_KERNEL_CONFIG)/kasan_blacklist_dynamic.h
 
+ifeq ($(RC_ProjectName),xnu_libraries)
+do_all: $(COMPONENT).libfilelist
+else
 do_all: $(COMPONENT).filelist
+endif
 
 do_build_all:: do_all