-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 1 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
build: clean swagger-spec go-build package
build-arm-linux: clean swagger-spec go-build-arm-linux package
build-arm64-linux: clean swagger-spec go-build-arm64-linux package
.PHONY: clean
clean:
rm -f work-log
rm -f work-log.zip
.PHONY: swagger-spec
swagger-spec:
# Needs go-swagger
SWAGGER_GENERATE_EXTENSION="false" ./go-swagger generate spec -o ./swagger-ui/swagger.json
.PHONY: go-build
go-build:
go build
.PHONY: go-build-arm-linux
go-build-arm-linux:
# Needs ARM compiler (gcc-arm-linux-gnueabihf)
CC=arm-linux-gnueabihf-gcc GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=1 go build
.PHONY: go-build-arm64-linux
go-build-arm64-linux:
# Needs ARM64 compiler (gcc-aarch64-linux-gnu)
CC=aarch64-linux-gnu-gcc GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build
.PHONY: package
package:
zip work-log.zip \
work-log \
config/config.ini.example \
config/localizations/*.* \
resources/css/*.* \
resources/font/*.* \
resources/img/*.* \
resources/js/*.* \
scripts/db/*.* \
swagger-ui/*.* \
templates/*.*