# This file was generated automatically by configure.  Do not edit.
VPATH = ../../../../../libgpp/etc/graph
links = 
host_alias = i386-pc-msdosdjgpp
host_cpu = i386
host_vendor = pc
host_os = msdosdjgpp
host_canonical = i386-pc-msdosdjgpp
target_alias = i386-pc-msdosdjgpp
target_cpu = i386
target_vendor = pc
target_os = msdosdjgpp
target_canonical = i386-pc-msdosdjgpp
build_alias = i386-pc-msdosdjgpp
build_cpu = i386
build_vendor = pc
build_os = msdosdjgpp
build_canonical = i386-pc-msdosdjgpp
package_makefile_frag = Make.pack
target_makefile_frag = ../../target-mkfrag
gxx_include_dir = ${prefix}/include/g++
enable_shared = no
# A makefile for the stuff now in libg++/etc

srcdir = ../../../../../libgpp/etc/graph

#### package, host, target, and site dependent Makefile fragments come in here.
# Start of package fragment generated by ../../../../../libgpp/etc/graph/../../config.shared.

MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true

# TOPDIR=$${rootme}$(MULTIBUILDTOP)../../../../ invsubdir= subdir=
srcdir = ../../../../../libgpp/etc/graph
SUBDIRS = 
CHECK_SUBDIRS = 
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
datadir = $(prefix)/lib
mandir = $(prefix)/man
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include
docdir = $(datadir)/doc

SHELL = bash

INSTALL = $${rootme}$(srcdir)/../../../install-sh -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)

AR = `if [ -f $${rootme}$(MULTIBUILDTOP)../../../../binutils/ar ] ; \
	then echo $${rootme}$(MULTIBUILDTOP)../../../../binutils/ar ; \
	else echo ar ; fi`
AR_FLAGS = rc
RANLIB = `if [ -f $${rootme}$(MULTIBUILDTOP)../../../../binutils/ranlib ] ; \
	then echo $${rootme}$(MULTIBUILDTOP)../../../../binutils/ranlib ; \
	else echo ranlib ; fi`
NM = `if [ -f $${rootme}$(MULTIBUILDTOP)../../../../binutils/nm.new ] ; \
	then echo $${rootme}$(MULTIBUILDTOP)../../../../binutils/nm.new ; \
	else echo nm ; fi`
NLMCONV = `if [ -f $${rootme}$(MULTIBUILDTOP)../../../../binutils/nlmconv ] ; \
	then echo $${rootme}$(MULTIBUILDTOP)../../../../binutils/nlmconv ; \
	else echo nlmconv ; fi`
LD = `if [ -f $${rootme}$(MULTIBUILDTOP)../../../../ld/ld.new ] ; \
	then echo $${rootme}$(MULTIBUILDTOP)../../../../ld/ld.new ; \
	else echo ld ; fi`

MAKEINFO = `if [ -f $${rootme}$(MULTIBUILDTOP)../../../../texinfo/C/makeinfo ] ; \
	then echo $${rootme}$(MULTIBUILDTOP)../../../../texinfo/C/makeinfo ; \
	else echo makeinfo ; fi`
TEXIDIR = $(srcdir)/../../../texinfo
TEXI2DVI = TEXINPUTS=${TEXIDIR}:$$TEXINPUTS texi2dvi

CC = gcc
CXX = gcc

WRAP_C_INCLUDES =
CFLAGS = -g
CXXFLAGS = -g -O2
LIBCFLAGS = $(CFLAGS)
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
PICDIR = 
TOLIBGXX = ../../
PROTODIR = $(srcdir)/../../src/gen
LIBS = -L./../../ -L./../../../libstdcxx -lgpp -lstdcxx
IO_DIR = ../libio
# IO_DIR = no-stream
# End of package fragment generated by ../../../../../libgpp/etc/graph/../../config.shared.
# Warning this fragment is automatically generated
RANLIB = ranlib

# If the C include files are C++-ready (with extern "C"), uncomment next line:
# WRAP_C_INCLUDES =

# Flags to pass to gen-params when building _G_config.h.
# For example: G_CONFIG_ARGS = size_t="unsigned long"
G_CONFIG_ARGS =
# Start of package rules fragment generated by ../../../../../libgpp/etc/graph/../../config.shared.

