2013-05-10 15:40:49 +00:00
|
|
|
BUILDMODE=release
|
2012-01-28 17:24:19 +00:00
|
|
|
BUILDPATH=./build/${BUILDMODE}
|
2013-04-27 19:41:57 +00:00
|
|
|
CC=gcc
|
|
|
|
MAKE=make
|
|
|
|
|
|
|
|
ifneq (,$(COMPILER))
|
|
|
|
CC=$(COMPILER)
|
|
|
|
endif
|
2012-01-28 17:24:19 +00:00
|
|
|
|
2011-12-23 22:00:19 +00:00
|
|
|
all:
|
2013-04-27 19:41:57 +00:00
|
|
|
@+cd src/rendering && $(MAKE) CC=${CC} BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
|
|
|
@+cd src/exploring && $(MAKE) CC=${CC} BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
|
|
|
@+cd src/controlling && $(MAKE) CC=${CC} BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
|
|
|
@+cd src/editing && qmake "BUILDMODE=${BUILDMODE}" "PROJECT_PATH=${CURDIR}" && $(MAKE)
|
|
|
|
@+cd src/testing && $(MAKE) CC=${CC} BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
2011-12-23 22:00:19 +00:00
|
|
|
|
|
|
|
clean:
|
2013-04-27 19:41:57 +00:00
|
|
|
cd src/rendering && $(MAKE) clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
|
|
|
cd src/exploring && $(MAKE) clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
|
|
|
cd src/controlling && $(MAKE) clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
|
|
|
cd src/editing && qmake "BUILDMODE=${BUILDMODE}" "PROJECT_PATH=${CURDIR}" && $(MAKE) clean
|
|
|
|
cd src/testing && $(MAKE) clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
2012-01-28 17:24:19 +00:00
|
|
|
rm -f ${BUILDPATH}/paysages-cli
|
2013-04-17 12:29:51 +00:00
|
|
|
rm -f ${BUILDPATH}/paysages-qt
|
2013-04-20 11:28:56 +00:00
|
|
|
rm -f ${BUILDPATH}/paysages-tests
|
2013-04-16 14:57:14 +00:00
|
|
|
rm -f ${BUILDPATH}/libpaysages_exploring.so
|
2013-04-17 12:29:51 +00:00
|
|
|
rm -f ${BUILDPATH}/libpaysages_rendering.so
|
2013-04-16 14:57:14 +00:00
|
|
|
|
2013-07-03 10:08:03 +00:00
|
|
|
docs:
|
|
|
|
doxygen Doxyfile
|
|
|
|
|
2013-05-10 15:40:49 +00:00
|
|
|
debug:
|
|
|
|
make BUILDMODE=debug all
|
|
|
|
|
2012-01-28 17:24:19 +00:00
|
|
|
release:
|
|
|
|
make BUILDMODE=release all
|
2011-12-25 21:19:32 +00:00
|
|
|
|
2013-06-16 14:12:30 +00:00
|
|
|
tests: all
|
2013-05-10 08:10:07 +00:00
|
|
|
LD_LIBRARY_PATH=${BUILDPATH} CK_DEFAULT_TIMEOUT=30 ${BUILDPATH}/paysages-tests
|
2013-04-20 11:28:56 +00:00
|
|
|
|
|
|
|
run_cli: all
|
2012-01-28 17:24:19 +00:00
|
|
|
LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-cli
|
2012-01-10 20:51:27 +00:00
|
|
|
|
2013-04-20 11:28:56 +00:00
|
|
|
run_qt: all
|
2012-01-28 17:24:19 +00:00
|
|
|
LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-qt
|
2011-12-23 22:00:19 +00:00
|
|
|
|
2012-04-22 17:12:39 +00:00
|
|
|
profile:
|
|
|
|
sudo opcontrol --setup --no-vmlinux --event=CPU_CLK_UNHALTED:3000000:0:1:1 --buffer-size=65536 --callgraph=5 --separate=none
|
|
|
|
sudo opcontrol --reset
|
|
|
|
sudo opcontrol --start
|
|
|
|
LD_LIBRARY_PATH=${BUILDPATH} ${BUILDPATH}/paysages-qt || true
|
|
|
|
sudo opcontrol --shutdown
|
|
|
|
opannotate --source --output-dir=annotated ${BUILDPATH}/libpaysages.so --base-dirs=. --search-dirs=lib_paysages
|
|
|
|
opreport -l ${BUILDPATH}/libpaysages.so -c -g | less
|
|
|
|
|
2013-06-16 17:06:10 +00:00
|
|
|
install:release
|
|
|
|
mkdir -p ${DESTDIR}/usr/bin
|
|
|
|
mkdir -p ${DESTDIR}/usr/lib
|
|
|
|
mkdir -p ${DESTDIR}/usr/share/paysages3d
|
|
|
|
cp build/release/paysages-qt ${DESTDIR}/usr/bin/paysages3d
|
|
|
|
cp build/release/libpaysages_exploring.so ${DESTDIR}/usr/lib/
|
|
|
|
cp build/release/libpaysages_rendering.so ${DESTDIR}/usr/lib/
|
|
|
|
cp data/.paysages_data ${DESTDIR}/usr/share/paysages3d/
|
|
|
|
cp -r data/i18n ${DESTDIR}/usr/share/paysages3d/
|
|
|
|
cp -r data/images ${DESTDIR}/usr/share/paysages3d/
|
|
|
|
cp cache/*.cache ${DESTDIR}/usr/share/paysages3d/
|
|
|
|
|
|
|
|
deb:
|
2013-06-21 10:51:40 +00:00
|
|
|
apt-get install pbuilder build-essential check libdevil-dev libglib2.0-dev qt4-dev-tools
|
2013-06-16 17:06:10 +00:00
|
|
|
DEBFULLNAME="Michael Lemaire" DEBEMAIL=paysages@thunderk.net dch -i -p -u low -D stable
|
|
|
|
debuild -b -us -uc
|
|
|
|
|
2012-01-28 17:24:19 +00:00
|
|
|
.PHONY:all clean release
|