-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (25 loc) · 683 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (25 loc) · 683 Bytes
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
# compiler
CXX = g++
# flags
CXXFLAGS = -std=c++17 -Wall -Wextra -fsanitize=address -g
SRC = src
TARGETS = random dfs bfs greedy a_star
OBJS = $(TARGETS).o maze.o
all: $(TARGETS)
random: $(SRC)/random.cpp maze.o
$(CXX) $(CXXFLAGS) -o $@ $^
dfs: $(SRC)/dfs.cpp maze.o
$(CXX) $(CXXFLAGS) -o $@ $^
bfs: $(SRC)/bfs.cpp maze.o
$(CXX) $(CXXFLAGS) -o $@ $^
greedy: $(SRC)/greedy.cpp maze.o
$(CXX) $(CXXFLAGS) -o $@ $^
a_star: $(SRC)/a_star.cpp maze.o
$(CXX) $(CXXFLAGS) -o $@ $^
maze.o: $(SRC)/maze.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
# unit test
test_maze: $(MAZEOBJ) $(SRC)/utest/test_maze.cpp
$(CXX) $(CXXFLAGS) -o $@ $^
clean:
rm -rf $(TARGETS) $(OBJS) test_maze *dSYM