# Microsoft Visual C++ 4.0 makefile
#
# Copyright (c) 1993-1998 Lucent Technologies, Inc.
#
# RCS #(@) $Id: makefile.vc,v 1.4 2001/05/22 23:23:56 davygrvy Exp $

!include "pkg.vc"

#  You must define INSTALLDIR on the commandline, if Iwidgets is to be installed
#  from outside the Itcl source tree.

!ifndef INSTALLDIR
!include "../../config.vc"
!endif

ROOT		= ..
PACKAGE		= iwidgets$(IWIDGETS_DOTVERSION)

LIB_INSTALL_DIR		= $(INSTALLDIR)\lib
BIN_INSTALL_DIR		= $(INSTALLDIR)\bin
INCLUDE_INSTALL_DIR	= $(INSTALLDIR)\include
PKG_INSTALL_DIR		= $(INSTALLDIR)\lib\$(PACKAGE)
SCRIPT_INSTALL_DIR	= $(PKG_INSTALL_DIR)\scripts
DEMO_INSTALL_DIR	= $(PKG_INSTALL_DIR)\demos


# do nothing for this target.
release :


install :
	if not exist "$(INSTALLDIR)" mkdir "$(INSTALLDIR)"
	if not exist "$(LIB_INSTALL_DIR)" mkdir "$(LIB_INSTALL_DIR)"
	if not exist "$(PKG_INSTALL_DIR)" mkdir "$(PKG_INSTALL_DIR)"
	if not exist "$(SCRIPT_INSTALL_DIR)" mkdir "$(SCRIPT_INSTALL_DIR)"
	if not exist "$(DEMO_INSTALL_DIR)" mkdir "$(DEMO_INSTALL_DIR)"
	if not exist "$(DEMO_INSTALL_DIR)\html" mkdir "$(DEMO_INSTALL_DIR)\html"
	if not exist "$(DEMO_INSTALL_DIR)\images" mkdir "$(DEMO_INSTALL_DIR)\images"
	copy $(ROOT)\win\*.tcl "$(PKG_INSTALL_DIR)"
	copy $(ROOT)\generic\*.* "$(SCRIPT_INSTALL_DIR)"
	copy $(ROOT)\demos\*.* "$(DEMO_INSTALL_DIR)"
	copy $(ROOT)\demos\images\*.* "$(DEMO_INSTALL_DIR)\images"
	copy $(ROOT)\demos\html\*.* "$(DEMO_INSTALL_DIR)\html"
	copy $(ROOT)\demos\catalog "$(PKG_INSTALL_DIR)\catalog.tcl"
	echo package ifneeded Iwidgets $(IWIDGETS_DOTVERSION) [list source [file join $$dir iwidgets.tcl]] > \
		"$(PKG_INSTALL_DIR)\pkgIndex.tcl"
