2016-03-24 14:53:27 -04:00
|
|
|
#!/bin/bash
|
2016-03-25 20:06:33 -04:00
|
|
|
cd `dirname $0`
|
2016-03-24 14:53:27 -04:00
|
|
|
set -e
|
|
|
|
make
|
|
|
|
cd ../..
|
|
|
|
test -f libs/ardour/ardour/ardour.h
|
|
|
|
LLVMINCLUDE="-I /usr/lib/llvm-3.6/include -I /usr/lib/llvm-3.6/lib/clang/3.6.2/include/"
|
|
|
|
|
|
|
|
TMPFILE=`mktemp`
|
|
|
|
trap 'rm -f $TMPFILE' exit SIGINT SIGTERM
|
|
|
|
|
|
|
|
echo "# analyzing source.. -> $TMPFILE"
|
2016-04-12 07:53:02 -04:00
|
|
|
time ./tools/doxy2json/doxy2json -j 4 \
|
2016-03-30 19:14:35 -04:00
|
|
|
$LLVMINCLUDE \
|
|
|
|
-D PACKAGE=\"doc\" \
|
|
|
|
-D PROGRAM_NAME=\"Ardour\" -D PROGRAM_VERSION=\"4\" -D LOCALEDIR=\"/\" \
|
|
|
|
-D ARCH_X86 -D CONFIG_ARCH=\"x86_64\" -D WAF_BUILD \
|
|
|
|
-D HAVE_AUBIO=1 -D HAVE_ALSA=1 -D HAVE_GLIB=1 -D HAVE_LIBS_LUA=1 -D HAVE_XML=1 -D PTFORMAT=1 \
|
|
|
|
-D HAVE_SAMPLERATE=1 -D HAVE_LV2=1 -D HAVE_LV2_1_2_0=1 -D HAVE_LV2_1_10_0=1 -D HAVE_SERD=1 -D HAVE_SORD=1 -D HAVE_SRATOM=1 -D HAVE_LILV=1 -D HAVE_LV2_1_0_0=1 \
|
|
|
|
-D HAVE_LILV_0_16_0=1 -D HAVE_LILV_0_19_2=1 -D HAVE_LILV_0_21_3=1 -D HAVE_SUIL=1 -D LV2_SUPPORT=1 -D LV2_EXTENDED=1 -D HAVE_GTK=1 -D HAVE_LIBS_GTKMM2EXT=1 \
|
|
|
|
-D HAVE_X11=1 -D LXVST_64BIT=1 -D LXVST_SUPPORT=1 -D HAVE_TAGLIB=1 -D HAVE_POSIX_MEMALIGN=1 -D HAVE_VAMPSDK=1 -D HAVE_VAMPHOSTSDK=1 -D HAVE_RUBBERBAND=1 -D ENABLE_NLS=1 \
|
2016-10-03 22:45:35 -04:00
|
|
|
-D HAVE_CURL=1 -D HAVE_LO=1 -D HAVE_LRDF=1 -D _VAMP_NO_PLUGIN_NAMESPACE=1 \
|
2017-09-25 11:12:32 -04:00
|
|
|
-I libs/ardour -I libs/pbd -I libs/lua -I gtk2_ardour -I libs/temporal -I libs/audiographer -I libs/ptformat -I libs/fst \
|
2017-07-17 15:02:38 -04:00
|
|
|
-I libs/ltc -I libs/evoral -I libs/canvas -I libs/gtkmm2ext -I libs/midi++2 -I libs/surfaces/control_protocol \
|
|
|
|
-I libs/waveview -I libs/widgets -I libs -I build/libs/pbd -I build/libs/ardour -I build/gtk2_ardour \
|
2016-03-30 19:14:35 -04:00
|
|
|
`pkg-config --cflags glib-2.0 glibmm-2.4 cairomm-1.0 gtkmm-2.4 libxml-2.0 lilv-0 suil-0 | sed 's/-std=c++11 //;s/-pthread //'` \
|
2016-03-25 11:31:16 -04:00
|
|
|
-X "_" -X "::" -X "sigc" -X "Atk::" -X "Gdk::" -X "Gtk::" -X "Gio::" \
|
|
|
|
-X "Glib::" -X "Pango::" -X "luabridge::" \
|
2016-03-30 19:14:35 -04:00
|
|
|
\
|
|
|
|
libs/ardour/*.cc libs/pbd/*.cc \
|
|
|
|
gtk2_ardour/*.cc \
|
2016-03-24 14:53:27 -04:00
|
|
|
/usr/include/cairomm-1.0/cairomm/context.h \
|
2016-10-03 22:45:35 -04:00
|
|
|
/usr/include/vamp-sdk/Plugin.h \
|
2016-03-24 14:53:27 -04:00
|
|
|
> $TMPFILE
|
|
|
|
|
|
|
|
ls -lh $TMPFILE
|
|
|
|
|
|
|
|
echo "# consolidating JSON"
|
|
|
|
php << EOF
|
|
|
|
<?php
|
|
|
|
\$json = file_get_contents ('$TMPFILE');
|
|
|
|
\$api = array ();
|
|
|
|
foreach (json_decode (\$json, true) as \$a) {
|
|
|
|
if (!isset (\$a['decl'])) { continue; }
|
|
|
|
|
|
|
|
\$a['decl'] = str_replace ('size_t', 'unsigned long', \$a['decl']);
|
2016-03-24 19:43:15 -04:00
|
|
|
\$a['decl'] = str_replace ('uint32_t', 'unsigned int', \$a['decl']);
|
2016-03-25 11:31:16 -04:00
|
|
|
\$a['decl'] = str_replace ('int32_t', 'int', \$a['decl']);
|
2016-03-24 19:43:15 -04:00
|
|
|
\$a['decl'] = str_replace ('framepos_t', 'long', \$a['decl']);
|
2016-03-25 11:31:16 -04:00
|
|
|
\$a['decl'] = str_replace ('framecnt_t', 'long', \$a['decl']);
|
2016-03-24 19:43:15 -04:00
|
|
|
\$a['decl'] = str_replace ('frameoffset_t', 'long', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('int64_t', 'long', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('uint8_t', 'unsigned char', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('pframes_t', 'unsigned int', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('uint64_t', 'unsigned long', \$a['decl']);
|
2016-03-24 20:22:23 -04:00
|
|
|
\$a['decl'] = str_replace ('const char', 'char', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('const float', 'float', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('const double', 'double', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('const long', 'long', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('const unsigned int', 'unsigned int', \$a['decl']);
|
|
|
|
\$a['decl'] = str_replace ('const unsigned long', 'unsigned long', \$a['decl']);
|
2016-10-04 22:21:09 -04:00
|
|
|
\$a['decl'] = str_replace (' ::Vamp::', ' Vamp::', \$a['decl']);
|
2016-03-24 14:53:27 -04:00
|
|
|
\$canon = str_replace (' *', '*', \$a['decl']);
|
|
|
|
\$api[\$canon] = \$a;
|
2016-03-25 11:31:16 -04:00
|
|
|
}
|
2016-03-24 14:53:27 -04:00
|
|
|
\$jout = array ();
|
|
|
|
foreach (\$api as \$k => \$a) {
|
|
|
|
\$jout[] = \$a;
|
|
|
|
}
|
2016-03-24 17:02:38 -04:00
|
|
|
file_put_contents('doc/ardourapi.json.gz', gzencode (json_encode (\$jout, JSON_PRETTY_PRINT)));
|
2016-03-24 14:53:27 -04:00
|
|
|
EOF
|
|
|
|
|
2016-03-24 17:02:38 -04:00
|
|
|
ls -l doc/ardourapi.json.gz
|