-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 1.04 KB
/
Makefile
File metadata and controls
31 lines (24 loc) · 1.04 KB
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
.PHONY: generate build
MKDIR_P = mkdir -p
generate_build_folder:
@${MKDIR_P} builds
@echo "[OK] Build folder exists"
generate: generate_build_folder
@go generate ./...
@echo "[OK] Files added to embed box!"
security:
@gosec ./...
@echo "[OK] Go security check was completed!"
build_cross: generate
@env GOOS=windows GOARCH=amd64 go build -ldflags "-extldflags '-static' -X main.GitCommit=$CI_COMMIT_SHA" -o builds/useEmbedded.exe
@rm *syso
@echo "[OK] Windows build was created!"
@env GOOS=darwin GOARCH=amd64 go build -ldflags "-extldflags '-static' -X main.GitCommit=$CI_COMMIT_SHA" -o builds/useEmbedded_mac
@echo "[OK] Mac build was created!"
@env GOOS=linux GOARCH=ppc64le go build -ldflags "-extldflags '-static' -X main.GitCommit=$CI_COMMIT_SHA" -o builds/useEmbedded_ppc
@echo "[OK] Linux(ppc) build was created!"
build: build_cross
@env OOS=linux GOARCH=amd64 go build -ldflags "-extldflags '-static' -X main.GitCommit=$CI_COMMIT_SHA" -o builds/useEmbedded
@echo "[OK] Linux build was created!"
run: build
@./builds/useEmbedded