-Makefile: added install,uninstall targets

-Bumped version to 0.7pre

Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
Russ Magee 2018-11-13 17:38:13 -08:00
parent 1d1feee476
commit d973c83e01
2 changed files with 34 additions and 2 deletions

View file

@ -1,9 +1,11 @@
.PHONY: info clean common client server passwd subpkgs
.PHONY: info clean common client server passwd subpkgs install uninstall
SUBPKGS = logger spinsult hkexnet herradurakex
TOOLS = hkexpasswd hkexsh hkexshd
SUBDIRS = $(LIBS) $(TOOLS)
INSTPREFIX = /usr/local
all: common client server passwd
clean:
@ -22,12 +24,15 @@ tools:
$(MAKE) -C $$d all;\
done
common:
go install .
client: common
$(MAKE) -C hkexsh
ifeq ($(MSYSTEM),)
ifneq ($(GOOS),windows)
server: common
@ -40,6 +45,33 @@ server: common
echo "hkexshd server not (yet) supported on Windows"
endif
passwd: common
$(MAKE) -C hkexpasswd
install:
cp hkexsh/hkexsh $(INSTPREFIX)/bin
ifeq ($(MSYSTEM),)
ifneq ($(GOOS),windows)
cp hkexshd/hkexshd hkexpasswd/hkexpasswd $(INSTPREFIX)/sbin
else
mv $(INSTPREFIX)/bin/hkexsh $(INSTPREFIX)/bin/_hkexsh
cp hkexsh/mintty_wrapper.sh $(INSTPREFIX)/bin/hkexsh
echo "Cross-build of hkexshd server for Windows not yet supported"
endif
else
echo "Cross-build of hkexshd server for Windows not yet supported"
endif
cd $(INSTPREFIX)/bin && ln -s hkexsh hkexcp && cd -
uninstall:
rm -f $(INSTPREFIX)/bin/hkexsh $(INSTPREFIX)/bin/hkexcp $(INSTPREFIX)/bin/_hkexsh
ifeq ($(MSYSTEM),)
ifneq ($(GOOS),windows)
rm -f $(INSTPREFIX)/sbin/hkexshd $(INSTPREFIX)/sbin/hkexpasswd
else
endif
else
endif

View file

@ -7,5 +7,5 @@
// golang implementation by Russ Magee (rmagee_at_gmail.com)
package hkexsh
const Version = "0.6pre (NO WARRANTY)"
const Version = "0.7pre (NO WARRANTY)"