You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
439 B
28 lines
439 B
BINARY = weed
|
|
|
|
GO_FLAGS = -race #-v
|
|
SOURCE_DIR = ./go/weed/
|
|
|
|
all: build
|
|
|
|
.PHONY : clean deps build linux vet
|
|
|
|
clean:
|
|
go clean -i $(GO_FLAGS) $(SOURCE_DIR)
|
|
rm -f $(BINARY)
|
|
|
|
deps:
|
|
go get $(GO_FLAGS) -d $(SOURCE_DIR)
|
|
|
|
fmt:
|
|
gofmt -w -s ./go/
|
|
|
|
vet:
|
|
go vet ./go/...
|
|
|
|
build: deps fmt
|
|
go build $(GO_FLAGS) -o $(BINARY) $(SOURCE_DIR)
|
|
|
|
linux: deps
|
|
mkdir -p linux
|
|
GOOS=linux GOARCH=amd64 go build $(GO_FLAGS) -o linux/$(BINARY) $(SOURCE_DIR)
|