-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (28 loc) · 767 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FINAL = semestral
SOURCES = $(wildcard src/*.cpp src/*/*.cpp src/*/*/*.cpp src/*/*/*/*.cpp)
HEADERS = $(wildcard src/*.hpp src/*/*.hpp src/*/*/*.hpp src/*/*/*/*.hpp)
OBJS = ${SOURCES:.cpp=.o}
CPPFLAGS = -Wall -pedantic -Wextra -std=c++17 -Wno-long-long -O2 -g -lstdc++fs
COMPILER = g++
all: ${OBJS}
compile: ${OBJS}
${COMPILER} $^ -o ${FINAL}
run: compile
./semestral
conf: compile
./semestral -c
run_def: compile
./semestral examples/gui_conf examples/conf examples/saves/map_test
load_def: compile
./semestral examples/gui_conf
doc:
doxygen Doxyfile
%.o : %.cpp
${COMPILER} -c ${CPPFLAGS} $< -o $@
clean:
rm -f ${OBJS}
rm -f Makefile.d
rm -f ${FINAL}
Makefile.d: $(SOURCES) $(HEADERS)
g++ -MM $(SOURCES) > Makefile.d
include Makefile.d