26 lines
392 B
Makefile
26 lines
392 B
Makefile
|
CC := g++
|
||
|
C_FLAGS := -std=c++17 -Wall -Wextra -g -O2
|
||
|
|
||
|
BIN := bin
|
||
|
SRC := src
|
||
|
INCLUDE := include
|
||
|
LIB := lib
|
||
|
|
||
|
LIBRARIES :=
|
||
|
|
||
|
ifeq ($(OS),Windows_NT)
|
||
|
EXECUTABLE := main.exe
|
||
|
else
|
||
|
EXECUTABLE := main
|
||
|
endif
|
||
|
|
||
|
all: $(BIN)/$(EXECUTABLE)
|
||
|
|
||
|
clean:
|
||
|
$(RM) $(BIN)/$(EXECUTABLE)
|
||
|
|
||
|
run: all
|
||
|
./$(BIN)/$(EXECUTABLE)
|
||
|
|
||
|
$(BIN)/$(EXECUTABLE): $(SRC)/*
|
||
|
$(CC) $(C_FLAGS) -I$(INCLUDE) -L$(LIB) $^ -o $@ $(LIBRARIES)
|