commit | author | age
|
d14f48
|
1 |
OS=$(shell uname) |
83c048
|
2 |
CXX=g++ |
353657
|
3 |
CXXFLAGS=-std=c++20 |
JG |
4 |
DEV=1 |
|
5 |
TEST=1 |
|
6 |
|
|
7 |
ifeq ($(DEV),1) |
|
8 |
CXXFLAGS += -Wall -g |
|
9 |
else |
|
10 |
CXXFLAGS += -O3 -flto |
|
11 |
endif |
83c048
|
12 |
|
d14f48
|
13 |
ifneq ($(OS),Darwin) |
JG |
14 |
CXXFLAGS += -static |
|
15 |
endif |
83c048
|
16 |
|
353657
|
17 |
ifeq ($(TEST),1) |
JG |
18 |
CXXFLAGS += -DTEST_EXCHANGE |
|
19 |
endif |
|
20 |
|
83c048
|
21 |
json=json.o |
JG |
22 |
ws=easywsclient/easywsclient.o |
|
23 |
main=${json} ${ws} protocol.o book.o |
|
24 |
|
|
25 |
default: test click bot |
|
26 |
|
|
27 |
test: test.o strat.o ${main} |
|
28 |
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ |
|
29 |
|
|
30 |
click: click.o ${main} |
|
31 |
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ |
|
32 |
|
|
33 |
bot: bot.o strat.o ${main} |
|
34 |
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ |
|
35 |
|
|
36 |
%.o: %.cpp |
|
37 |
${CXX} ${CXXFLAGS} -c -o $@ $^ |
|
38 |
|
|
39 |
.PHONY: clean |
|
40 |
clean: |
|
41 |
rm -f ${main} test click bot |