This repository has been archived by the owner on Feb 8, 2021. It is now read-only.
forked from gonium/gosdm630
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (49 loc) · 1.39 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
all: build
build: assets
@echo "Building for host platform"
@gb build all
@echo "Building binary for Raspberry Pi"
@GOOS=linux GOARCH=arm GOARM=5 gb build all
@echo "Created binaries:"
@ls -1 bin
assets:
@echo "Generating embedded assets"
@gb generate src/github.com/gonium/gosdm630/http.go
release-build: test clean assets
@echo "Building binaries..."
@echo "... for Linux/32bit"
@GOOS=linux GOARCH=386 gb build all
@echo "... for Linux/64bit"
@GOOS=linux GOARCH=amd64 gb build all
@echo "... for Raspberry Pi/Linux"
@GOOS=linux GOARCH=arm GOARM=5 gb build all
@echo "... for Mac OS/64bit"
@GOOS=darwin GOARCH=amd64 gb build all
@echo "... for Windows/32bit"
@GOOS=windows GOARCH=386 gb build all
@echo "... for Linux/64bit"
@GOOS=windows GOARCH=amd64 gb build all
@echo
@echo "Created binaries:"
@ls -1 bin
release: release-build
@echo "Starting packaging"
@echo "... for Linux"
@zip sdm630-linux-386 bin/*-linux-386*
@zip sdm630-linux-amd64 bin/*-linux-amd64
@zip sdm630-linux-arm bin/*-linux-arm*
@echo "... for Mac OS"
@zip sdm630-darwin-amd64 bin/*-darwin-amd64
@echo "... for Windows"
@zip sdm630-windows-386 bin/*-windows-386*
test:
@echo "Running testsuite"
@gb test
clean:
@rm -rf bin/ pkg/ *.zip
dep:
@echo "Installing GB build tool"
@go get github.com/constabulary/gb/...
@echo "Installing embed tool"
@go get github.com/aprice/embed/cmd/embed
.PHONY: all build clean