import
This commit is contained in:
26
Makefile
Normal file
26
Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
.PHONY: all build clean daemon client install
|
||||
|
||||
all: build
|
||||
|
||||
build: daemon client
|
||||
|
||||
daemon:
|
||||
go build -o cremotedaemon ./daemon/cmd/cremotedaemon
|
||||
|
||||
client:
|
||||
go build -o cremote .
|
||||
|
||||
clean:
|
||||
rm -f cremote cremotedaemon
|
||||
|
||||
install: build
|
||||
@if [ -n "$(GOPATH)" ] && [ -d "$(GOPATH)/bin" ]; then \
|
||||
echo "Installing to $(GOPATH)/bin/"; \
|
||||
cp cremote $(GOPATH)/bin/; \
|
||||
cp cremotedaemon $(GOPATH)/bin/; \
|
||||
else \
|
||||
echo "GOPATH not set or $(GOPATH)/bin doesn't exist, installing to ~/.local/bin/"; \
|
||||
mkdir -p ~/.local/bin; \
|
||||
cp cremote ~/.local/bin/; \
|
||||
cp cremotedaemon ~/.local/bin/; \
|
||||
fi
|
Reference in New Issue
Block a user