Info2Doble/makefile

71 lines
1.7 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:
echo "needs to be implemented"
bintree: bintree.c
$(CC) $(FLAGS) -c bintree bintree.c
bintreeTests: stack.o bintree.o bintreeTests.c $(unityfolder)/unity.c
$(CC) $(FLAGS) -o runbintreeTests bintreeTests.c bintree.o stack.o $(unityfolder)/unity.c
highscore: highscore.c
$(CC) $(FLAGS) -c highscore highscore.c
numbers: numbers.c
$(CC) $(FLAGS) -c numbers numbers.c
test_numbers: numbers.o bintree.o stack.o test_numbers.c $(unityfolder)/unity.c
$(CC) $(FLAGS) -o run_numbersTests test_numbers.c numbers.o bintree.o stack.o $(unityfolder)/unity.c
stack: stack.c
$(CC) $(FLAGS) -c stack stack.c
test_stack: stack.o test_stack.c $(unityfolder)/unity.c
$(CC) $(FLAGS) -o runstackTests test_stack.c stack.o $(unityfolder)/unity.c
timer: timer.c
$(CC) $(FLAGS) -c timer timer.c
# --------------------------
# Clean
# --------------------------
clean:
ifeq ($(OS),Windows_NT)
del /f *.o doble
else
rm -f *.o doble
endif