12345678910111213141516171819202122232425262728293031323334353637383940 |
- CC=g++
- LDFLAGS=
- CFLAGS=-Wall -Wextra -O -std=c++17
-
- STATE=debug
-
- SRC=src/
- INCLUDE=include/
- OBJ=object/
- BIN=bin/$(STATE)/
-
- all: reits
-
- run: reits
- $(BIN)reits
-
- reits: main.o $(OBJ)Game.o $(OBJ)Scene.o $(OBJ)Interface.o
- @echo "\nCompilation de \033[0;36m $@ \033[0m"
- $(CC) -o $(BIN)$@ $(OBJ)$^ $(LDFLAGS)
-
- main.o: main.cpp $(INCLUDE)Game.h
- @echo "\nCompilation de \033[0;36m $@ \033[0m"
- $(CC) -o $(OBJ)$@ -c $^ $(CFLAGS)
-
- Game.o: $(SRC)Game.cpp $(INCLUDE)Game.h $(INCLUDE)Scene.h
- @echo "\nCompilation de \033[0;36m $@ \033[0m"
- @$(CC) -o $(OBJ)$@ -c $< $(CFLAGS)
-
- Scene.o: $(SRC)Scene.cpp $(INCLUDE)Scene.h $(INCLUDE)Interface.h
- @echo "\nCompilation de \033[0;36m $@ \033[0m"
- @$(CC) -o $(OBJ)$@ -c $< $(CFLAGS)
-
- Interface.o: $(SRC)Interface.cpp $(INCLUDE)Interface.h
- @echo "\nCompilation de \033[0;36m $@ \033[0m"
- @$(CC) -o $(OBJ)$@ -c $< $(CFLAGS)
-
- clean:
- echo "Nettoyage des objets"
- rm $(OBJ)*
|