From b18340adc3cca5d5bec91e3175fc3d13cc13a34a Mon Sep 17 00:00:00 2001 From: Giovanna Stefanelli <giovanna.stefanelli@student.uclouvain.be> Date: Thu, 23 Apr 2020 21:27:51 +0200 Subject: [PATCH] Update Makefile.c --- Makefile.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Makefile.c b/Makefile.c index dd6dd97..7a04f0c 100644 --- a/Makefile.c +++ b/Makefile.c @@ -1,5 +1,5 @@ # Group: Q6 - gs -# Date: 22 April 2020 +# Date: 23 April 2020 # Course: LEPL1503 - PROJECT3 # Object: factorial @@ -8,20 +8,22 @@ CC = gcc # The option -Werror convert warning into error FLAGS = -Werror -pthread +#TEST_FLAGS = -I${HOME/local/include} -L${HOME/local/lib -Wall -lcunit + fact: fact.c $(CC) $(FLAGS) fact.c -o fact -lm echo Compiler task ended -test: - $(CC) $(FLAGS) fact.c -o fact -lm - #### complete with the unit tests #### +test: Fact_UnitTest.c + gcc -Wall -lcunit -I${HOME}/local/include Fact_UnitTest.c -L${HOME}/local/lib -o Fact_UnitTest -lm echo "Test completed" clean: fact rm fact - #### complete with the rm testing ouput files #### + # rm testing ouput files #### + rm Fact_UnitTest rm out*.txt echo "Clean completed" @@ -29,5 +31,11 @@ clean: fact valgrind: valgrind ./fact +valgrind_test: + valgrind ./Fact_UnitTest + cppcheck: cppcheck ./fact + +cppcheck_test: + cppcheck ./Fact_UnitTest \ No newline at end of file -- GitLab