forked from glycerine/goq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (41 loc) · 1.78 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: all test clean goq-build ship chk testbuild installation
all: goq-build testbuild
goq-build:
# goq version gets its data here:
/bin/echo "package main" > gitcommit.go
/bin/echo "func init() { LASTGITCOMMITHASH = \"$(shell git rev-parse HEAD)\" }" >> gitcommit.go
gcc -o bin/faulter bin/faulter.c
cd schema; make
GO15VENDOREXPERIMENT=1 go build
GO15VENDOREXPERIMENT=1 go install
ship:
# this works when we want to ship
GO15VENDOREXPERIMENT=1 go build --ldflags '-extldflags "-static -lanl -lpthread"'
GO15VENDOREXPERIMENT=1 go install
testbuild:
GO15VENDOREXPERIMENT=1 go test -c -gcflags "-N -l" -v
test: goq
./goq --server &
./goq
debug:
# goq version gets its data here:
/bin/echo "package main" > gitcommit.go
/bin/echo "func init() { LASTGITCOMMITHASH = \"$(shell git rev-parse HEAD)\" }" >> gitcommit.go
GO15VENDOREXPERIMENT=1 go build -gcflags "-N -l"
GO15VENDOREXPERIMENT=1 go install -gcflags "-N -l"
clean:
rm -f *~ goq goq.test
chk:
netstat -an|grep 1776 | /usr/bin/tee
netstat -nuptl|grep 1776 | /usr/bin/tee
ps auxwwf| grep -v grep| grep goq
# installation is the one-time setup of the project, where we install a
# library we use, nanomsg. You don't need to 'make installation' if
# you already installed these manually.
installation:
# install our depenencies, nanomsg and capnproto
cd vendor/nanomsg; autoreconf -i && ./configure && sudo make install
# if you must hack on the schema, then you'll need to install the capnproto compiler as well. This needs a c++11 compiler.
# Note: on my mac, I had to unset the dynamic lib paths to get a clean build
# cd vendor/capnproto/c++; unset LD_LIBRARY_PATH; unset DYLD_LIBRARY_PATH; ./setup-autotools.sh && autoreconf -i && ./configure --prefix=$$(pwd)/../../install && make install
cd schema; go build; go install