Skip to content

Commit a55d3b6

Browse files
committed
build: add make file
1 parent c7ef68e commit a55d3b6

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ Makefile
4343
bc_demo
4444
bc_demo_test
4545
cmake_install.cmake
46+
tree.dot
47+
!Makefile

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Go parameters
2+
GOCMD=go
3+
GOBUILD=$(GOCMD) build
4+
GOCLEAN=$(GOCMD) clean
5+
GOTEST=$(GOCMD) test
6+
GOGET=$(GOCMD) get
7+
BINARY_DIR=output
8+
PACKAGE_NAME=tequila
9+
BINARY_LINUX=$(BINARY_DIR)/$(PACKAGE_NAME)_linux
10+
BINARY_MACOS=$(BINARY_DIR)/$(PACKAGE_NAME)_macos
11+
BINARY_WINDOWS=$(BINARY_DIR)/$(PACKAGE_NAME)_windows.exe
12+
13+
all: clean build
14+
build: build-linux build-windows build-macos
15+
test:
16+
# make build-plugins
17+
CGO_ENABLED=0 $(GOTEST) -v ./...
18+
clean:
19+
$(GOCLEAN)
20+
rm -rf $(BINARY_DIR)
21+
run:
22+
$(GOBUILD) -o $(BINARY_DIR) -v ./...
23+
./$(BINARY_DIR)
24+
changelog:
25+
conventional-changelog -p angular -i CHANGELOG.md -s -r 0
26+
27+
build-linux:
28+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_LINUX) -v
29+
build-windows:
30+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_WINDOWS) -v
31+
build-macos:
32+
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_MACOS) -v

0 commit comments

Comments
 (0)