Info2Doble/makefile
silvana884 8f3ee7b9d7 Fertig
2025-12-11 09:46:50 +01:00

67 lines
1.4 KiB
Makefile

CC = gcc
raylibfolder = ./raylib
unityfolder = ./unity
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
%.o: %.c
$(CC) $(FLAGS) -c $< -o $@
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"
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
test_stack: stack.o test_stack.c $(unityfolder)/unity.c
$(CC) $(FLAGS) -o runstackTests test_stack.c stack.o $(unityfolder)/unity.c
# --------------------------
# Cleaning
# --------------------------
clean:
ifeq ($(OS),Windows_NT)
del /f *.o doble runstackTests run_numbersTests runbintreeTests
else
rm -f *.o doble runstackTests run_numbersTests runbintreeTests
endif