##
##  © 2013-2022 Carsten Pfeffer (PiperSoft)
##
##  @project: PS ZitherLayout
##  @file: makefile
##  @brief: release makefile
##
##  @date: 2016-12-18
##  @author: Carsten Pfeffer
##

include makefile_host

GLOBDIR_PS = $(HOME)/.PiperSoft
GLOBDIR_PSZL = $(GLOBDIR_PS)/ZitherLayout
BINDIR = $(HOME)/bin
ifdef LINUX_HOST
PSZL = PS_ZitherLayout
else ifdef WINDOWS_HOST
PSZL = PS_ZitherLayout.exe
endif


help:
	@echo "make targets:"
	@echo "  install      install PS ZitherLayout"
	@echo "  uninstall    uninstall PS ZitherLayout (keeping own global settings file)"


##  install PS ZitherLayout and the TeX style file
install:
	@echo --- installing PS ZitherLayout ---
	-@mkdir -p $(GLOBDIR_PSZL)
	-@mkdir -p $(BINDIR)
	-cp $(PSZL) $(BINDIR)
	@echo --- installation finished ---

##  uninstall PS ZitherLayout and the Tex style file, keep global settings file
uninstall:
	@echo --- uninstalling PS ZitherLayout ---
	-@rm -d $(GLOBDIR_PSZL)
	-@rm -d $(GLOBDIR_PS)
	-rm -f $(BINDIR)/$(PSZL)
	-@rm -d $(BINDIR)
	@echo --- uninstallation finished ---
