# Generated automatically from Makefile.in by configure.
# ------------------------------------------------------------------------
#       Makefile for VISU
# ------------------------------------------------------------------------

# ------------------------------------------------------------------------
#       C Compiler options 
# ------------------------------------------------------------------------

DEFINES      = 
CFLAGS       = -O2
CC 	     = cc

TOPDIR	     = /usr/local/pkg/tcl/visu
BINDIR       = /usr/local/pkg/tcl/visu/bin

# ------------------------------------------------------------------------
#       Include directives for Tcl, Tk, and X include files 
# ------------------------------------------------------------------------

TCL_INCLUDE   = -I/usr/local/pkg/tcl/include
TK_INCLUDE    = -I/usr/local/pkg/tcl/include
X_INCLUDE     = 

# ------------------------------------------------------------------------
#       Libraries directives for Tcl, Tk, X11, and VISU
# ------------------------------------------------------------------------

X_LIB        =  -lX11
TK_LIB       = -L/usr/local/pkg/tcl/lib -ltk4.0
TCL_LIB      = -L/usr/local/pkg/tcl/lib -ltcl7.4
VISU_LIB      = ./src/libVISU.a
EXTRA_LIBS   =  /data/chopin/bossart/nde/lib/libnde.a /data/chopin/bossart/nde/lib/libviewfiles.a -lsocket -lnsl -lm -ldl #-R/usr/local/pkg/tcl/lib:/usr/local/pkg/tcl/lib:default


# ------------------------------------------------------------------------
#       Don't edit anything beyond this point
# ------------------------------------------------------------------------

VISU 	     = visu
INCLUDES     = -I. -I./src $(TK_INCLUDE) $(TCL_INCLUDE) $(X_INCLUDE)
CC_SWITCHES  = $(CFLAGS) $(DEFINES) $(INCLUDES)
LIBRARIES    = $(VISU_LIB) $(TK_LIB) $(TCL_LIB) $(X_LIB) $(EXTRA_LIBS)
INSTALL      = /usr/bsd/install -c
RANLIB 	     = ranlib
SHELL 	     = /bin/sh
RM 	     = rm -f
srcdir	     = .

all: $(VISU)

$(VISU): normallib
	$(CC) $(CC_SWITCHES) $(srcdir)/tkAppInit.c -o $(VISU) $(LIBRARIES)
	@echo "make finished on `date`"

normallib:
	@echo "making all in ./src"
	@(cd src; $(MAKE) CFLAGS="$(CFLAGS)" all)

sharedlib: 
	@echo "making shared library in ./src/shared"
	@(cd src/shared; $(MAKE) CFLAGS="$(CFLAGS)" all)

install-top:
	@if test -d $(TOPDIR); then : ; else mkdir $(TOPDIR); fi

install-bin: $(VISU)
	@if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
	chmod 0755 $(VISU)
	$(INSTALL) $(VISU) $(BINDIR)

install-man: 
	@(cd man; $(MAKE) install)

install-lib:
	@(cd src; $(MAKE) install)
	@(cd src/shared; $(MAKE) install)

install-library:
	@(cd library; $(MAKE) install)

install: install-top install-library install-bin install-lib install-man 

clean:
	@echo "cleaning in ./src"
	@(cd src; $(MAKE) clean)
	@echo "cleaning in ./src/shared"
	@(cd src/shared; $(MAKE) clean)
	@echo "cleaning in ./man"
	@(cd man; $(MAKE) clean)
	@echo "cleaning in ./library"
	@(cd library; $(MAKE) clean)
	$(RM) $(VISU) *\~ "#"*

GENERATED_FILES = \
	config.status \
	src/VISUConfig.h \
	Makefile \
	src/Makefile \
	src/TAGS \
	src/shared/Makefile \
	man/Makefile \
	library/Makefile \
	demos/*.ps

distclean: clean
	$(RM) $(GENERATED_FILES)

PUREFLAGS=
pure: normallib
	$(PURIFYHOME)/purify $(PUREFLAGS) \
	$(CC) $(CC_SWITCHES) $(srcdir)/tkAppInit.c -o $(VISU) $(LIBRARIES)









