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