generated from freudenreichan/info2Praktikum-DobleSpiel
numbers.c und tests dazu.
Makefile angepasst, aber mein Clion spackt gerade, weshalb ich es nicht ausführen kann.
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
CC = gcc
|
||||
CFLAGS = -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 = main.o stack.o bintree.o numbers.o timer.o highscore.o
|
||||
|
||||
doble : $(program_obj_files)
|
||||
$(CC) $(CFLAGS) $^ -o doble
|
||||
|
||||
|
||||
# --------------------------
|
||||
# Unit Tests
|
||||
# --------------------------
|
||||
TEST_STACK_EXEC = runtest_stack.exe
|
||||
|
||||
unitTests: $(TEST_STACK_EXEC)
|
||||
@echo "--- Starte Stack Unit Tests ---"
|
||||
@echo "Versuche auszuführen: $(TEST_STACK_EXEC)"
|
||||
$(TEST_STACK_EXEC)
|
||||
@echo "--- Stack Unit Tests abgeschlossen ---"
|
||||
|
||||
$(TEST_STACK_EXEC): test_stack.o stack.o
|
||||
$(CC) $(CFLAGS) -I$(unityfolder) test_stack.o stack.o $(unityfolder)/unity.c -o $@ $(BINARIES)/libdoble_complete.a
|
||||
|
||||
test_stack.o: test_stack.c
|
||||
$(CC) -c $(CFLAGS) -I$(unityfolder) $< -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
# --------------------------
|
||||
# Clean
|
||||
# --------------------------
|
||||
clean:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
del /f *.o *.exe doble $(TEST_STACK_EXEC)
|
||||
else
|
||||
rm -f *.o *.exe doble $(TEST_STACK_EXEC)
|
||||
endif
|
||||
|
||||
.PHONY: doble_initial doble unitTests $(TEST_STACK_EXEC) clean
|
||||
Reference in New Issue
Block a user