all: $(PICDIR) $(NOTHING) multi-all
.PHONY: all

.PHONY: multi-all
multi-all:
	@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all


NOSTDINC = -nostdinc++
CXXINCLUDES = $(NOSTDINC) -I. -I../../../libio -I$(srcdir) -I$(srcdir)/../../$(IO_DIR) -I$(srcdir)/../../../libstdcxx -I$(srcdir)/../../src $(WRAP_C_INCLUDES)
CINCLUDES =
XCFLAGS = $(CFLAGS)
XCXXFLAGS = $(CXXFLAGS)
.SUFFIXES: .o .C .cc .c
COMPILE.c = $(CC) -c $(XCFLAGS) $(CINCLUDES) $(MT_CFLAGS)
.c.o:
	$(COMPILE.c) $<
COMPILE.cc = $(CXX) -c $(XCXXFLAGS) $(CXXINCLUDES) $(MT_CFLAGS)
.C.o:
	$(COMPILE.cc) $<
.cc.o:
	$(COMPILE.cc) $<


.PHONY: install
install:
.PHONY: check
.PHONY: info dvi install-info clean-info
info:
dvi:
install-info:
.PHONY: do-clean-info clean-info do-clean-dvi clean-dvi
do-clean-info:
do-clean-dvi:
clean-info: do-clean-info
clean-dvi: do-clean-dvi

.PHONY: boltcc
boltcc:
	rootme=`pwd`/ ; export rootme ; $(MAKE) $(FLAGS_TO_PASS)


# clean rules
.PHONY: mostlyclean clean distclean maintainer-clean realclean
mostlyclean: clean-dvi
	rm -rf *.o \#* core  pXPlex* pPlex* test.pl test2.pl 
	@$(MULTICLEAN) multi-clean DO=mostlyclean
clean: clean-dvi
	rm -rf *.o \#* core  pXPlex* pPlex* test.pl test2.pl  graph graph.shar libgraph.a 
	@$(MULTICLEAN) multi-clean DO=clean
distclean: clean
	@$(MULTICLEAN) multi-clean DO=distclean
	rm -rf config.status Makefile *~ Make.pack target-mkfrag multilib.out 
maintainer-clean realclean: clean clean-info
	@$(MULTICLEAN) multi-clean DO=maintainer-clean
	rm -rf config.status Makefile *~ Make.pack target-mkfrag multilib.out  depend *.info*

.PHONY: force
force:

# with the gnu make, this is done automatically.

Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
	$(SHELL) ./config.status

