Makefile 345 B

123456789101112131415161718192021222324252627282930
  1. CXX:=go
  2. GOBUILD:=$(CXX) build
  3. GOCLEAN:=$(CXX) clean
  4. PROG:= strlst
  5. SOURCES:= strlst.go config.go commands.go
  6. all: build run
  7. build:
  8. $(GOBUILD) $(SOURCES)
  9. release:
  10. $(GOBUILD) -ldflags="-s -w" $(SOURCES)
  11. install:
  12. cp $(PROG) /usr/local/bin
  13. uninstall:
  14. rm -f /usr/local/bin/$(PROG)
  15. run:
  16. ./$(PROG)
  17. clean:
  18. $(GOCLEAN)
  19. test:
  20. ./$(PROG) list