FORCE: ;
clean:
- @[ ! -f Makefile.qmake ] || $(MAKE) -f Makefile.qmake clean
- rm -rf pykit Makefile.qmake pykit.app
+ @-$(MAKE) -f Makefile.qmake distclean
+ rm -rf debug release
Makefile: ;
INCLUDEPATH += .
QT += webkit network gui core
+isEmpty(PYTHON) {
+ PYTHON = python
+}
+isEmpty(PYTHONCONFIG) {
+ PYTHONCONFIG = $${PYTHON}-config
+}
+
+isEmpty(LIBBOOSTPYTHON) {
+ LIBBOOSTPYTHON = boost_python
+}
+
# boost_python
-LIBS += -lboost_python
+LIBS += -l$${LIBBOOSTPYTHON}
# python
-QMAKE_CXXFLAGS += $$system(python-config --cflags)
-QMAKE_CXXFLAGS -= -Wstrict-prototypes
-QMAKE_CFFLAGS += $$system(python-config --cflags)
-LIBS += $$system(python-config --ldflags)
+isEmpty(LIBPYTHON) {
+ QMAKE_CXXFLAGS += $$system($$PYTHONCONFIG --cflags)
+ QMAKE_CXXFLAGS -= -Wstrict-prototypes
+ LIBS += $$system($$PYTHONCONFIG --ldflags)
+}
+else {
+ LIBS += -l$$LIBPYTHON
+}
+
mac {
# Qt is not available as univeral library and provides
# a correct -arch tag automatically