-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
25 lines (19 loc) · 890 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
# You may override the following vars on the command line to suit
# your config.
CXX=clang++
CXXFLAGS=-O2 -Wall
# You generally should not modify these.
CXXFLAGS2=-std=c++1y -Itmp $(CXXFLAGS)
.PHONY: all clean
all: bin/sandstorm-tcp-listener-proxy
clean:
rm -rf bin tmp
bin/sandstorm-tcp-listener-proxy: tmp/genfiles sandstorm-tcp-listener-proxy-main.c++ sandstorm-tcp-listener-proxy.h
@mkdir -p bin
@$(CXX) sandstorm-tcp-listener-proxy-main.c++ tmp/sandstorm/*.capnp.c++ -o bin/sandstorm-tcp-listener-proxy -static $(CXXFLAGS2) `pkg-config capnp-rpc --cflags --libs`
@cp bin/sandstorm-tcp-listener-proxy example/bin/
tmp/genfiles: /opt/sandstorm/latest/usr/include/sandstorm/*.capnp
@echo "generating capnp files..."
@mkdir -p tmp
@capnp compile --src-prefix=/opt/sandstorm/latest/usr/include -oc++:tmp /opt/sandstorm/latest/usr/include/sandstorm/*.capnp
@touch tmp/genfiles