aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2018-03-28 20:40:46 +0200
committerJ08nY2018-03-28 20:40:46 +0200
commit87172cc5798c4a45a66af054efe5d0258e76a953 (patch)
treebaf91084f51a0fbcfb52abd8e8cf707cf14e20d8
parent0d3b110f107fb9f09b4b96f8f480b46d7068cd9e (diff)
downloadecgen-87172cc5798c4a45a66af054efe5d0258e76a953.tar.gz
ecgen-87172cc5798c4a45a66af054efe5d0258e76a953.tar.zst
ecgen-87172cc5798c4a45a66af054efe5d0258e76a953.zip
-rw-r--r--Makefile9
-rw-r--r--src/Makefile2
-rw-r--r--test/src/Makefile2
3 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3f5d88a..4a99215 100644
--- a/Makefile
+++ b/Makefile
@@ -12,11 +12,15 @@ clean:
+$(MAKE) -C src clean
+$(MAKE) -C test clean
+clean-cov:
+ +$(MAKE) -C src clean-cov
+ +$(MAKE) -C test clean-cov
+ rm -rf *.gcov
+
clean-all:
+$(MAKE) -C lib clean
+$(MAKE) -C src clean-all
+$(MAKE) -C test clean-all
- rm -rf *.gcov
rm -rf doc/*
format:
@@ -42,13 +46,14 @@ help:
@echo " - test : test the main binary"
@echo " - unittest : "
@echo " - clean : cleans up after a build"
+ @echo " - clean-cov : cleans up coverage files"
@echo " - clean-all : cleans all"
@echo " - format : run clang-format on source files"
@echo " - help : print this help"
.PHONY: all clean clean-all docs test unittest help
-ifeq (, $(filter all clean clean-all format docs test unittest help, $(MAKECMDGOALS)))
+ifeq (, $(filter all clean clean-cov clean-all format docs test unittest help, $(MAKECMDGOALS)))
# Just pass all targets to a Makefile in src
$(MAKECMDGOALS):
+$(MAKE) -C src $@
diff --git a/src/Makefile b/src/Makefile
index a3f28c4..9918c43 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -50,7 +50,7 @@ ecgen: ecgen.o $(ECGEN_OBJ)
####
-clean-all: clean clean-cov
+clean-all: clean
rm -f ../ecgen
clean:
diff --git a/test/src/Makefile b/test/src/Makefile
index 2724260..675f2df 100644
--- a/test/src/Makefile
+++ b/test/src/Makefile
@@ -38,7 +38,7 @@ test_ecgen: $(TEST_OBJ) $(ECGEN_OBJ)
%.o: %.c
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-clean-all: clean clean-cov
+clean-all: clean
rm -f ./test_ecgen
clean: