Thomas Rauh Desktop e7358b2c6f numbers + Test
2025-11-23 12:09:33 +01:00

42 lines
1.3 KiB
Makefile

CC = gcc
FLAGS = -g -Wall -lm
BINARIES = ./windows
unityfolder = ./unity
program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
# --------------------------
# Initiales Programm bauen (zum ausprobieren)
# --------------------------
doble_initial:
$(CC) -o doble_initial $(BINARIES)/libdoble_complete.a
# --------------------------
# Selbst implementiertes Programm bauen
# --------------------------
doble : main.o $(program_obj_files)
$(CC) $(FLAGS) $^ -o doble
$(program_obj_filesobj_files): %.o: %.c
$(CC) -c $(FLAGS) $^ -o $@
# --------------------------
# Unit Tests
# --------------------------
unitTests:
echo "needs to be implemented"
stackTests: stack.o stackTests.c $(unityfolder)/unity.c
$(CC) $(CFLAGS) -I$(unityfolder) -o runStackTests stackTests.c stack.o $(unityfolder)/unity.c
bintreeTests: stack.o bintree.o bintreeTests.c $(unityfolder)/unity.c
$(CC) $(CFLAGS) -I$(unityfolder) -o runBintreeTests bintreeTests.c stack.o bintree.o $(unityfolder)/unity.c
numbersTests: stack.o bintree.o numbers.o numbersTests.c $(unityfolder)/unity.c
$(CC) $(CFLAGS) -I$(unityfolder) -o runNumbersTests numbersTests.c stack.o bintree.o numbers.o $(unityfolder)/unity.c
# --------------------------
# Clean
# --------------------------
clean:
rm -f *.o doble