This commit is contained in:
silvana884
2025-12-11 09:46:50 +01:00
parent 37f38cbc7d
commit 8f3ee7b9d7
14 changed files with 107 additions and 92 deletions
+28 -28
View File
@@ -1,62 +1,62 @@
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
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
# --------------------------
# Objektdateien
# --------------------------
program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
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
doble_initial:
$(CC) -o doble_initial $(BINARIES)/libdoble_complete.a
# --------------------------
# 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
binTreeTest: stack.o bintree.o binTreeTest.c $(unityfolder)/unity.c
$(CC) $(FLAGS) -o runbinTreeTest binTreeTest.c bintree.o stack.o $(unityfolder)/unity.c
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
# Cleaning
# --------------------------
clean:
ifeq ($(OS),Windows_NT)