From: Stefan Bund Date: Thu, 28 Oct 2010 08:32:27 +0000 (+0200) Subject: More build customization options X-Git-Url: http://g0dil.de/git?p=pykit.git;a=commitdiff_plain;h=4391c9bb04a8a36d6787f08d748a4a7fc6e701a5 More build customization options --- diff --git a/Makefile b/Makefile index 4a6c3b0..e25d314 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,8 @@ Makefile.qmake: 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: ; diff --git a/pykit.pro b/pykit.pro index a7c2b21..d9ddbb4 100644 --- a/pykit.pro +++ b/pykit.pro @@ -5,14 +5,30 @@ DEPENDPATH += . 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