generated from freudenreichan/info2Praktikum-DobleSpiel
bintree and tests
This commit is contained in:
@@ -26,24 +26,39 @@ doble_initial:
|
||||
# --------------------------
|
||||
program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
|
||||
|
||||
doble : main.o $(program_obj_files)
|
||||
doble: main.o $(program_obj_files)
|
||||
$(CC) $(FLAGS) $^ -o doble
|
||||
|
||||
$(program_obj_files): %.o: %.c
|
||||
$(CC) -c $(FLAGS) $^ -o $@
|
||||
|
||||
main.o: main.c
|
||||
$(CC) -c $(FLAGS) main.c -o main.o
|
||||
|
||||
# --------------------------
|
||||
# Unit Tests
|
||||
# --------------------------
|
||||
unitTests:
|
||||
echo "needs to be implemented"
|
||||
bintreeTests: bintree.o stack.o bintreeTests.c $(unityfolder)/unity.c
|
||||
$(CC) $(FLAGS) -I$(unityfolder) -o runBintreeTests bintreeTests.c bintree.o stack.o $(unityfolder)/unity.c
|
||||
|
||||
numbersTests: numbers.o bintree.o stack.o numbersTests.c $(unityfolder)/unity.c
|
||||
$(CC) $(FLAGS) -I$(unityfolder) -o runNumbersTests numbersTests.c numbers.o bintree.o stack.o $(unityfolder)/unity.c
|
||||
|
||||
unitTests: bintreeTests numbersTests
|
||||
ifeq ($(OS),Windows_NT)
|
||||
.\runBintreeTests.exe
|
||||
.\runNumbersTests.exe
|
||||
else
|
||||
./runBintreeTests
|
||||
./runNumbersTests
|
||||
endif
|
||||
|
||||
# --------------------------
|
||||
# Clean
|
||||
# --------------------------
|
||||
clean:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
del /f *.o doble
|
||||
del /f *.o *.exe
|
||||
else
|
||||
rm -f *.o doble
|
||||
rm -f *.o doble doble_initial runBintreeTests runNumbersTests
|
||||
endif
|
||||
Reference in New Issue
Block a user