generated from freudenreichan/info2Praktikum-DobleSpiel
Makefile angepasst an unit tests. Unit tests geändert
This commit is contained in:
@@ -29,21 +29,32 @@ program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
|
||||
doble : main.o $(program_obj_files)
|
||||
$(CC) $(FLAGS) $^ -o doble
|
||||
|
||||
$(program_obj_filesobj_files): %.o: %.c
|
||||
$(program_obj_files): %.o: %.c
|
||||
$(CC) -c $(FLAGS) $^ -o $@
|
||||
|
||||
# --------------------------
|
||||
# Unit Tests
|
||||
# --------------------------
|
||||
unitTests:
|
||||
echo "needs to be implemented"
|
||||
# Test Stack (JETZT MIT UNITY)
|
||||
# Wir müssen unity/unity.c mitkompilieren und -Iunity nutzen
|
||||
test_stack: test_stack.c stack.o $(unityfolder)/unity.c
|
||||
$(CC) $(FLAGS) -Iunity test_stack.c stack.o $(unityfolder)/unity.c -o test_stack$(EXT)
|
||||
|
||||
# --------------------------
|
||||
unitTests_stack: test_stack
|
||||
./test_stack$(EXT)
|
||||
test_numbers: test_numbers.c numbers.c bintree.c stack.c unity/unity.c
|
||||
gcc -Wall -Wextra -std=c99 -Iunity \
|
||||
-o test_numbers \
|
||||
test_numbers.c numbers.c bintree.c stack.c unity/unity.c
|
||||
unitTests_number: test_numbers
|
||||
./test_numbers
|
||||
|
||||
#-------------------------
|
||||
# Clean
|
||||
# --------------------------
|
||||
clean:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
del /f *.o doble
|
||||
del /f *.o doble.exe test_stack.exe test_numbers.exe
|
||||
else
|
||||
rm -f *.o doble
|
||||
endif
|
||||
Reference in New Issue
Block a user