TOP        = ../../../..
SWIG       = $(TOP)/swig
SRCS       = pde.c gd_wrap.c
TARGET     = pdec
INTERFACE  = pde.i
SWIGOPT    = -c++ -shadow
LIBS       = -lgd

# Build two dynamically loadable modules

all::
	$(MAKE) -f $(TOP)/Makefile.template SRCS='$(SRCS)' SWIG='$(SWIG)' \
	SWIGOPT='-shadow' TARGET='pdec' INTERFACE='pde.i)' python
	$(MAKE) -f $(TOP)/Makefile.template SRCS='$(SRCS)' SWIG='$(SWIG)' \
	SWIGOPT='-c++ -shadow' TARGET='gdc' INTERFACE='gd.i)' \
	LIBS='$(LIBS)' python_cpp

static::
	$(SWIG) -python -shadow gd.i
	$(MAKE) -f $(TOP)/Makefile.template SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='-DSTATIC $(SWIGOPT)' \
	TARGET='mypython' INTERFACE='$(INTERFACE)' LIBS='$(LIBS)' python_static_cpp

clean::
	rm -f *_wrap* *.o *~ *.so mypython *.pyc pde.py gd.py *.gif Dat* .~*


