-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
33 lines (24 loc) · 839 Bytes
/
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
CC = g++
CPPVER = c++20
SRC = src
FLAGS = -Wall -Wextra -Werror
OPTI = -O3
INC = $(PWD)/include
PROF = -O0 -pg
DEBUG = -g
rel: FLAGS += $(OPTI)
rel: order-book
profile: FLAGS += $(PROF)
profile: order-book
debug: FLAGS += $(DEBUG)
debug: order-book
order-book: itch_reader.o order_book.o main.o
$(CC) -std=$(CPPVER) $(FLAGS) $(SRC)/itch_reader.o $(SRC)/order_book.o $(SRC)/main.o -o order-book -lglog
main.o: $(SRC)/main.cpp
$(CC) -std=$(CPPVER) -c -I$(INC) $(FLAGS) $(SRC)/main.cpp -o $(SRC)/main.o
order_book.o: $(SRC)/order_book.cpp
$(CC) -std=$(CPPVER) -c -I$(INC) $(FLAGS) $(SRC)/order_book.cpp -o $(SRC)/order_book.o
itch_reader.o: $(SRC)/itch_reader.cpp
$(CC) -std=$(CPPVER) -c -I$(INC) $(FLAGS) $(SRC)/itch_reader.cpp -o $(SRC)/itch_reader.o
clean:
rm --verbose --force $(SRC)/*.o *.out callgrind.out.* order-book