Doble_Spiel/makefile
2025-12-02 02:12:30 +01:00

61 lines
1.3 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 $@
# --------------------------
# Unit Tests
# --------------------------
unitTests: test_numbers test_stack
test_numbers: test_numbers.o stack.o bintree.o numbers.o
$(CC) $(FLAGS) $^ -o test_numbers
test_numbers.o: test_numbers.c
$(CC) -c $(FLAGS) $< -o $@
test_stack: test_stack.o stack.o
$(CC) $(FLAGS) $^ -o test_stack
test_stack.o: test_stack.c
$(CC) -c $(FLAGS) $< -o $@
# --------------------------
# Clean
# --------------------------
clean:
ifeq ($(OS),Windows_NT)
del /f *.o doble
else
rm -f *.o doble
endif