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
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue