2022-04-20 12:37:32 +02:00
|
|
|
#!/bin/bash
|
2022-03-20 23:46:24 +01:00
|
|
|
|
2023-07-28 01:14:53 +02:00
|
|
|
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}
|
2022-04-20 12:37:32 +02:00
|
|
|
do
|
2023-07-28 01:14:53 +02:00
|
|
|
cmd="gcc -g -c ${cflags} -I. ${includes} -o ${module//.c/.o} -fPIC ${module}"
|
2022-04-20 12:37:32 +02:00
|
|
|
|
|
|
|
echo ${cmd}
|
|
|
|
eval ${cmd}
|
|
|
|
done
|
|
|
|
|
2023-07-28 01:14:53 +02:00
|
|
|
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}"
|
2022-04-20 12:37:32 +02:00
|
|
|
|
2023-07-28 01:14:53 +02:00
|
|
|
echo ${cmd}
|
|
|
|
eval ${cmd}
|
2022-04-20 12:37:32 +02:00
|
|
|
|
2023-07-28 01:14:53 +02:00
|
|
|
cmd="gcc -g -o drummer.so ${common_src_list//.c/.o} lv2_plugin.o -shared -fPIC ${common_libs} ${lv2_libs}"
|
2022-03-20 23:46:24 +01:00
|
|
|
|
2022-04-20 12:37:32 +02:00
|
|
|
echo ${cmd}
|
|
|
|
eval ${cmd}
|
|
|
|
|
2023-07-28 01:14:53 +02:00
|
|
|
cmd="gcc -g -o drummer_ui.so ${common_src_list//.c/.o} lv2_ui.o -shared -fPIC ${common_libs} ${lv2_libs}"
|
2022-04-20 12:37:32 +02:00
|
|
|
|
|
|
|
echo ${cmd}
|
|
|
|
eval ${cmd}
|
|
|
|
|
|
|
|
cmd="./drummer-mkttl"
|
|
|
|
|
|
|
|
#echo ${cmd}
|
|
|
|
#eval ${cmd}
|
|
|
|
#gcc -g -I . -L . -shared -o drummer.so -fPIC drummer.c
|
2022-03-20 23:46:24 +01:00
|
|
|
#gcc -g -I. -I/usr/include/libxml2 -o xpath -fPIC -ldl -lxml2 -lz -llzma -lm xpath.c
|