-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (31 loc) · 814 Bytes
/
Makefile
File metadata and controls
38 lines (31 loc) · 814 Bytes
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
all:
make docs
make linux
make darwin
make unix
make windows
binaries:
make linux
make darwin
make unix
make windows
docs:
cd src && ~/go/bin/swag init
echo "$$(echo "<script>SWAGGER_JSON=$$(cat src/docs/swagger.json);</script>"; cat src/docs/index.orig.html)" > src/docs/index.html
mkdir -p dist/docs
cp src/docs/index.html dist/docs
cp src/docs/swagger.* dist/docs
linux:
GOOS=linux GOARCH=amd64 \
go build -ldflags "${LDFLAGS}" -o dist/agent.linux src/main.go
darwin:
GOOS=darwin GOARCH=amd64 \
go build -ldflags "${LDFLAGS}" -o dist/agent.darwin src/main.go
unix:
GOOS=freebsd GOARCH=amd64 \
go build -ldflags "${LDFLAGS}" -o dist/agent.unix src/main.go
windows:
GOOS=windows GOARCH=amd64 \
go build -ldflags "${LDFLAGS}" -o dist/agent.windows.exe src/main.go
clean:
rm -rf dist/*