-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
59 lines (44 loc) · 1.53 KB
/
Copy pathmakefile
File metadata and controls
59 lines (44 loc) · 1.53 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
.DEFAULT_GOAL := help
SRC_DIR = src
STRUCT_DIR = src/structures
TRAFFIC_DIR = src/trafficAPI
DRIVER_DIR = src/drivers
IDIR = include
CXX = g++
CXXFLAGS = -Wall -I $(IDIR)
SRC = $(wildcard $(SRC_DIR)/*.cpp $(STRUCT_DIR)/*.cpp $(TRAFFIC_DIR)/*.cpp)
TAREFA1 = $(wildcard $(SRC_DIR)/*.cpp $(STRUCT_DIR)/*.cpp $(TRAFFIC_DIR)/*.cpp $(DRIVER_DIR)/tarefa1.cpp)
TAREFA2 = $(wildcard $(SRC_DIR)/*.cpp $(STRUCT_DIR)/*.cpp $(TRAFFIC_DIR)/*.cpp $(DRIVER_DIR)/tarefa2.cpp)
TAREFA3 = $(wildcard $(SRC_DIR)/*.cpp $(STRUCT_DIR)/*.cpp $(TRAFFIC_DIR)/*.cpp $(DRIVER_DIR)/tarefa3.cpp)
ARGS = gen data/city-1 -p
MODE = -p
.PHONY: build help run clean
all: tarefa1 tarefa2 tarefa3
tarefa1: buildtarefa1 runtarefa1 ## Build and run tarefa1
tarefa2: buildtarefa2 runtarefa2 ## Build and run tarefa2
tarefa3: buildtarefa3 runtarefa3 ## Build and run tarefa3
build: $(SRC)
$(CXX) $(CXXFLAGS) -o out $(SRC)
buildtarefa1: $(TAREFA1)
$(CXX) $(CXXFLAGS) -o tarefa1 $(TAREFA1)
runtarefa1:
./tarefa1
buildtarefa2: $(TAREFA2)
$(CXX) $(CXXFLAGS) -o tarefa2 $(TAREFA2)
runtarefa2:
./tarefa2
buildtarefa3: $(TAREFA3)
$(CXX) $(CXXFLAGS) -o tarefa3 $(TAREFA3)
runtarefa3:
./tarefa3
help: ## Show this help
@./scripts/help.sh $(MAKEFILE_LIST)
graphgen: ## Generates the city graph
python extras/graphgen/graphgen.py $(ARGS)
graphread: ## Reads the city graph
python extras/graphgen/graphgen.py read data/city-1 -p
test:
$(CXX) $(CXXFLAGS) -o test $(wildcard ./*.cpp)
./test
clean: ## Clean created files
rm -f $(wildcard ./*.exe) $(wildcard ./*out*) $(wildcard ./tarefa*)