diff --git a/Makefile.c b/Makefile.c index dd6dd97abe5290ebfc9ecc4739cf9174f15cfdc7..7a04f0cc4fd16db09d611e0ce1455f147a2ef10f 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