Doble-Spiel/makefile
2025-12-08 14:37:34 +01:00

72 lines
1.5 KiB
Makefile

CC = gcc
FLAGS = -g -Wall -lm
ifeq ($(OS),Windows_NT)
include makefile_windows.variables
else
UNAME = $(shell uname)
ifeq ($(UNAME),Linux)
include makefile_linux.variables
else
include makefile_mac.variables
endif
endif
raylibfolder = ./raylib
unityfolder = ./unity
# --------------------------
# Initiales Programm bauen (zum ausprobieren)
# --------------------------
doble_initial:
$(CC) -o doble_initial $(BINARIES)/libdoble_complete.a
# --------------------------
# Selbst implementiertes Programm bauen
# --------------------------
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
$(CC) -c $(FLAGS) $^ -o $@
main.o: main.c
$(CC) -c $(FLAGS) main.c
numbers.o: numbers.c
$(CC) -c $(CFLAGS) numbers.c
bintree.o: bintree.c
$(CC) -c $(CFLAGS) bintree.c
timer.o: timer.c
$(CC) -c $(CFLAGS) timer.c
stack.o: stack.c
$(CC) -c $(CFLAGS) stack.c
highscore.o: highscore.c
$(CC) -c $(CFLAGS) highscore.c
# --------------------------
# Unit Tests
# --------------------------
#unitTests:
# echo "needs to be implemented"
numbersTests: numbers.o bintree.o test_numbers.c $(unityfolder)/unity.c
$(CC) $(CFLAGS) -I$(unityfolder) -o runNumbersTests test_numbers.c numbers.o bintree.o $(unityfolder)/unity.c
# --------------------------
# Clean
# --------------------------
clean:
ifeq ($(OS),Windows_NT)
del /f *.o doble
else
rm -f *.o doble
endif