DESTDIR="" # leave empty for the current system or provide a fakeroot here PREFIX="/usr" PROGRAM="webiot" .PHONY: all clean install debug all: # some recommended options for Go building: # https://wiki.archlinux.org/title/Go_package_guidelines mkdir -p build go build -o build/$(PROGRAM) *.go clean: rm -rf build install: all install -Dm 755 build/$(PROGRAM) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) install -Dm 644 config/default.json $(DESTDIR)/etc/$(PROGRAM)/config.json debug: go run *.go -c config/example.json