cosmium/Makefile

35 lines
746 B
Makefile
Raw Normal View History

2024-02-17 12:49:11 +00:00
GOCMD=go
GOBUILD=$(GOCMD) build
GOTEST=$(GOCMD) test
GOCLEAN=$(GOCMD) clean
2024-02-18 22:28:16 +00:00
BINARY_NAME=cosmium
2024-02-17 12:49:11 +00:00
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 .
2024-02-17 15:25:57 +00:00
generate-parser-nosql:
pigeon -o ./parsers/nosql/nosql.go ./parsers/nosql/nosql.peg
2024-02-17 12:49:11 +00:00
test:
@echo "Running unit tests..."
@$(GOTEST) -v ./...
clean:
@echo "Cleaning up..."
@$(GOCLEAN)
@rm -rf $(DIST_DIR)
2024-02-17 15:25:57 +00:00
.PHONY: all test build-all build-macos build-linux clean generate-parser-nosql