generated from freudenreichan/info2Praktikum-DobleSpiel
67 lines
1.7 KiB
Makefile
67 lines
1.7 KiB
Makefile
CC = gcc
|
|
FLAGS = -g -Wall -I$(unityfolder)
|
|
|
|
|
|
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
|
|
# --------------------------
|
|
doble_initial:
|
|
$(CC) -o doble_initial $(BINARIES)/libdoble_complete.a
|
|
|
|
# --------------------------
|
|
# Objektdateien
|
|
# --------------------------
|
|
program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
|
|
|
|
# Generische Regel für alle .o-Dateien
|
|
%.o: %.c
|
|
$(CC) $(FLAGS) -c $< -o $@
|
|
|
|
# --------------------------
|
|
# Hauptprogramm
|
|
# --------------------------
|
|
doble: main.o $(program_obj_files)
|
|
$(CC) $(FLAGS) $^ -o doble
|
|
|
|
# --------------------------
|
|
# Unit Tests
|
|
# --------------------------
|
|
unitTests:
|
|
@echo "needs to be implemented"
|
|
|
|
# Bintree Tests
|
|
binTreeTests: stack.o bintree.o binTreeTests.c $(unityfolder)/unity.c
|
|
$(CC) $(FLAGS) -o runbintreeTests binTreeTests.c bintree.o stack.o $(unityfolder)/unity.c
|
|
|
|
# Numbers Tests
|
|
test_numbers: numbers_no_tree.o bintree.o stack.o test_numbers.c $(unityfolder)/unity.c
|
|
$(CC) $(FLAGS) -o run_numbersTests test_numbers.c numbers_no_tree.o bintree.o stack.o $(unityfolder)/unity.c
|
|
|
|
# Stack Tests
|
|
test_stack: stack.o test_stack.c $(unityfolder)/unity.c
|
|
$(CC) $(FLAGS) -o runstackTests test_stack.c stack.o $(unityfolder)/unity.c
|
|
|
|
# --------------------------
|
|
# Clean
|
|
# --------------------------
|
|
clean:
|
|
ifeq ($(OS),Windows_NT)
|
|
del /f *.o doble runstackTests run_numbersTests runbintreeTests
|
|
else
|
|
rm -f *.o doble runstackTests run_numbersTests runbintreeTests
|
|
endif
|