From 5e9c07f4de7e303ad3d5924999a8d2ace7ca2e43 Mon Sep 17 00:00:00 2001
From: Fritz Stracke <fritz.stracke@rwth-aachen.de>
Date: Wed, 24 May 2023 10:47:34 +0200
Subject: [PATCH] Repair make clean

make clean would encounter an error in cpu. fixed.
make clean now removes bin directory.

Signed-off-by: Fritz Stracke <fritz.stracke@rwth-aachen.de>
---
 Makefile           | 3 +++
 cpu/Makefile       | 2 +-
 tests/cpu/Makefile | 7 +++++++
 3 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 tests/cpu/Makefile

diff --git a/Makefile b/Makefile
index d183f59..5e09b61 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,9 @@ clean:
 	$(MAKE) -C cpu clean
 	@echo -e "\033[31m----> Cleaning up test kernels\033[0m"
 	$(MAKE) -C tests clean
+	@echo -e "\033[31m----> Removing bin...\033[0m"
+	rm -rf bin
+	@echo -e "\033[31m All done!\033[0m"
 
 cuda-gdb:
 	@echo -e "\033[36m----> Building submodules\033[0m"
diff --git a/cpu/Makefile b/cpu/Makefile
index 0a4c177..6057294 100644
--- a/cpu/Makefile
+++ b/cpu/Makefile
@@ -85,7 +85,7 @@ LIB_FLAGS += -L$(CUDA_SRC)/lib64/stubs
 CC_FLAGS += -std=gnu11 $(INC_FLAGS)
 # TODO: use extern in header files instead of direct definition e.g. in cpu-common.h to remove -fcommon flag
 CC_FLAGS += -fcommon
-LD_FLAGS = $(LIB_FLAGS) -ltirpc -ldl -lcrypto -lelf
+LD_FLAGS = $(LIB_FLAGS) -ltirpc -ldl -lcrypto -lelf 
 
 ifdef WITH_DEBUG
 # use ASAN_OPTIONS=protect_shadow_gap=0  LSAN_OPTIONS=fast_unwind_on_malloc=0 when running
diff --git a/tests/cpu/Makefile b/tests/cpu/Makefile
new file mode 100644
index 0000000..ab49278
--- /dev/null
+++ b/tests/cpu/Makefile
@@ -0,0 +1,7 @@
+.PHONY: all clean
+
+all:
+
+clean:
+	$(MAKE) -C cubin clean
+	$(MAKE) -C unit clean
-- 
GitLab