-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (26 loc) · 857 Bytes
/
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
GLIDE_GO_EXECUTABLE ?= go
VERSION ?= $(shell git describe --tags)
GOOS ?= solaris
GOARCH ?= amd64
all: get build
get:
glide up
build:
mkdir -p bin
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} ${GLIDE_GO_EXECUTABLE} build -o bin/znstord -ldflags "-X main.version=${VERSION} -extldflags '-static'" znstord.go
build-tests:
mkdir -p bin
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} ${GLIDE_GO_EXECUTABLE} test -c -o bin/zfs_test zfs/zfs_test.go
install: build
install -d ${DESTDIR}/opt/local/bin/
install -m 755 ./bin/znstord ${DESTDIR}/opt/local/bin/znstord
upload:
`ssh admin@${TEST_SRV} "mkdir -p /opt/local/bin/"
`scp bin/znstord admin@${TEST_SRV}/opt/local/bin/znstord`
upload-and-restart: upload
`ssh admin@{TEST_SRV} "sudo svcadm restart znstord"`
integration-test:
@echo "integration-test is comming"
clean:
rm -rf bin
.PHONY: all