.NOEXPORT:
MAKEOVERRIDES=
DEPEND_SOURCES = ${srcdir}/*.cc ${srcdir}/*.c
depend.new:
# The sed script below attempts to make the depend output portable.
# It cleans up the depenency information generated by cpp.
# It replaces instances of $(srcdir)/ by the string '$(srcdir)/'.
# It removes remaining absolute files names (such as /usr/include/stdio.h).
# It removes lines containing only "\\".
# It inserts '$(MULTISRCTOP)' in '$(srcdir)/..'.
# In order to support SunOS VPATH, $(srcdir)/[a-z]*.{c,cc} is replaced with
# [a-z]*.{c,cc} (the directory part is removed).
# The awk script removes a continuation marker that is followed by
# a blank line, since that may confuse make.
	echo "# AUTOMATICALLY GENERATED BY 'make depend' - DO NOT EDIT" \
	  >depend.new
	$(CXX) -M $(CXXINCLUDES) $(DEPEND_SOURCES) \
	| sed -e 's|$(srcdir)/|$$(srcdir)/|g' \
	      -e 's| [^ ]_G_config.h| $$(_G_CONFIG_H)|g \
	      -e 's| /[^ ]*||g' \
	      -e '/^[ 	]*\\$$/d' -e 's/^[ 	]*$$//' \
	| sed -e 's|$$(srcdir)/[.][.]|$$(srcdir)/$$(MULTISRCTOP)..|g' \
	      -e 's|$$(srcdir)/\([^/]*[.]c\)|\1|' \
	| awk 'BEGIN   { prev = "" } \
	      /^( )*$$/ { if (prev ~ /\\$$/) \
	                    { prev = substr(prev,1,length(prev)-1); next } } \
	                { print prev; prev = $$0 } \
	      END { if (prev !~ /^( )*$$/) print prev }' \
	>> depend.new
$(srcdir)/depend:  depend.new
	mv depend.new $(srcdir)/depend


# DO NOT DELETE THIS LINE -- g++dep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

eGetOpt.o : eGetOpt.cc \
  eGetOpt.h \
  $(srcdir)/../../$(IO_DIR)/stream.h \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h 
ePlotFile.o : ePlotFile.cc \
  ePlotFile.h \
  $(srcdir)/../../$(IO_DIR)/PlotFile.h \
  $(srcdir)/../../$(IO_DIR)/fstream.h \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h 
graph.o : graph.cc \
  read_data.h \
  $(srcdir)/../../$(IO_DIR)/stream.h \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h \
  pXPlex.h \
  eGetOpt.h \
  ePlotFile.h \
  $(srcdir)/../../$(IO_DIR)/PlotFile.h \
  $(srcdir)/../../$(IO_DIR)/fstream.h \
  tick_intrvl.h \
  $(srcdir)/../../$(IO_DIR)/strstream.h
read_data.o : read_data.cc \
  read_data.h \
  $(srcdir)/../../$(IO_DIR)/stream.h \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h \
  pXPlex.h
tick_intrvl.o : tick_intrvl.cc \
  tick_intrvl.h 

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# End of package rules fragment generated by ../../../../../libgpp/etc/graph/../../config.shared.
##

check: graph $(srcdir)/test.dat $(srcdir)/test2.dat
	./graph -d -c 3 -g 2 -l "a diagonal line" -X "x axis" -Y "y axis" -m 1\
	        <$(srcdir)/test2.dat >test2.pl
	./graph -d <$(srcdir)/test.dat >test.pl
	@echo use plot to look at the plot files test.pl and test2.pl
run_tests: check

OBJECTS = pPlex.o pXPlex.o eGetOpt.o ePlotFile.o read_data.o tick_intrvl.o
DEPEND_SOURCES = $(srcdir)/*.cc

libgraph.a : $(OBJECTS)
	rm -f libgraph.a
	$(AR) $(AR_FLAGS) libgraph.a $(OBJECTS)
	$(RANLIB) libgraph.a

graph : graph.o libgraph.a
	$(CXX) graph.o libgraph.a $(LIBS) -lm -o $@

graph.o: pXPlex.h pPlex.h

pXPlex.o: pXPlex.cc pXPlex.h pPlex.h

pXPlex.cc:
	PROTODIR=$(PROTODIR); export PROTODIR; ../../genclass/genclass point val XPlex p
pXPlex.h: pXPlex.cc

pPlex.cc:
	PROTODIR=$(PROTODIR); export PROTODIR; ../../genclass/genclass point val Plex p
pPlex.h: pPlex.cc

# GNU tail doesn't handle -r - use the 'tac' program instead.
REVERSE_LINES = tail -r
#REVERSE_LINES = tac

$(srcdir)/test.dat:
	-echo 0 0 1 1 2 0 | spline | $(REVERSE_LINES) > $(srcdir)/test.dat

$(srcdir)/test2.dat:
	echo 0 0 >$(srcdir)/test2.dat
	echo 1 1 "label for 1 1" >>$(srcdir)/test2.dat
	echo 2 2 >>$(srcdir)/test2.dat
	echo 3 3 "label for 3 3" >>$(srcdir)/test2.dat
	echo 4 4 >>$(srcdir)/test2.dat

DIST = Makefile graph.tex ChangeLog \
eGetOpt.cc		read_data.cc \
eGetOpt.h		read_data.h \
ePlotFile.cc		tick_intrvl.cc \
ePlotFile.h		tick_intrvl.h \
graph.cc		pdefs.h

graph.tar.Z : $(DIST) CHECKSUMS
	tar cfz $@ $^ CHECKSUMS

CHECKSUMS : $(DIST)
	sum $(DIST) >CHECKSUMS

dist : graph-dist.tar.Z

graph-dist.tar.Z : $(DIST)
	-rm -rf graph-dist
	mkdir graph-dist
	ln $(DIST) graph-dist
	tar cfz graph-dist.tar.Z $(DIST)
	rm -rf graph-dist

graph.shar : pdefs.h graph.cc Makefile graph.texinfo
	shar  pdefs.h graph.cc Makefile graph.texinfo > $@
