2014-07-28 08:46:17 +04:00
|
|
|
INSTALL_PATH ?= $(CURDIR)
|
|
|
|
|
2014-08-27 10:31:46 +04:00
|
|
|
$(shell ./tools/build_config.sh build_config.mk $INSTALL_PATH)
|
2014-07-28 08:46:17 +04:00
|
|
|
|
|
|
|
include build_config.mk
|
|
|
|
|
|
|
|
export CGO_CFLAGS
|
|
|
|
export CGO_CXXFLAGS
|
|
|
|
export CGO_LDFLAGS
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
export DYLD_LIBRARY_PATH
|
|
|
|
export GO_BUILD_TAGS
|
|
|
|
|
2014-07-20 15:03:00 +04:00
|
|
|
all: build
|
|
|
|
|
|
|
|
build:
|
2015-03-12 06:32:33 +03:00
|
|
|
$(GO) install -tags 'linenoise $(GO_BUILD_TAGS)' ./...
|
2014-07-20 15:03:00 +04:00
|
|
|
|
2015-03-14 05:57:18 +03:00
|
|
|
build_lmdb:
|
2015-03-12 06:32:33 +03:00
|
|
|
$(GO) install -tags 'linenoise $(GO_BUILD_TAGS) lmdb' ./...
|
|
|
|
|
2014-07-20 15:03:00 +04:00
|
|
|
test:
|
2015-02-03 05:17:15 +03:00
|
|
|
$(GO) test --race -tags '$(GO_BUILD_TAGS)' ./...
|
2014-09-04 08:53:19 +04:00
|
|
|
|
2015-03-14 05:57:18 +03:00
|
|
|
test_lmdb:
|
2015-03-11 06:54:16 +03:00
|
|
|
$(GO) test --race -tags '$(GO_BUILD_TAGS) lmdb' ./...
|
|
|
|
|
2015-02-03 05:17:15 +03:00
|
|
|
test_ledis:
|
|
|
|
$(GO) test --race -tags '$(GO_BUILD_TAGS)' ./ledis
|
|
|
|
|
|
|
|
test_server:
|
|
|
|
$(GO) test --race -tags '$(GO_BUILD_TAGS)' ./server
|
|
|
|
|
|
|
|
test_store:
|
|
|
|
$(GO) test --race -tags '$(GO_BUILD_TAGS)' ./store
|
|
|
|
|
|
|
|
test_rpl:
|
|
|
|
$(GO) test --race -tags '$(GO_BUILD_TAGS)' ./rpl
|
2015-02-05 04:39:18 +03:00
|
|
|
|
2015-03-12 06:32:33 +03:00
|
|
|
clean:
|
2015-05-03 06:19:19 +03:00
|
|
|
rm -rf Godeps/_workspace/pkg/
|
2015-03-12 06:32:33 +03:00
|
|
|
$(GO) clean -i ./...
|
|
|
|
|
2015-02-05 04:39:18 +03:00
|
|
|
fmt:
|
|
|
|
go fmt ./...
|