serve/Makefile

26 lines
456 B
Makefile
Raw Normal View History

2018-10-22 15:01:08 +00:00
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