Makefile 635 B

123456789101112131415161718192021222324252627282930313233
  1. AUTHOR := "Ralph Giles <giles@thaumas.net>"
  2. PACKAGE := hello
  3. VERSION := 0.0.1
  4. ARCH := amd64
  5. OS := linux
  6. ACI := $(PACKAGE)-$(VERSION)-$(OS)-$(ARCH).aci
  7. all: $(ACI)
  8. clean:
  9. -acbuild end
  10. $(RM) $(ACI)
  11. $(RM) $(PACKAGE)
  12. $(PACKAGE): hello.go
  13. CGO_ENABLED=0 GOOS=linux go build -o $@ -a -tags netgo -ldflags '-w' .
  14. $(ACI): $(PACKAGE)
  15. acbuild begin
  16. acbuild set-name thaumas.net/$<
  17. acbuild copy $< /bin/$<
  18. acbuild set-exec /bin/$<
  19. acbuild port add www tcp 5000
  20. acbuild label add version $(VERSION)
  21. acbuild label add arc $(ARCH)
  22. acbuild label add os $(OS)
  23. acbuild annotation add authors $(AUTHOR)
  24. acbuild write $@
  25. acbuild end