Add run/tools/dcpmap
authorCarl Hetherington <cth@carlh.net>
Sun, 7 Jan 2024 23:21:48 +0000 (00:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 14 Apr 2024 15:27:36 +0000 (17:27 +0200)
run/tools/dcpmap [new file with mode: 0755]

diff --git a/run/tools/dcpmap b/run/tools/dcpmap
new file mode 100755 (executable)
index 0000000..ab23632
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+top=$DIR/../..
+export LIBDCP_RESOURCES=$top
+
+export LD_LIBRARY_PATH=$top/build/src:build/asdcplib/src:$LD_LIBRARY_PATH
+if [ "$1" == "--debug" ]; then
+    shift
+    gdb --args $top/build/tools/dcpmap "$@"
+elif [ "$1" == "--valgrind" ]; then
+    shift
+    valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpmap "$@"
+else
+    $top/build/tools/dcpmap "$@"
+fi