@ -14,6 +14,7 @@
GO_VERSION := 1.0.3
LEVELDB_VERSION := 1.7.0
PROTOCOL_BUFFERS_VERSION := 2.4.1
SNAPPY_VERSION := 1.0.5
OVERLAY_ROOT := ${ HOME } /overlay_root
@ -24,7 +25,7 @@ export CFLAGS := $(CFLAGS) -I$(OVERLAY_ROOT)/include
export CXXFLAGS := $( CXXFLAGS) -I$( OVERLAY_ROOT) /include
export CPPFLAGS := $( CPPFLAGS) -I$( OVERLAY_ROOT) /include
export LDFLAGS := $( LDFLAGS) -L$( OVERLAY_ROOT) /lib
export CGO_CFLAGS := $( CFLAGS)
export CGO_CFLAGS := $( CFLAGS) -lsnappy
export CGO_LDFLAGS := $( LDFLAGS)
GO_GET := go get -u -v -x
@ -114,7 +115,7 @@ instrumentation-stamp: go source
leveldb : leveldb -stamp
leveldb-stamp : cc rsync leveldb -$( LEVELDB_VERSION ) .tar .gz overlay
leveldb-stamp : cc rsync leveldb -$( LEVELDB_VERSION ) .tar .gz snappy overlay
tar xzvf leveldb-$( LEVELDB_VERSION) .tar.gz
$( MAKE) -C leveldb-$( LEVELDB_VERSION)
rsync -av " leveldb- $( LEVELDB_VERSION) /include/ " " $( OVERLAY_ROOT) /include/ "
@ -128,7 +129,7 @@ leveldb-$(LEVELDB_VERSION).tar.gz: wget
levigo : levigo -stamp
levigo-stamp : leveldb go source
levigo-stamp : leveldb go snappy s ource
$( GO_GET) github.com/jmhodges/levigo
touch $@
@ -141,9 +142,23 @@ test: test-stamp
test-stamp : preparation source
cd ${ GOPATH } /src/github.com/prometheus
$( MAKE) build
$( MAKE) test
touch $@
snappy-$(SNAPPY_VERSION).tar.gz : wget
$( WGET) http://snappy.googlecode.com/files/snappy-$( SNAPPY_VERSION) .tar.gz
tar xzvf snappy-$( SNAPPY_VERSION) .tar.gz
cd snappy-$( SNAPPY_VERSION) && ./configure --prefix= " $( OVERLAY_ROOT) "
$( MAKE) -C snappy-$( SNAPPY_VERSION)
$( MAKE) -C snappy-$( SNAPPY_VERSION) install
snappy : snappy -stamp
tar xzvf snappy-$( SNAPPY_VERSION) .tar.gz
snappy-stamp : cc overlay rsync snappy -$( SNAPPY_VERSION ) .tar .gz
touch $@
source : source -stamp
source-stamp :
@ -156,8 +171,10 @@ clean:
-rm -rf " $( OVERLAY_ROOT) "
-rm -rf leveldb-$( LEVELDB_VERSION)
-rm -rf protobuf-$( PROTOCOL_BUFFERS_VERSION)
-rm -rf snappy-$( SNAPPY_VERSION)
-rm leveldb-$( LEVELDB_VERSION) .tar.gz
-rm protobuf-$( PROTOCOL_BUFFERS_VERSION) .tar.bz2
-rm snappy-$( SNAPPY_VERSION) .tar.gz
.PHONY : all bison build -dependencies cc clean go goprotobuf gorest instrumentation leveldb levigo mercurial overlay preparation protoc rsync source test wget
.PHONY : all bison build -dependencies cc clean go goprotobuf gorest instrumentation leveldb levigo mercurial overlay preparation protoc rsync snappy s ource test wget