2013-05-10 15:40:49 +00:00
|
|
|
BUILDMODE=release
|
2014-02-18 22:10:17 +00:00
|
|
|
QTSDK=
|
2012-01-28 17:24:19 +00:00
|
|
|
BUILDPATH=./build/${BUILDMODE}
|
2013-12-11 09:17:36 +00:00
|
|
|
LIBRARY_PATH=${BUILDPATH}/system:${BUILDPATH}/basics:${BUILDPATH}/definition:${BUILDPATH}/render/software:${BUILDPATH}/render/preview:${BUILDPATH}/render/opengl:${BUILDPATH}/tests/googletest
|
2013-12-10 21:32:58 +00:00
|
|
|
BUILD_SPEC=linux-g++
|
2014-02-18 22:10:17 +00:00
|
|
|
PATH:=${QTSDK}/bin:${PATH}
|
2013-04-27 19:41:57 +00:00
|
|
|
|
2013-10-06 21:04:04 +00:00
|
|
|
all:build
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
format:
|
|
|
|
find src \( \( -name '*.cpp' -or -name '*.h' \) -and \! -path '*/googletest/*' \) -exec clang-format -i \{\} \;
|
|
|
|
|
2013-10-06 21:04:04 +00:00
|
|
|
dirs:
|
|
|
|
mkdir -p ${BUILDPATH}
|
|
|
|
|
|
|
|
makefiles:dirs
|
|
|
|
ifeq (${BUILDMODE}, release)
|
2013-12-10 21:32:58 +00:00
|
|
|
@+cd ${BUILDPATH} && qmake ../../src/paysages.pro -r -spec $(BUILD_SPEC)
|
2013-10-06 21:04:04 +00:00
|
|
|
else
|
2013-12-10 21:32:58 +00:00
|
|
|
@+cd ${BUILDPATH} && qmake ../../src/paysages.pro -r -spec $(BUILD_SPEC) CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
|
2013-04-27 19:41:57 +00:00
|
|
|
endif
|
2012-01-28 17:24:19 +00:00
|
|
|
|
2013-10-06 21:04:04 +00:00
|
|
|
build:makefiles
|
|
|
|
@+cd ${BUILDPATH} && $(MAKE)
|
2013-08-22 21:45:46 +00:00
|
|
|
|
2013-10-06 21:04:04 +00:00
|
|
|
clean:makefiles
|
|
|
|
@+cd ${BUILDPATH} && $(MAKE) clean
|
2013-08-23 22:50:12 +00:00
|
|
|
ifeq (${BUILDMODE}, release)
|
2013-10-06 21:04:04 +00:00
|
|
|
make BUILDMODE=debug clean
|
2013-08-23 22:50:12 +00:00
|
|
|
endif
|
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:
|
2013-08-22 21:45:46 +00:00
|
|
|
+make BUILDMODE=debug all
|
2013-05-10 15:40:49 +00:00
|
|
|
|
2012-01-28 17:24:19 +00:00
|
|
|
release:
|
2013-08-22 21:45:46 +00:00
|
|
|
+make BUILDMODE=release all
|
2011-12-25 21:19:32 +00:00
|
|
|
|
2015-08-03 22:00:56 +00:00
|
|
|
testscheck:
|
|
|
|
+make RUNNER='valgrind --leak-check=full' BUILDMODE=debug tests
|
|
|
|
|
2013-10-06 21:04:04 +00:00
|
|
|
tests:build
|
2013-11-11 14:42:11 +00:00
|
|
|
ifdef TESTCASE
|
2015-11-20 00:04:21 +00:00
|
|
|
LD_LIBRARY_PATH=$(LIBRARY_PATH) ${RUNNER} ${BUILDPATH}/tests/paysages-tests $(ARGS) --gtest_filter=$(TESTCASE).*
|
2013-11-11 14:42:11 +00:00
|
|
|
else
|
2015-11-20 00:04:21 +00:00
|
|
|
LD_LIBRARY_PATH=$(LIBRARY_PATH) ${RUNNER} ${BUILDPATH}/tests/paysages-tests $(ARGS)
|
2013-11-11 14:42:11 +00:00
|
|
|
endif
|
2013-04-20 11:28:56 +00:00
|
|
|
|
2015-07-22 17:31:15 +00:00
|
|
|
run:build
|
|
|
|
LD_LIBRARY_PATH=$(LIBRARY_PATH) ${RUNNER} ${BUILDPATH}/interface/modeler/quickapp/paysages-modeler $(ARGS)
|
|
|
|
|
2013-10-06 21:04:04 +00:00
|
|
|
run_cli:build
|
2014-08-20 14:45:45 +00:00
|
|
|
LD_LIBRARY_PATH=$(LIBRARY_PATH) ${RUNNER} ${BUILDPATH}/interface/commandline/paysages-cli $(ARGS)
|
2012-01-10 20:51:27 +00:00
|
|
|
|
2013-12-10 22:41:33 +00:00
|
|
|
profile:build
|
2015-07-22 17:31:15 +00:00
|
|
|
LD_LIBRARY_PATH=${LIBRARY_PATH} perf record -g ${BUILDPATH}/interface/modeler/quickapp/paysages-modeler $(ARGS)
|
2013-08-17 13:11:21 +00:00
|
|
|
perf report -g
|
|
|
|
|
2013-12-10 22:41:33 +00:00
|
|
|
profile_cli:build
|
2014-08-20 14:45:45 +00:00
|
|
|
LD_LIBRARY_PATH=${LIBRARY_PATH} perf record -g ${BUILDPATH}/interface/commandline/paysages-cli $(ARGS)
|
2013-08-17 13:11:21 +00:00
|
|
|
perf report -g
|
2012-04-22 17:12:39 +00:00
|
|
|
|
2015-11-29 18:18:36 +00:00
|
|
|
gltrace:build
|
|
|
|
rm -f *.trace
|
|
|
|
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/apitrace/wrappers/glxtrace.so LD_LIBRARY_PATH=$(LIBRARY_PATH) ${BUILDPATH}/interface/modeler/quickapp/paysages-modeler $(ARGS)
|
|
|
|
qapitrace paysages-modeler.trace
|
|
|
|
|
2013-12-10 22:41:33 +00:00
|
|
|
package:build
|
2013-10-23 20:00:18 +00:00
|
|
|
rm -rf paysages3d-linux
|
2013-10-23 20:57:09 +00:00
|
|
|
rm -f paysages3d-linux.tar.bz2
|
2013-10-23 20:00:18 +00:00
|
|
|
mkdir paysages3d-linux
|
|
|
|
mkdir paysages3d-linux/lib
|
|
|
|
cp $(BUILDPATH)/system/libpaysages_system.so* paysages3d-linux/lib/
|
2013-11-09 18:00:14 +00:00
|
|
|
cp $(BUILDPATH)/basics/libpaysages_basics.so* paysages3d-linux/lib/
|
|
|
|
cp $(BUILDPATH)/definition/libpaysages_definition.so* paysages3d-linux/lib/
|
|
|
|
cp $(BUILDPATH)/render/software/libpaysages_render_software.so* paysages3d-linux/lib/
|
2013-12-17 22:01:36 +00:00
|
|
|
cp $(BUILDPATH)/render/preview/libpaysages_render_preview.so* paysages3d-linux/lib/
|
2013-11-09 18:00:14 +00:00
|
|
|
cp $(BUILDPATH)/render/opengl/libpaysages_render_opengl.so* paysages3d-linux/lib/
|
2015-07-28 17:03:10 +00:00
|
|
|
cp $(BUILDPATH)/interface/modeler/quickapp/paysages-modeler paysages3d-linux/lib/
|
|
|
|
chmod +x paysages3d-linux/lib/paysages-modeler
|
2013-10-23 20:00:18 +00:00
|
|
|
cp -r data paysages3d-linux/
|
|
|
|
cp dist/paysages3d.sh paysages3d-linux/
|
|
|
|
chmod +x paysages3d-linux/paysages3d.sh
|
2013-10-23 20:57:09 +00:00
|
|
|
cp dist/collectlib.sh paysages3d-linux/
|
|
|
|
chmod +x paysages3d-linux/collectlib.sh
|
|
|
|
cd paysages3d-linux && ./collectlib.sh && rm collectlib.sh && cd -
|
2013-10-23 20:00:18 +00:00
|
|
|
tar -cjvvf paysages3d-linux.tar.bz2 paysages3d-linux/
|
2013-06-16 17:06:10 +00:00
|
|
|
|
2013-10-06 21:04:04 +00:00
|
|
|
.PHONY:all clean release build
|