# -*-makefile-*----------------------------------------------------------------
# $Id: install.in,v 1.30 1996/10/22 19:50:52 furnish Exp $
#
# Maurice LeBrun
# IFS, University of Texas at Austin
# 14-Jul-1994
#
# Make assignments and targets for installation under Unix.
#
# It is recommended that you use a dedicated directory such as
# /usr/local/plplot (read the FAQ on this topic).  The install directory
# will be created if necessary, as will all required subdirectories.
#
# If support for <pkg> is not included, $(<PKG>_INSTALL) will be null.
#
# If a shared library was built, rebuild executables before installing.
# -----------------------------------------------------------------------------

install: install_lib install_demos install_utils \
	$(F77_INSTALL) \
	$(PYTHON_INSTALL) \
	$(TCL_INSTALL) \
	$(MAT_INSTALL) \
	$(TK_INSTALL) \
	$(CXX_INSTALL)

install_demos:
	-if test ! -d $(DEMOS_DIR); then mkdir -p $(DEMOS_DIR); fi
	-if test ! -d $(DEMOS_DIR)/c; then mkdir -p $(DEMOS_DIR)/c; fi
	-cp Makedemo $(DEMOS_DIR)/Makefile
	-$(LN) $(DEMOS_DIR)/Makefile $(DEMOS_DIR)/c
	-cd $(top_srcdir)/examples/c; cp * $(DEMOS_DIR)/c

install_utils:
	-if test $(SHARED) = 1; then \
	 $(LDC) $(LDC_FLAGS) plrender$O $(LIB_INSTALL) \
		-o plrender$E $(LDC_LIBS); \
	 fi
	-if test $(SHARED) = 1; then \
	 $(LDC) $(LDC_FLAGS) pltek$O \
		-o pltek$E; \
	 fi
	-strip plrender$E pltek$E
	-cp plrender$E pltek$E $(BIN_DIR)

