## This is the installation makefile for tkchooser2.

## Set these variables to point to where you
## want tkchooser installed. You can point to
## the distribution directory if you want to
## run it in place.
INSTALLROOT = /usr/local
LIBDIR = $(INSTALLROOT)/lib/tkchooser2
BINDIR = $(INSTALLROOT)/bin

## point these variables to where you want
## the documentation installed.
DOCROOT = /usr/local/doc
DOCDIR = $(DOCROOT)/tkchooser

############### Do Not modify below this line ################
PROGRAM = tkchooser2.tcl
LINKNAME = tkchooser
MODULES = appletalk.tcl smb.tcl ip.tcl misc.tcl fileselect.tcl chooser.cfg alpr.tcl
SUBDIRS = plugins icons etc

DOCS = README API_Description VERSION

build:	
	@echo ""
	@echo "Read the INSTALL document that came with the distribution."
	@echo "and follow those instructions."
	@echo ""
	@echo "Then run \"make install\" (as root, if necessary) to install the"
	@echo "package in $(LIBDIR)."
	@echo ""
	@echo "Then run \"make installdoc\" to"
	@echo "install the documentation in $(DOCDIR)."
	@echo ""

config:	
	mv -f $(PROGRAM) $(PROGRAM).bak
	./config.tcl $(PROGRAM).bak $(PROGRAM) $(LIBDIR)
	chmod 755 $(PROGRAM)
	mv -f alpr.tcl alpr.tcl.bak
	./config.tcl alpr.tcl.bak alpr.tcl $(LIBDIR)
	chmod 755 alpr.tcl

install:	
	mkdir -p $(LIBDIR)
	cp -fb -S .bak chooser.cfg $(LIBDIR)
	cp -fb -S .bak chooser.cfg /etc
	cp -f $(PROGRAM) $(MODULES) $(LIBDIR)
	cp -Rf $(SUBDIRS) $(LIBDIR)
	rm -f $(BINDIR)/$(LINKNAME)
	ln -s $(LIBDIR)/$(PROGRAM) $(BINDIR)/$(LINKNAME)
	rm -f $(BINDIR)/alpr
	ln -s $(LIBDIR)/alpr.tcl $(BINDIR)/alpr


installdoc:	
	mkdir -p $(DOCDIR)
	cp -f $(DOCS) $(DOCDIR)

clean:
	mv -f $(PROGRAM).bak $(PROGRAM)





