+ fixed automatic Python path settings in Makefiles
[qpalma.git] / ParaParser / Makefile
1 PROJ=ParaParser
2
3 PY_INCL=`python-config --includes`
4 PY_LIBS=`python-config --libs`
5
6 CXXFLAGS=-Wall -Wshadow -std=c++98 -O3 -fPIC $(PY_INCL)
7
8 SRCS= ParaParser.cpp
9
10 OBJS = $(SRCS:%.cpp=%.o)
11
12 all: $(OBJS)
13 @ echo "Building ParaParser module"
14 @ swig -c++ -python ${PROJ}.i
15 @ g++ $(CXXFLAGS) -c ${PROJ}_wrap.cxx -o ${PROJ}_wrap.o
16 @ g++ $(CXXFLAGS) -shared $(PY_LIBS) $(OBJS) ${PROJ}_wrap.o -o _${PROJ}.so
17 @ python -c "import ${PROJ}" && echo "Creation of ParaParser module was successful!"
18
19 clean:
20 rm *.o *.so *.cxx ${PROJ}.py ${PROJ}.pyc