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 |
ae7d00
|
15 |
else |
JG |
16 |
CXXFLAGS += -I/usr/local/opt/curl/include |
|
17 |
LDFLAGS += -L/usr/local/opt/curl/lib |
d14f48
|
18 |
endif |
83c048
|
19 |
|
353657
|
20 |
ifeq ($(TEST),1) |
JG |
21 |
CXXFLAGS += -DTEST_EXCHANGE |
|
22 |
endif |
|
23 |
|
83c048
|
24 |
ws=easywsclient/easywsclient.o |
ae7d00
|
25 |
main=${ws} json.o bom.o protocol.o book.o |
83c048
|
26 |
|
JG |
27 |
default: test click bot |
|
28 |
|
|
29 |
test: test.o strat.o ${main} |
|
30 |
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ |
|
31 |
|
|
32 |
click: click.o ${main} |
|
33 |
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ |
|
34 |
|
|
35 |
bot: bot.o strat.o ${main} |
|
36 |
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ |
|
37 |
|
|
38 |
%.o: %.cpp |
|
39 |
${CXX} ${CXXFLAGS} -c -o $@ $^ |
|
40 |
|
|
41 |
.PHONY: clean |
|
42 |
clean: |
|
43 |
rm -f ${main} test click bot |