initial commit
This commit is contained in:
commit
55f707eb22
4 changed files with 111 additions and 0 deletions
25
Makefile
Normal file
25
Makefile
Normal file
|
@ -0,0 +1,25 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue