# Generated automatically from Makefile.in by configure.
#
# $Id: Makefile.in,v 1.2 1994/08/04 23:42:14 sls Exp $
#
# This software is copyright (C) 1994 by the Lawrence Berkeley Laboratory.
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that: (1) source code distributions
# retain the above copyright notice and this paragraph in its entirety, (2)
# distributions including binary code include the above copyright notice and
# this paragraph in its entirety in the documentation or other materials
# provided with the distribution, and (3) all advertising materials mentioning
# features or use of this software display the following acknowledgement:
# ``This product includes software developed by the University of California,
# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
# the University nor the names of its contributors may be used to endorse
# or promote products derived from this software without specific prior
# written permission.
# 
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# 

DESTDIR		= /home/ux5/ux5g/icsd/sls/sw/narray.sun4.sos5
BINDIR		= /home/ux5/ux5g/icsd/sls/sw/narray.sun4.sos5/bin
LIBDIR		= /home/ux5/ux5g/icsd/sls/sw/narray.sun4.sos5/lib

# If you want to install a local copy of this, then set this line to
# your CGI bin directory.
WWWDEST		= /home/www/cgi-bin

TCL_INCLUDE	= -I/vol/pub/tcl-7.3/include
TCL_LIBS	= -L/vol/pub/tcl-7.3/lib -ltcl

TK_INCLUDE	= -I/vol/pub/tk-3.6p1/include
TK_LIBS		= -L/vol/pub/tk-3.6p1/lib -ltk

X11_INCLUDE	= -I/vol/packages/X11R5.pl25/include
X11_LIBS	= -L/vol/packages/X11R5.pl25/lib -lX11

NETCDF_INCLUDE	= -I/home/ux5/ux5g/icsd/sls/sw/netcdf.sun4.sos5/include
NETCDF_LIBS	= -L/home/ux5/ux5g/icsd/sls/sw/netcdf.sun4.sos5/lib -lnetcdf

DEFS		=  -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STDARG_H=1 -DWITH_NETCDF=1 -DLIBRARY_DIR=\"/home/ux5/ux5g/icsd/sls/sw/narray.sun4.sos5/lib\"

COPTS		= -O
CFLAGS		= $(COPTS) $(DEFS) $(TCL_INCLUDE) $(TK_INCLUDE)  \
		  $(NETCDF_INCLUDE) $(X11_INCLUDE)

EXTRA_LIBS 	=  -lsocket -lnsl -lm

RANLIB		= :

CC		= gcc -fwritable-strings -Wall

YACC		= yacc -v -t -l

TCL_FILES	= limits.tcl ../narray.tcl util.tcl html.tcl form.tcl \
		  wwwdemo_body.tcl

all: wwwdemo wwwdemo.cgi

wwwdemo: wwwdemo.o ../libnarray.a
	$(CC) $(COPTS) -o $@ wwwdemo.o ../libnarray.a \
	$(TCL_LIBS) $(NETCDF_LIBS) $(EXTRA_LIBS)

wwwdemo.cgi: $(TCL_FILES)
	rm -f wwwdemo.cgi
	echo "#!$(BINDIR)/wwwdemo" > wwwdemo.cgi
	cat $(TCL_FILES) >> wwwdemo.cgi
	chmod 0755 wwwdemo.cgi

install-cgi: wwwdemo.cgi
	rm -f $(WWWDEST)/wwwdemo.cgi
	cp wwwdemo.cgi $(WWWDEST)
	chmod 0755 $(WWWDEST)/wwwdemo.cgi

install: wwwdemo install-cgi
	rm -f $(BINDIR)/wwwdemo
	cp wwwdemo $(BINDIR)
	chmod 0755 $(BINDIR)/wwwdemo

clean:
	rm -f *.o *~ wwwdemo
