mirror of https://gogs.blitter.com/RLabs/xs
-Makefile: added install,uninstall targets
-Bumped version to 0.7pre Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
parent
1d1feee476
commit
d973c83e01
34
Makefile
34
Makefile
|
@ -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
|
SUBPKGS = logger spinsult hkexnet herradurakex
|
||||||
TOOLS = hkexpasswd hkexsh hkexshd
|
TOOLS = hkexpasswd hkexsh hkexshd
|
||||||
SUBDIRS = $(LIBS) $(TOOLS)
|
SUBDIRS = $(LIBS) $(TOOLS)
|
||||||
|
|
||||||
|
INSTPREFIX = /usr/local
|
||||||
|
|
||||||
all: common client server passwd
|
all: common client server passwd
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -22,12 +24,15 @@ tools:
|
||||||
$(MAKE) -C $$d all;\
|
$(MAKE) -C $$d all;\
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
common:
|
common:
|
||||||
go install .
|
go install .
|
||||||
|
|
||||||
|
|
||||||
client: common
|
client: common
|
||||||
$(MAKE) -C hkexsh
|
$(MAKE) -C hkexsh
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(MSYSTEM),)
|
ifeq ($(MSYSTEM),)
|
||||||
ifneq ($(GOOS),windows)
|
ifneq ($(GOOS),windows)
|
||||||
server: common
|
server: common
|
||||||
|
@ -40,6 +45,33 @@ server: common
|
||||||
echo "hkexshd server not (yet) supported on Windows"
|
echo "hkexshd server not (yet) supported on Windows"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
passwd: common
|
passwd: common
|
||||||
$(MAKE) -C hkexpasswd
|
$(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
|
||||||
|
|
Loading…
Reference in New Issue