# Makefile for installing BWEDIT

SHELL = /bin/sh

# Edit the following two variable settings if you want to
# install the library and the executible elsewhere

# Install directory of BWEDIT
INSTALL_DIR = /usr/local/bwedit

# Directory for installing symbolic link to bwedit
BIN_DIR = /usr/local/bin

# Don't edit after this line

SCRIPT_DIR = $(INSTALL_DIR)/bin
LIB_DIR = $(INSTALL_DIR)/lib
IMG_DIR = $(INSTALL_DIR)/images
HELP_DIR = $(INSTALL_DIR)/help
DEMO_DIR = $(INSTALL_DIR)/examples

all:
	@echo "Nothing to be done for all"
	@echo
	@echo "Edit Makefile"
	@echo "Change INSTALL_DIR and BIN_DIR (Lines 9 and 12) if necessary"
	@echo
	@echo "Edit bin/bwedit"
	@echo "Change installdir and psfontfile (Lines 14 and 15), again if necessary"
	@echo
	@echo "Now type \`make install' at the command prompt"

install:
	@echo "Installing ..."
	@-mkdir $(INSTALL_DIR)
	@-mkdir $(SCRIPT_DIR) $(LIB_DIR) $(IMG_DIR) $(HELP_DIR) $(DEMO_DIR)
	@cp bin/bwedit $(SCRIPT_DIR)
	@chmod 755 $(SCRIPT_DIR)/bwedit
	@-rm $(BIN_DIR)/bwedit
	@ln -s $(SCRIPT_DIR)/bwedit $(BIN_DIR)/bwedit
	@cp lib/* $(LIB_DIR)
	@cp images/* $(IMG_DIR)
	@cp help/* $(HELP_DIR)
	@cp examples/* $(DEMO_DIR)
	@echo "... Done"
