PROJ=ParaParser

#CXXFLAGS=-Wall  -Wshadow -std=c++98 -O3 -ggdb -fPIC -I/usr/include/python2.5
CXXFLAGS=-Wall  -Wshadow -std=c++98 -O3 -fPIC -I/usr/include/python2.5

SRCS= ParaParser.cpp

OBJS = $(SRCS:%.cpp=%.o)

all: $(OBJS)
	@ echo "Building ParaParser module"
	@ swig -c++ -python ${PROJ}.i
	@ g++ $(CXXFLAGS) -I/usr/include/python2.5 -c ${PROJ}_wrap.cxx -o ${PROJ}_wrap.o
	@ g++ $(CXXFLAGS) -shared -lpython2.5 $(OBJS) ${PROJ}_wrap.o -o _${PROJ}.so
	@ python -c "import ${PROJ}" && echo "Creation of ParaParser module was successful!"

clean:
	rm *.o *.so *.cxx ${PROJ}.py ${PROJ}.pyc

