Skip to content

Commit

Permalink
build: add make file
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Jun 18, 2021
1 parent c7ef68e commit a55d3b6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ Makefile
bc_demo
bc_demo_test
cmake_install.cmake
tree.dot
!Makefile
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_DIR=output
PACKAGE_NAME=tequila
BINARY_LINUX=$(BINARY_DIR)/$(PACKAGE_NAME)_linux
BINARY_MACOS=$(BINARY_DIR)/$(PACKAGE_NAME)_macos
BINARY_WINDOWS=$(BINARY_DIR)/$(PACKAGE_NAME)_windows.exe

all: clean build
build: build-linux build-windows build-macos
test:
# make build-plugins
CGO_ENABLED=0 $(GOTEST) -v ./...
clean:
$(GOCLEAN)
rm -rf $(BINARY_DIR)
run:
$(GOBUILD) -o $(BINARY_DIR) -v ./...
./$(BINARY_DIR)
changelog:
conventional-changelog -p angular -i CHANGELOG.md -s -r 0

build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_LINUX) -v
build-windows:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_WINDOWS) -v
build-macos:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_MACOS) -v

0 comments on commit a55d3b6

Please sign in to comment.