# -------------------------- # Compiler & Flags # -------------------------- CC = gcc FLAGS = -g -Wall ifeq ($(OS),Windows_NT) include makefile_windows.variables RM = del /f else UNAME = $(shell uname) ifeq ($(UNAME),Linux) include makefile_linux.variables else include makefile_mac.variables endif RM = rm -f endif raylibfolder = ./raylib unityfolder = ./unity # -------------------------- # Objects du programme # -------------------------- program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o # -------------------------- # Cible principale # -------------------------- doble : main.o $(program_obj_files) $(CC) $(FLAGS) $^ -o $@ %.o : %.c $(CC) $(FLAGS) -c $< -o $@ # -------------------------- # Programme initial # -------------------------- doble_initial: $(CC) -o doble_initial $(BINARIES)/libdoble_complete.a # -------------------------- # Tests unitaires # -------------------------- # Compile testStack.c en un exécutable testStack unitTests: testStack.o stack.o $(CC) $(FLAGS) testStack.o stack.o -o testStack @echo "----------------------------" @echo "Running unit tests..." ./testStack @echo "----------------------------" testStack.o: testStack.c $(CC) $(FLAGS) -c testStack.c -o testStack.o # -------------------------- # Clean # -------------------------- clean: $(RM) *.o doble testStack doble_initial