Fixed build system (now working from cli and qteditor)

This commit is contained in:
Michaël Lemaire 2013-08-24 00:50:12 +02:00
parent 02e839406c
commit 4d8a1fe5cf
2 changed files with 22 additions and 19 deletions

View file

@ -1,5 +1,6 @@
BUILDMODE=release BUILDMODE=release
BUILDPATH=./build/${BUILDMODE} BUILDPATH=./build/${BUILDMODE}
QBUILDMODE=declarative_${BUILDMODE}
CC=gcc CC=gcc
MAKE=make -f Makefile.${BUILDMODE} MAKE=make -f Makefile.${BUILDMODE}
@ -22,28 +23,31 @@ dirs:
mkdir -p ${BUILDPATH}/testing mkdir -p ${BUILDPATH}/testing
makefiles: makefiles:
@+cd src/rendering && qmake rendering.pro "CONFIG=$(BUILDMODE)" -r -spec linux-clang @+cd src/rendering && qmake rendering.pro "CONFIG=$(QBUILDMODE)" -r -spec linux-clang
@+cd src/exploring && qmake exploring.pro "CONFIG=$(BUILDMODE)" -r -spec linux-clang @+cd src/exploring && qmake exploring.pro "CONFIG=$(QBUILDMODE)" -r -spec linux-clang
@+cd src/controlling && qmake controlling.pro "CONFIG=$(BUILDMODE)" -r -spec linux-clang @+cd src/controlling && qmake controlling.pro "CONFIG=$(QBUILDMODE)" -r -spec linux-clang
@+cd src/editing && qmake editing.pro "CONFIG=${BUILDMODE}" -r -spec linux-clang @+cd src/editing && qmake editing.pro "CONFIG=${QBUILDMODE}" -r -spec linux-clang
@+cd src/testing && qmake testing.pro "CONFIG=$(BUILDMODE)" -r -spec linux-clang @+cd src/testing && qmake testing.pro "CONFIG=$(QBUILDMODE)" -r -spec linux-clang
clean: clean:
@+cd src/rendering && qmake "CONFIG=$(BUILDMODE)" && $(MAKE) clean @+cd src/rendering && qmake "CONFIG=$(QBUILDMODE)" && $(MAKE) clean
@+cd src/exploring && qmake "CONFIG=$(BUILDMODE)" && $(MAKE) clean @+cd src/exploring && qmake "CONFIG=$(QBUILDMODE)" && $(MAKE) clean
@+cd src/controlling && qmake "CONFIG=$(BUILDMODE)" && $(MAKE) clean @+cd src/controlling && qmake "CONFIG=$(QBUILDMODE)" && $(MAKE) clean
@+cd src/editing && qmake "CONFIG=${BUILDMODE}" && $(MAKE) clean @+cd src/editing && qmake "CONFIG=${QBUILDMODE}" && $(MAKE) clean
@+cd src/testing && qmake "CONFIG=$(BUILDMODE)" && $(MAKE) clean @+cd src/testing && qmake "CONFIG=$(QBUILDMODE)" && $(MAKE) clean
rm -f src/rendering/Makefile
rm -f src/exploring/Makefile
rm -f src/controlling/Makefile
rm -f src/editing/Makefile
rm -f src/testing/Makefile
rm -f ${BUILDPATH}/paysages-cli rm -f ${BUILDPATH}/paysages-cli
rm -f ${BUILDPATH}/paysages-gui rm -f ${BUILDPATH}/paysages-gui
rm -f ${BUILDPATH}/paysages-tests rm -f ${BUILDPATH}/paysages-tests
rm -f ${BUILDPATH}/libpaysages_exploring.so* rm -f ${BUILDPATH}/libpaysages_exploring.so*
rm -f ${BUILDPATH}/libpaysages_rendering.so* rm -f ${BUILDPATH}/libpaysages_rendering.so*
ifeq (${BUILDMODE}, release)
+make BUILDMODE=debug clean
rm -f src/rendering/Makefile*
rm -f src/exploring/Makefile*
rm -f src/controlling/Makefile*
rm -f src/editing/Makefile*
rm -f src/testing/Makefile*
endif
docs: docs:
doxygen Doxyfile doxygen Doxyfile

View file

@ -1,12 +1,11 @@
INCLUDEPATH += .. INCLUDEPATH += ..
CONFIG(debug) { CONFIG(declarative_debug) {
DESTDIR = ../../build/debug/ DESTDIR = ../../build/debug/
MAKEFILE = Makefile.debug MAKEFILE = Makefile.debug
} else { } else {
DESTDIR = ../../build/release/ DESTDIR = ../../build/release/
MAKEFILE = Makefile.release MAKEFILE = Makefile.release
DEFINES += NDEBUG
} }
release:DEFINES += NDEBUG