#
#		Makefile for the geos:
#
#	Copyright 1999 by The University at Stony Brook, All rights reserved.
#

ifndef GAS
 ifdef absdirpath
   GAS = $(absdirpath)/gas
 else #ifdef absdirpath
   GAS = ..
 endif #ifdef absdirpath
endif #ifndef GAS

lib = gas/geos

sources = eosplot.c     \
	  generic-eos.c \
	  geosvec.c   \
	  giniteos.c    \
	  gphriem.c     \
	  mpoly-eos.c   \
	  poly-eos.c    \
	  spoly-eos.c   \
	  gpertsub.F    \
	  gentest-eos.c 

includes = geosdecs.h   \
	   geosprotos.h \
	   mpoly.h      \
	   poly.h       \
	   spoly.h      \
	   gentest.h	

morefiles = mkseslib.c testseslib.c

include $(GAS)/make-gas.defs

ifeq "$(findstring -DTWOD,$(CPPFLAGS))" "-DTWOD"
 CPPFLAGS += $(MKSESLIB)
endif #ifeq "$(findstring -DTWOD,$(CPPFLAGS))" "-DTWOD"

ifeq "$(MKSESLIB)" "-DMAKE_SES_LIB"
 mkseslib: sesame.o gsestoc.o mkseslib.o
	-$(LD) -o mkseslib $^ $(LDFLAGS) $(LOADLIBES)
	-@$(RM) *.o
else #ifeq "$(MKSESLIB)" "-DMAKE_SES_LIB"
 mkseslib: sesame.F gsestoc.F mkseslib.c
	$(MAKE) "MKSESLIB=-DMAKE_SES_LIB" mkseslib
endif #ifeq "$(MKSESLIB)" "-DMAKE_SES_LIB"

testseslib: sesame.o gsestoc.o testseslib.o
	-$(LD) -o testseslib $^ $(LDFLAGS) $(LOADLIBES)
	-@$(RM) *.o
