24 lines
589 B
Makefile
24 lines
589 B
Makefile
|
DESTDIR ?= /usr
|
||
|
BUILDDIR ?= dist
|
||
|
|
||
|
all: client server
|
||
|
|
||
|
client ./bin/client/main.go:
|
||
|
mkdir -p $(BUILDDIR)/bin/
|
||
|
go build -o $(BUILDDIR)/bin/client ./bin/client/main.go
|
||
|
|
||
|
server ./bin/server/main.go:
|
||
|
mkdir -p $(BUILDDIR)/bin/
|
||
|
go build -o $(BUILDDIR)/bin/server ./bin/server/main.go
|
||
|
|
||
|
install:
|
||
|
install -d $(DESTDIR)/bin
|
||
|
install -m 755 $(BUILDDIR)/bin/client $(DESTDIR)/bin/burgerbackup-client
|
||
|
install -m 755 $(BUILDDIR)/bin/server $(DESTDIR)/bin/burgerbackup-server
|
||
|
|
||
|
uninstall:
|
||
|
rm -f $(DESTDIR)/bin/burgerbackup-client
|
||
|
rm -f $(DESTDIR)/bin/burgerbackup-server
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(BUILDDIR)
|