-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 1.12 KB
/
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
CPP = g++
CPPFLAGS = -std=c++2a -Wall -Wpedantic -Wextra -Wshadow -Wsign-conversion
DEBUGFLAGS = -DDEBUG
VPATH = ./src:./src/avl:./src/utils:./tests
prod: main.o avl.o helpers.o
$(CPP) $(CPPFLAGS) main.o avl.o helpers.o -o avlprod
main.o: main.cpp
$(CPP) $(CPPFLAGS) -c ./src/main.cpp -o main.o
avl.o: avl.cpp
$(CPP) $(CPPFLAGS) -c ./src/avl/avl.cpp -o avl.o
helpers.o: helpers.hpp helpers.cpp
$(CPP) $(CPPFLAGS) -c ./src/utils/helpers.cpp -o helpers.o
debug: main.debug.o avl.debug.o helpers.debug.o
$(CPP) $(CPPFLAGS) $(DEBUGFLAGS) main.debug.o avl.debug.o helpers.debug.o -o avldebug
main.debug.o: main.cpp
$(CPP) $(CPPFLAGS) $(DEBUGFLAGS) -c ./src/main.cpp -o main.debug.o
avl.debug.o: avl.cpp
$(CPP) $(CPPFLAGS) $(DEBUGFLAGS) -c ./src/avl/avl.cpp -o avl.debug.o
helpers.debug.o: helpers.hpp helpers.cpp
$(CPP) $(CPPFLAGS) $(DEBUGFLAGS) -c ./src/utils/helpers.cpp -o helpers.debug.o
tests: tests.o avl.debug.o helpers.debug.o
$(CPP) $(CPPFLAGS) tests.o avl.debug.o helpers.debug.o -o avltest
tests.o: tests.cpp
$(CPP) $(CPPFLAGS) $(DEBUGFLAGS) -c ./tests/tests.cpp -o tests.o
clean:
rm *.o avl avltest avlprod avldebug