ledisdb/Makefile

40 lines
1.1 KiB
Makefile
Raw Normal View History

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
2017-03-12 13:05:35 +03:00
all: build
2014-07-20 15:03:00 +04:00
build:
2017-03-15 10:07:17 +03:00
go build -o bin/ledis-server -tags '$(GO_BUILD_TAGS)' cmd/ledis-server/*
go build -o bin/ledis-cli -tags '$(GO_BUILD_TAGS)' cmd/ledis-cli/*
2017-03-12 13:05:35 +03:00
go build -o bin/ledis-benchmark -tags '$(GO_BUILD_TAGS)' cmd/ledis-benchmark/*
go build -o bin/ledis-dump -tags '$(GO_BUILD_TAGS)' cmd/ledis-dump/*
go build -o bin/ledis-load -tags '$(GO_BUILD_TAGS)' cmd/ledis-load/*
go build -o bin/ledis-repair -tags '$(GO_BUILD_TAGS)' cmd/ledis-repair/*
2014-07-20 15:03:00 +04:00
test:
go test --race -tags '$(GO_BUILD_TAGS)' -timeout 2m $$(go list ./... | grep -v -e /vendor/)
2017-03-12 13:05:35 +03:00
2015-02-05 04:39:18 +03:00
clean:
2017-03-12 13:05:35 +03:00
go clean -i ./...
2015-02-05 04:39:18 +03:00
fmt:
gofmt -w -s . 2>&1 | grep -vE 'vendor' | awk '{print} END{if(NR>0) {exit 1}}'
sync_vendor:
@which dep >/dev/null || go get -u github.com/golang/dep/cmd/dep
2018-03-30 04:43:38 +03:00
dep ensure
2017-03-12 13:05:35 +03:00
update_vendor:
@which dep >/dev/null || go get -u github.com/golang/dep/cmd/dep
2018-03-30 04:43:38 +03:00
dep ensure -update