-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 683 Bytes
/
Makefile
File metadata and controls
36 lines (29 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
36
CC = g++
CFLAGS = -o3 -Wall -std=c++11
LIBS =
TESTLIBS = -lboost_unit_test_framework
SRC = src
TEST_DIR = test
OUT_DIR = bin
SOURCES = $(wildcard $(SRC)/*.cpp)
TESTS = $(SRC)/matchingEngine.cpp $(wildcard $(TEST_DIR)/*.cpp)
OBJS = bin/matching
OBJSTEST = bin/test_matching
DBFLAGS = -g
PRFFLAGS = -pg
MKDIR_P = mkdir -p
all: directories
$(CC) $(CFLAGS) $(SOURCES) -o $(OBJS) $(LIBS)
directories: $(OUT_DIR)
${OUT_DIR}:
${MKDIR_P} ${OUT_DIR}
.PHONY: test
test:
$(CC) $(CFLAGS) $(TESTS) -o $(OBJSTEST) $(LIBS) $(TESTLIBS)
./$(OBJSTEST)
prof:
$(CC) $(CFLAGS) $(PRFFLAGS) $(SOURCES) -o $(OBJS) $(LIBS)
memleak:
valgrind --leak-check=yes ./run.sh
clean:
rm -rf $(OUT_DIR)/