not executable
[c11concurrency-benchmarks.git] / gdax-orderbook-hpp / demo / Makefile
1 INCDIRS = -I ..
2 INCDIRS += -I ./dependencies/libcds-2.3.2
3 INCDIRS += -I ./dependencies/rapidjson-1.1.0/include
4 INCDIRS += -I ./dependencies/websocketpp-0.7.0
5
6 CDSLIBDIR = ./dependencies/libcds-2.3.2/build-release/bin
7
8 LIBS = -lboost_system # needed for boost::asio, used by websocketpp
9                       # according to https://groups.google.com/forum/#!topic/websocketpp/Ou30S05FKoM
10                       # one could use standalone Asio from think-async.com
11 LIBS += -lpthread
12 LIBS += -lssl # needed for websocketpp's TLS support (req'd by GDAX)
13 LIBS += -lcrypto # needed for websocketpp's TLS support (req'd by GDAX)
14 LIBS += -lcds
15
16 test: demo
17         LD_LIBRARY_PATH=$(CDSLIBDIR) ./demo
18
19 debug: demo
20         LD_LIBRARY_PATH=$(CDSLIBDIR) gdb ./demo
21
22 demo: demo.cpp ../gdax-orderbook.hpp \
23       | dependencies/libcds-2.3.2/build-release/bin/libcds.so \
24         dependencies/rapidjson-1.1.0 \
25         dependencies/websocketpp-0.7.0
26         clang++ demo.cpp -std=c++11 -o demo $(INCDIRS) -L $(CDSLIBDIR) $(LIBS)
27
28 dependencies/libcds-2.3.2/build-release/bin/libcds.so: \
29                 | dependencies/libcds-2.3.2
30         cd dependencies/libcds-2.3.2 ; if [ ! -d build-release ]; then mkdir build-release; fi
31         cd dependencies/libcds-2.3.2/build-release ; cmake -DCMAKE\_BUILD_TYPE=RELEASE ../
32         cd dependencies/libcds-2.3.2/build-release ; make -j4
33
34 dependencies/libcds-2.3.2: | dependencies/libcds-2.3.2.tar.gz
35         #tar xzvf dependencies/libcds-2.3.2.tar.gz -C dependencies
36
37 dependencies/libcds-2.3.2.tar.gz: dependencies
38         #wget -O $@ https://github.com/khizmax/libcds/archive/v2.3.2.tar.gz
39
40
41 dependencies/rapidjson-1.1.0: | dependencies/rapidjson-1.1.0.tar.gz
42         #tar xzvf dependencies/rapidjson-1.1.0.tar.gz -C dependencies
43
44 dependencies/rapidjson-1.1.0.tar.gz: dependencies
45         #wget -O $@ https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz
46
47
48 dependencies/websocketpp-0.7.0: | dependencies/websocketpp-0.7.0.tar.gz
49         #tar xzvf dependencies/websocketpp-0.7.0.tar.gz -C dependencies
50
51 dependencies/websocketpp-0.7.0.tar.gz: dependencies
52         #wget -O $@ https://github.com/zaphoyd/websocketpp/archive/0.7.0.tar.gz
53
54
55 dependencies:
56         #mkdir dependencies
57
58 clean:
59         rm -rf demo dependencies/libcds-2.3.2.tar.gz dependencies/rapidjson-1.1.0.tar.gz dependencies/websocketpp-0.7.0.tar.gz     #dependencies