Browse Source

[Pal/Makefile] Add more files to be cleaned

Some files are missed when "make clean"

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
Isaku Yamahata 5 years ago
parent
commit
ad38cfca02

+ 1 - 1
Pal/src/Makefile

@@ -164,6 +164,6 @@ $(OBJ_DIR)/%.e: %.c $(headers)
 
 .PHONY: clean
 clean:
-	rm -rf $(LIB_DIR) $(OBJ_DIR)
+	rm -rf $(LIB_DIR) $(OBJ_DIR) $(files_to_build)
 	@[ ! -d $(HOST_DIR) ] || $(MAKE) -C $(HOST_DIR) clean
 	@[ ! -d security/$(PAL_HOST) ] || $(MAKE) -C security/$(PAL_HOST) clean

+ 3 - 1
Pal/src/host/FreeBSD/Makefile

@@ -51,6 +51,8 @@ libpal-FreeBSD.a: $(addsuffix .o,$(objs)) $(graphene_lib)
 	@echo [ host/FreeBSD/$@ ]
 	@$(AS) $(ASFLAGS) $(defs) -E $< -o $@
 
+CLEAN_FILES += $(notdir $(pal_static) $(pal_lib) $(pal_sec) $(pal_loader))
+
 .PHONY: clean
 clean:
-	rm -f $(addsuffix .o,$(objs)) $(host_target)
+	rm -f $(addsuffix .o,$(objs)) $(host_target) $(CLEAN_FILES)

+ 4 - 1
Pal/src/host/Linux-SGX/Makefile

@@ -69,6 +69,9 @@ debugger/sgx_gdb.so: debugger/sgx_gdb.c debugger/sgx_gdb.h sgx_arch.h
 sgx-driver/isgx_version.h:
 	$(MAKE) -C sgx-driver $(notdir $<)
 
+CLEAN_FILES += $(notdir $(pal_static) $(pal_lib) $(pal_sec) $(pal_loader))
+CLEAN_FILES += debugger/sgx_gdb.o
+
 .PHONY: clean
 clean:
-	rm -f *.o *.e $(host_files)
+	rm -f *.o *.e $(host_files) $(CLEAN_FILES)

+ 3 - 1
Pal/src/host/Linux/Makefile

@@ -52,6 +52,8 @@ libpal-Linux.a: $(addsuffix .o,$(objs)) $(graphene_lib)
 	@echo [ host/Linux/$@ ]
 	@$(AS) $(ASFLAGS) $(defs) -E $< -o $@
 
+CLEAN_FILES += $(notdir $(pal_static) $(pal_lib) $(pal_sec) $(pal_loader))
+
 .PHONY: clean
 clean:
-	rm -f $(addsuffix .o,$(objs)) $(host_files)
+	rm -f $(addsuffix .o,$(objs)) $(host_files) $(CLEAN_FILES)