# vim: shiftwidth=4 tabstop=4 noexpandtab DESTDIR="" # leave empty for the current system or provide a fakeroot here PREFIX="/usr" .PHONY: all clean install debug all: # some recommended options for Go building (https://wiki.archlinux.org/title/Go_package_guidelines) export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" mkdir -p build go build -o build/birdscan ./... clean: rm -rf build install: all install -Dm 755 build/birdscan $(DESTDIR)$(PREFIX)/bin/birdscan debug: all go run ./... -c ../config/default.json -d true