2015-12-02 21:27:29 +08:00
|
|
|
BINARY = weed
|
2015-11-18 10:03:23 +08:00
|
|
|
|
2015-12-02 21:27:29 +08:00
|
|
|
GO_FLAGS = #-v
|
|
|
|
SOURCE_DIR = ./go/weed/
|
2015-11-18 10:03:23 +08:00
|
|
|
|
2015-12-02 21:27:29 +08:00
|
|
|
all: build
|
2015-11-18 10:03:23 +08:00
|
|
|
|
2015-12-02 21:27:29 +08:00
|
|
|
.PHONY : clean deps build linux
|
2015-11-18 10:03:23 +08:00
|
|
|
|
2015-12-02 21:27:29 +08:00
|
|
|
clean:
|
|
|
|
go clean -i $(GO_FLAGS) $(SOURCE_DIR)
|
|
|
|
rm -f $(BINARY)
|
|
|
|
|
|
|
|
deps:
|
|
|
|
go get $(GO_FLAGS) -d $(SOURCE_DIR)
|
|
|
|
|
|
|
|
build: deps
|
|
|
|
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)
|