update
This commit is contained in:
parent
f62751366b
commit
fca5d537a2
12
Makefile
12
Makefile
@ -13,7 +13,12 @@ UNAME_S := $(shell uname -s)
|
||||
BINARY_NAME := robotfs
|
||||
|
||||
.PHONY: all
|
||||
all: proto build
|
||||
all: deps proto build
|
||||
|
||||
.PHONY: deps
|
||||
deps:
|
||||
@echo "Installing project dependencies..."
|
||||
go install .
|
||||
|
||||
.PHONY: proto
|
||||
proto:
|
||||
@ -21,7 +26,7 @@ proto:
|
||||
protoc --go_out=. --go_opt=paths=source_relative pb/*.proto
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
build: deps proto
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
@echo "Building for MacOS..."
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(BINARY_NAME) ./
|
||||
@ -31,7 +36,7 @@ else
|
||||
endif
|
||||
|
||||
.PHONY: build-linux
|
||||
build-linux:
|
||||
build-linux: deps proto
|
||||
@echo "Building for Linux..."
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(BINARY_NAME) ./
|
||||
|
||||
@ -44,6 +49,7 @@ clean:
|
||||
help:
|
||||
@echo "Available targets:"
|
||||
@echo " all - Generate protobuf files and build for current platform (default)"
|
||||
@echo " deps - Install project dependencies"
|
||||
@echo " proto - Generate protobuf files"
|
||||
@echo " build - Build for current platform"
|
||||
@echo " build-linux - Build for linux platform"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user