wip
1.PHONY: all build install test clean fmt lint help
2
3# Binary name
4BINARY_NAME=atscand
5INSTALL_PATH=$(GOPATH)/bin
6
7# Go commands
8GOCMD=go
9GOBUILD=$(GOCMD) build
10GOINSTALL=$(GOCMD) install
11GOCLEAN=$(GOCMD) clean
12GOTEST=$(GOCMD) test
13GOGET=$(GOCMD) get
14GOFMT=$(GOCMD) fmt
15GOMOD=$(GOCMD) mod
16GORUN=$(GOCMD) run
17
18# Default target
19all: build
20
21# Build the CLI tool
22build:
23 @echo "Building $(BINARY_NAME)..."
24 $(GOBUILD) -o $(BINARY_NAME) ./cmd/atscand
25
26# Install the CLI tool globally
27install:
28 @echo "Installing $(BINARY_NAME)..."
29 $(GOINSTALL) ./cmd/atscand
30
31run:
32 $(GORUN) cmd/atscand/main.go -verbose
33
34update-plcbundle:
35 GOPROXY=direct go get -u tangled.org/atscan.net/plcbundle@latest
36
37# Show help
38help:
39 @echo "Available targets:"
40 @echo " make build - Build the binary"
41 @echo " make install - Install binary globally"
42 @echo " make run - Run app"