SHELL = /bin/sh

# Change the following to lines according as where you want to install
# the bnbanner library, the bnbanner script and the bnbanner man page
INSTALLDIR = /usr/local/lib/bnbanner
BINDIR     = /usr/local/bin
MANDIR     = /usr/man/man6

# You may change the following if you do not want to install character
# maps at all sizes. Do no delete 250 from the list
DPIS       = 208 250 300 360 432

# Do not change after this line
BNBASCDIR  = $(INSTALLDIR)/asc
BNBENCDIR  = $(INSTALLDIR)/enc
BNBBINDIR  = $(INSTALLDIR)/bin

all:
	@echo "Nothing to make ..."
	@echo "Type 'make install' to install bnbanner"
	@echo "See the README file for details"

install:
	@-mkdir $(INSTALLDIR)
	@-mkdir $(BNBASCDIR) $(BNBENCDIR) $(BNBBINDIR)
	@echo "Installing character maps ..."
	@for DIR in $(DPIS); do cp -R asc/$$DIR $(BNBASCDIR); done
	@echo ".. done"
	@echo "Installing encoding files ..."
	@for DIR in $(DPIS); do cp enc/bn$$DIR.enc $(BNBENCDIR); done
	@echo ".. done"
	@echo "Installing perl script ..."
	@-rm -f $(BINDIR)/bnbanner
	@cp bin/bnbanner.pl $(BNBBINDIR)
	@chmod 755 $(BNBBINDIR)/bnbanner.pl
	@ln -s $(BNBBINDIR)/bnbanner.pl $(BINDIR)/bnbanner
	@echo ".. done"
	@echo "Installation complete ..."
	@echo "Type 'bnbanner shubha din' at the command prompt"
	@echo "to see if the installation is successful"

installman:
	cp man/bnbanner.6 $(MANDIR)

