drummer/go.sh

44 lines
1.5 KiB
Bash
Raw Normal View History

#!/bin/bash
common_src_list="libnode.c datastruct.c"
main_src_list="drummer.c"
lv2_src_list="lv2_plugin.c lv2_ui.c"
# gtk_includes="-I/usr/include/gtk-3.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0"
gtk_includes="-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0"
includes="-I/usr/include/libxml2 ${gtk_includes}"
cflags="-DGTK_DISABLE_DEPRECATED"
for module in ${common_src_list} ${main_src_list} ${lv2_src_list}
do
cmd="gcc -g -c ${cflags} -I. ${includes} -o ${module//.c/.o} -fPIC ${module}"
echo ${cmd}
eval ${cmd}
done
common_libs="-ldl -lpthread -lxml2 -lz -llzma -lm -lsndfile -lsamplerate"
main_libs=""
lv2_libs=""
cmd="gcc -g -o drummer ${common_src_list//.c/.o} ${main_src_list//.c/.o} -fPIC ${common_libs} ${main_libs}"
echo ${cmd}
eval ${cmd}
cmd="gcc -g -o drummer.so ${common_src_list//.c/.o} lv2_plugin.o -shared -fPIC ${common_libs} ${lv2_libs}"
echo ${cmd}
eval ${cmd}
cmd="gcc -g -o drummer_ui.so ${common_src_list//.c/.o} lv2_ui.o -shared -fPIC ${common_libs} ${lv2_libs}"
echo ${cmd}
eval ${cmd}
cmd="./drummer-mkttl"
#echo ${cmd}
#eval ${cmd}
#gcc -g -I . -L . -shared -o drummer.so -fPIC drummer.c
#gcc -g -I. -I/usr/include/libxml2 -o xpath -fPIC -ldl -lxml2 -lz -llzma -lm xpath.c