2020-03-15 23:48:37 +00:00
|
|
|
.DEFAULT_GOAL := build
|
|
|
|
|
|
|
|
build:
|
|
|
|
go build
|
|
|
|
|
|
|
|
pi:
|
2020-04-03 13:26:06 +01:00
|
|
|
env GOOS=linux GOARCH=arm GOARM=5 go build -o nas-pi
|
2020-03-15 23:48:37 +00:00
|
|
|
|
2020-03-31 01:16:12 +01:00
|
|
|
small:
|
|
|
|
go build -ldflags="-s -w"
|
2020-04-03 13:38:21 +01:00
|
|
|
upx --brute nas -9 --no-progress
|
2020-03-31 01:16:12 +01:00
|
|
|
|
|
|
|
small_pi:
|
2020-04-03 13:26:06 +01:00
|
|
|
env GOOS=linux GOARCH=arm GOARM=5 go build -o nas-arm -ldflags="-s -w"
|
2020-04-03 13:38:21 +01:00
|
|
|
upx --brute nas-arm -9 --no-progress
|
2020-03-31 01:16:12 +01:00
|
|
|
|
2020-03-15 23:48:37 +00:00
|
|
|
run:
|
2020-04-03 13:26:06 +01:00
|
|
|
go run webserver.go
|
|
|
|
|
|
|
|
test:
|
|
|
|
go test ./... -cover
|
|
|
|
|
2020-04-03 13:38:21 +01:00
|
|
|
dist: clean small small_pi
|
2020-04-03 13:26:06 +01:00
|
|
|
mkdir build
|
|
|
|
mv nas* build
|
2020-04-03 13:38:21 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf build
|