mirror of
https://github.com/pikami/cosmium.git
synced 2024-11-28 08:27:37 +00:00
Added Makefile
This commit is contained in:
parent
03623e5a82
commit
1e461d3548
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
dist/
|
31
Makefile
Normal file
31
Makefile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
GOCMD=go
|
||||||
|
GOBUILD=$(GOCMD) build
|
||||||
|
GOTEST=$(GOCMD) test
|
||||||
|
GOCLEAN=$(GOCMD) clean
|
||||||
|
|
||||||
|
BINARY_NAME=codium
|
||||||
|
|
||||||
|
DIST_DIR=dist
|
||||||
|
|
||||||
|
all: test build-all
|
||||||
|
|
||||||
|
build-all: build-darwin-arm64 build-linux-amd64
|
||||||
|
|
||||||
|
build-darwin-arm64:
|
||||||
|
@echo "Building macOS binary..."
|
||||||
|
@GOOS=darwin GOARCH=arm64 $(GOBUILD) -o $(DIST_DIR)/$(BINARY_NAME)-darwin-arm64 .
|
||||||
|
|
||||||
|
build-linux-amd64:
|
||||||
|
@echo "Building Linux binary..."
|
||||||
|
@GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(DIST_DIR)/$(BINARY_NAME)-linux-amd64 .
|
||||||
|
|
||||||
|
test:
|
||||||
|
@echo "Running unit tests..."
|
||||||
|
@$(GOTEST) -v ./...
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo "Cleaning up..."
|
||||||
|
@$(GOCLEAN)
|
||||||
|
@rm -rf $(DIST_DIR)
|
||||||
|
|
||||||
|
.PHONY: all test build-all build-macos build-linux clean
|
Loading…
Reference in New Issue
Block a user