# include definitions of Makefile variables:
#

# SWIG-specific make variables:
LDPATH = -L$(PCCR)/lib
LIBS    =  -lMatrixFactory1D 

SWIG       = swig
SWIGOPT    = $(shell swigopts.sh -p)
CXX        = g++
LDD        = g++
CFLAGS     = -I$(TRILINOS_DIR)/include -I$(shell pyinc.py) -fPIC -g  -c -I.. -I$(PCCR)/include -DHAVE_CONFIG_H
LDFLAGS    = -fPIC -L.. -L/usr/local/lib 
TARGET     = MatrixFactory1D
INTERFACE  = $(TARGET).i

all:: wrapper module 

wrapper::
	swig $(SWIGOPT) $(INTERFACE)

module::
	$(CXX) $(CFLAGS)   $(TARGET)_wrap.cxx 
	$(LDD) -shared $(TARGET)_wrap.o $(LDFLAGS) $(LDPATH) $(LIBS) -o _$(TARGET).so

clean::
	rm -f *_wrap* *.so *.o $(OBJ_FILES)  *~ *.pyc $(TARGET).py

install: all 
	cp _*so $(TARGET).py  $(PCCR)/lib/.
