serve/Makefile
2018-10-22 17:01:08 +02:00

26 lines
456 B
Makefile

BINARY := serve
SOURCEDIR=.
SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
SRC_BIN :="${SOURCEDIR}/${BINARY}"
DST_BIN :="/usr/local/bin/${BINARY}"
.DEFAULT_GOAL := $(BINARY)
$(BINARY): $(SOURCES)
go get -t ./...
go build ${LDFLAGS} -o ${BINARY}
.PHONY: install
install:
scp ${SRC_BIN} ${DST_BIN}
.PHONY: uninstall
uninstall:
if ! [ -f ${DST_BIN} ] ; then rm ${DST_BIN} ; fi
.PHONY: clean
clean:
if [ -f ${BINARY} ] ; then rm ${BINARY} ; fi