Makefile 392 B

12345678910111213141516171819202122
  1. # Go parameters
  2. GOCMD=go
  3. GOBUILD=$(GOCMD) build
  4. GOCLEAN=$(GOCMD) clean
  5. GOTEST=$(GOCMD) test
  6. GOGET=$(GOCMD) get
  7. PROJECT_NAME=etcd-set
  8. BIN_DIR=/usr/sbin
  9. CP_CMD=/usr/bin/cp
  10. COMMAND=etcd-set
  11. all: build-go
  12. build-go:
  13. go build -o $(PROJECT_NAME)
  14. test:
  15. $(GOTEST) -v ./...
  16. install:build-go
  17. $(CP_CMD) $(COMMAND) $(DESTDIR)$(BIN_DIR)
  18. clean:
  19. $(GOCLEAN)
  20. rm -f $(PROJECT_NAME)