build: define a common Makefile clean command
Use $(CLEAN_C) throughout the Makefiles to clean up a consistent set of generated files. This also adds coverage files to the list of cleaned files. Change-Id: Iceb922935a45c9eecbf2f3443bd0ee4f5c966825 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
af2a731de3
commit
01b48b7c90
@ -52,6 +52,6 @@ $(APP) : $(OBJS) $(SPDK_LIBS)
|
||||
$(LINK_C)
|
||||
|
||||
clean :
|
||||
$(Q)rm -f $(OBJS) *.d $(APP)
|
||||
$(CLEAN_C) $(APP)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
|
||||
|
@ -57,6 +57,6 @@ $(APP) : $(OBJS) $(SPDK_LIBS)
|
||||
$(LINK_C)
|
||||
|
||||
clean :
|
||||
$(Q)rm -f $(OBJS) *.d $(APP)
|
||||
$(CLEAN_C) $(APP)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
|
||||
|
@ -43,7 +43,7 @@ LIB = libspdk_memory.a
|
||||
all : $(LIB)
|
||||
|
||||
clean :
|
||||
$(Q)rm -f $(LIB) $(OBJS) *.d
|
||||
$(CLEAN_C)
|
||||
|
||||
$(LIB) : $(OBJS)
|
||||
$(LIB_C)
|
||||
|
@ -43,7 +43,7 @@ LIB = libspdk_nvme.a
|
||||
all : $(LIB)
|
||||
|
||||
clean :
|
||||
$(Q)rm -f $(LIB) $(OBJS) *.d
|
||||
$(CLEAN_C)
|
||||
|
||||
$(LIB) : $(OBJS)
|
||||
$(LIB_C)
|
||||
|
@ -43,7 +43,7 @@ LIB = libspdk_util.a
|
||||
all : $(LIB)
|
||||
|
||||
clean :
|
||||
$(Q)rm -f $(LIB) $(OBJS) *.d
|
||||
$(CLEAN_C)
|
||||
|
||||
$(LIB) : $(OBJS)
|
||||
$(LIB_C)
|
||||
|
@ -50,7 +50,7 @@ $(APP) : $(OBJS)
|
||||
$(LINK_C)
|
||||
|
||||
clean:
|
||||
$(Q)rm -f $(APP) $(OBJS) *.d
|
||||
$(CLEAN_C) $(APP)
|
||||
|
||||
%.o: $(NVME_DIR)/%.c %.d $(MAKEFILE_LIST)
|
||||
$(COMPILE_C)
|
||||
|
@ -108,6 +108,10 @@ LIB_C=\
|
||||
$(Q)echo " LIB $@"; \
|
||||
ar crDs $@ $(OBJS)
|
||||
|
||||
# Clean up generated files listed as arguments plus a default list
|
||||
CLEAN_C=\
|
||||
$(Q)rm -f *.a *.o *.d *.d.tmp *.gcno *.gcda
|
||||
|
||||
%.o: %.c %.d $(MAKEFILE_LIST)
|
||||
$(COMPILE_C)
|
||||
|
||||
|
@ -50,6 +50,6 @@ $(APP): $(OBJS) $(SPDK_LIBS)
|
||||
$(LINK_C)
|
||||
|
||||
clean:
|
||||
$(Q)rm -f $(OBJS) *.d $(APP)
|
||||
$(CLEAN_C) $(APP)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
|
||||
|
@ -52,6 +52,6 @@ $(APP) : $(OBJS) $(SPDK_LIBS)
|
||||
$(LINK_C)
|
||||
|
||||
clean :
|
||||
$(Q)rm -f $(OBJS) *.d $(APP)
|
||||
$(CLEAN_C) $(APP)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
|
||||
|
@ -58,6 +58,6 @@ $(APP) : $(OBJS) $(SPDK_LIBS)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
clean :
|
||||
$(Q)rm -f $(OBJS) *.d $(APP)
|
||||
$(CLEAN_C) $(APP)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
|
||||
|
Loading…
Reference in New Issue
Block a user