-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
26 lines (18 loc) · 1.05 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
all: wrapper onetimeserver-go install-local
wrapper: wrapper/wrapper.c wrapper/wrapper
gcc -Wall -g -o wrapper/wrapper wrapper/wrapper.c
onetimeserver-go:
go install github.com/osheroff/onetimeserver/...
DIR=${HOME}/.onetimeserver/$(shell uname -s)-$(shell uname -m)
release: onetimeserver-crossbuild
(cd onetimeserver-binaries && git commit -am 'update onetimeserver-bins' && git push)
onetimeserver-crossbuild:
env GOOS=linux GOARCH=386 go build -o onetimeserver-binaries/onetimeserver-go/linux/onetimeserver-go cmd/onetimeserver-go/main.go
env GOOS=darwin GOARCH=amd64 go build -o onetimeserver-binaries/onetimeserver-go/darwin/onetimeserver-go cmd/onetimeserver-go/main.go
install-local:
rm -Rf $(DIR)
mkdir -p $(DIR)
cp wrapper/wrapper $(DIR)
cp -avp ${GOPATH}/bin/onetimeserver-go $(DIR)
test -d ${HOME}/.onetimeserver && cp onetimeserver-binaries/mysql/manifest.json ${HOME}/.onetimeserver/bin/mysql/manifest.json
test -d ${HOME}/.onetimeserver && cp onetimeserver-binaries/mariadb/manifest.json ${HOME}/.onetimeserver/bin/mariadb/manifest.json