2016-09-06 16:39:09 +00:00
|
|
|
CXX=g++
|
|
|
|
CXXFLAGS=-O2 -Wall
|
|
|
|
CXXFLAGS2=-std=c++1y -Itmp $(CXXFLAGS)
|
|
|
|
SANDSTORM_CAPNP_DIR=/opt/sandstorm/latest/usr/include
|
|
|
|
|
|
|
|
.PHONEY: all clean dev
|
|
|
|
|
2016-10-27 15:53:53 +00:00
|
|
|
package.spk: server sandstorm-pkgdef.capnp
|
2016-09-09 12:50:36 +00:00
|
|
|
spk pack --keyring="drawio.key" package.spk
|
2016-09-06 16:39:09 +00:00
|
|
|
|
2016-10-27 15:53:53 +00:00
|
|
|
dev: server sandstorm-pkgdef.capnp
|
2016-09-06 16:39:09 +00:00
|
|
|
spk dev
|
|
|
|
|
|
|
|
clean:
|
2016-10-27 15:53:53 +00:00
|
|
|
rm -rf tmp server package.spk
|
2016-09-06 16:39:09 +00:00
|
|
|
|
|
|
|
tmp/genfiles:
|
|
|
|
@mkdir -p tmp
|
|
|
|
capnp compile --src-prefix=$(SANDSTORM_CAPNP_DIR) -oc++:tmp $(SANDSTORM_CAPNP_DIR)/sandstorm/*.capnp
|
|
|
|
@touch tmp/genfiles
|
|
|
|
|
|
|
|
server: tmp/genfiles server.c++
|
2016-10-27 15:53:53 +00:00
|
|
|
$(CXX) -static server.c++ tmp/sandstorm/*.capnp.c++ -o server $(CXXFLAGS2) `pkg-config capnp-rpc --cflags --libs`
|