-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (53 loc) · 1.75 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ========== Run "make help" to see the available commands ==========
CODE = src
SERVER = $(CODE)/server
CLIENT = $(CODE)/client
COMMON = $(CODE)/common
HEADER = $(CLIENT)/include/*.hpp $(SERVER)/include/*.hpp include/*.hpp
SOURCE = $(CLIENT)/*.cpp $(SERVER)/*.cpp $(COMMON)/*.cpp
OBJS = $(CLIENT)/*.o $(SERVER)/*.o $(COMMON)/*.o
TARGET = travelMonitor
TARGET2 = Monitor
SCRIPTS = create_infiles.sh
# Run Parameters
BUFFSZ = 64
NUMBER = 9
BLOOMSZ = 1000
INDIR = input_dir/
INFILE = citizenRecordsFile
BINDIR = bin/
LOGDIR = logs/
all:
$(MAKE) -C $(SERVER)
$(MAKE) -C $(CLIENT)
$(TARGET):
$(MAKE) -C $(SERVER)
$(TARGET2):
$(MAKE) -C $(CLIENT)
clean:
$(MAKE) clean -C $(SERVER)
$(MAKE) clean -C $(CLIENT)
cleanFull:
$(MAKE) clean -C $(SERVER)
$(MAKE) clean -C $(CLIENT)
rm -rf $(INDIR) $(BINDIR) $(LOGDIR)
count:
wc -l -w $(SOURCE) $(HEADER) $(SCRIPTS)
run:
./$(TARGET) -m $(NUMBER) -b $(BUFFSZ) -s $(BLOOMSZ) -i $(INDIR)
scriptRun:
./$(SCRIPTS) $(INFILE) $(INDIR) $(NUMBER)
valgrind:
valgrind --leak-check=full --show-leak-kinds=all --show-reachable=yes --trace-children=yes --track-origins=yes ./$(TARGET) -m $(NUMBER) -b $(BUFFSZ) -s $(BLOOMSZ) -i $(INDIR)
help:
@echo Options:
@printf "make (all) %14s -- build $(TARGET) and $(TARGET2)\n"
@printf "make $(TARGET) %6s -- build $(TARGET)\n"
@printf "make $(TARGET2) %12s -- build $(TARGET2)\n"
@printf "make clean %14s -- delete application\n"
@printf "make cleanFull %10s -- delete application and its data\n"
@printf "make count %14s -- project line and words accounting\n"
@printf "make run %16s -- run $(TARGET) test\n"
@printf "make scriptRun %10s -- run $(SCRIPTS) test\n"
@printf "make valgrind %11s -- run $(TARGET) test with valgrind enabled\n"
@printf "make help %15s -- view this help message\n"