/****************************************************************************
 * Imakefile for marchp3d
 * Author Joel Welling
 * Copyright 1992, Pittsburgh Supercomputing Center, Carnegie Mellon University
 *
 * Permission use, copy, and modify this software and its documentation
 * without fee for personal use or use within your organization is hereby
 * granted, provided that the above copyright notice is preserved in all
 * copies and that that copyright and this permission notice appear in
 * supporting documentation.  Permission to redistribute this software to
 * other organizations or individuals is not granted;  that must be
 * negotiated with the PSC.  Neither the PSC nor Carnegie Mellon
 * University make any representations about the suitability of this
 * software for any purpose.  It is provided "as is" without express or
 * implied warranty.
 *****************************************************************************/
                                                                            
LIBS = $(DEVLIBS) $(XLIBS) $(SLIBS) $(LIBOPTIONS)

DRAWP3DDIR = ../drawp3d

CFLAGS= $(ENV_CFLAGS) $(COPTIONS) -I$(DRAWP3DDIR)

SUBIMAKES = doc

SUBMAKES = doc

EXECUTABLES = test_stream test_clrdat marchp3d

INSTALLABLES= marchp3d

CSOURCE= marchp3d.c test_stream.c test_clrdat.c

HFILES= ge_error.h

OTHER_SOURCE= cc.opt descrip.mms marchp3d.cld

/* Figure out what libraries are needed */
#if (WHICH_RENDERER==PAINTER_REN)
#if (sgi || _IBMR2)
LIB = $(DRAWCGM) -lgl_s -lc_s -lsphere $(XLIBS) $(LIBOPTIONS)
#else
LIB = $(DRAWCGM) $(XLIBS) $(LIBOPTIONS)
#endif
#else /* WHICH_RENDERER==PAINTER_REN */
#if (sgi || _IBMR2)
LIB = -lgl_s -lc_s -lsphere $(LIBOPTIONS)
#else
LIB = $(LIBOPTIONS)
#endif
#endif /* WHICH_RENDERER==PAINTER_REN */

all:: submakes marchp3d test_stream test_clrdat

test_stream: test_stream.o
	$(CC) -o $@ test_stream.o $(LIBS)

test_clrdat: test_clrdat.o
	$(CC) -o $@ test_clrdat.o $(LIBS)

marchp3d: marchp3d.o $(DRAWP3DDIR)/libdrawp3d.a
	$(CC) -o $@ marchp3d.o  $(DRAWP3DDIR)/libdrawp3d.a $(LIB)

marchp3d.o: marchp3d.c ge_error.h
	$(CC) $(CFLAGS) -c marchp3d.c

$(DRAWP3DDIR)/libdrawp3d.a: 
	cd $(DRAWP3DDIR) ; make libdrawp3d.a





