diff --git a/cli/Makefile.am b/cli/Makefile.am
deleted file mode 100644
index 5648be6..0000000
--- a/cli/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-lib_LTLIBRARIES = librtbuf_cli.la
-librtbuf_cli_la_LIBADD = ../librtbuf/.libs/librtbuf.la ${RTBUF_LIBS}
-librtbuf_cli_la_SOURCES = \
- cli.c \
- rtbuf_cli.c
-
-bin_PROGRAMS = rtbuf
-rtbuf_LDADD = librtbuf_cli.la
-rtbuf_SOURCES = \
- rtbuf_cli_main.c
-
-rtbuf_includedir = $(includedir)/rtbuf
-rtbuf_include_HEADERS = \
- include/rtbuf/cli.h
diff --git a/configure b/configure
index 8b15833..a47ad90 100755
--- a/configure
+++ b/configure
@@ -6,5 +6,5 @@ set -e
(cd librtbuf && pwd && ./configure)
(cd lib && pwd && ./configure)
(cd cli && pwd && ./configure)
-#(cd gtk3 && pwd && ./configure)
+(cd gtk3 && pwd && ./configure)
#(cd test && pwd && ./configure)
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index f0bb1ca..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,184 +0,0 @@
-AC_PREREQ([2.59])
-AC_INIT([rtbuf], [0.3], [kmx.io], [rtbuf], [http://kmx.io/])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_MACRO_DIR([build-aux/m4])
-AC_CONFIG_SRCDIR([librtbuf/rtbuf.c])
-AC_CONFIG_HEADERS([config.h:config.h.in])
-
-AM_INIT_AUTOMAKE
-AM_PROG_AR
-
-AC_PROG_CC
-
-LT_INIT([disable-static])
-
-PKG_PROG_PKG_CONFIG([0.25])
-
-if test -d /usr/local/include; then
- CPPFLAGS="$CPPFLAGS -I/usr/local/include"
-fi
-if test -d /usr/local/lib; then
- LDFLAGS="$LDFLAGS -L/usr/local/lib"
-fi
-
-if test -d /usr/include; then
- CPPFLAGS="$CPPFLAGS -I/usr/include"
-fi
-if test -d /usr/lib; then
- LDFLAGS="$LDFLAGS -L/usr/lib"
-fi
-
-CPPFLAGS="-I${PWD}/librtbuf/include -I${PWD}/cli/include -I${PWD}/lib/include $CPPFLAGS"
-CFLAGS="$CFLAGS -std=c89 -W -Wall -Werror -D_DEFAULT_SOURCE"
-
-AC_CHECK_FUNC([strlcpy], [echo using system strlcpy],
- AC_SEARCH_LIBS([strlcpy], [bsd],
- [LIBRTBUF_CFLAGS="-I/usr/include/bsd -DLIBBSD_OVERLAY"
- LIBRTBUF_LIBS="$LIBRTBUF_LIBS -lbsd"]))
-AC_SUBST([LIBRTBUF_CFLAGS])
-AC_SUBST([LIBRTBUF_LIBS])
-
-AC_CHECK_LIB(m, log2, [AC_DEFINE([HAVE_LOG2],[1],[Define to 1 if your system has 'log2'.])])
-
-AC_ARG_ENABLE([gtk3],
- [AS_HELP_STRING([--disable-gtk3], [do not build GTK+3 GUI])],
- [],
- [enable_gtk3=check])
-if test x"$enable_gtk3" != x"no"; then
- PKG_CHECK_MODULES([GTK3], [gtk+-3.0],
- [enable_gtk3=yes],
- [enable_gtk3=no])
-fi
-AM_CONDITIONAL([ENABLE_GTK3], [test x"$enable_gtk3" = x"yes"])
-AC_SUBST([GTK3_LIBS])
-AC_SUBST([GTK3_CFLAGS])
-
-AC_ARG_ENABLE([rtbuf],
- [AS_HELP_STRING([--disable-rtbuf], [do not build rtbuf CLI])],
- [],
- [enable_rtbuf=yes])
-if test x"$enable_rtbuf" = x"yes"; then
-
- AC_SEARCH_LIBS([pthread_create], [pthread],
- [RTBUF_LIBS="$RTBUF_LIBS -lpthread"],
- [AC_MSG_ERROR([missing libpthread for rtbuf])])
-
- AC_CHECK_FUNC([dlopen], [echo using system dlopen],
- AC_SEARCH_LIBS([dlopen], [dl],
- [RTBUF_LIBS="$RTBUF_LIBS -ldl"]))
-
- AC_CHECK_LIB([readline], [readline],
- [RTBUF_LIBS="$RTBUF_LIBS -lreadline"],
- AC_MSG_ERROR(missing readline library for rtbuf))
-
- AC_CHECK_LIB([termcap], [tputs],
- [RTBUF_LIBS="$RTBUF_LIBS -ltermcap"],
- AC_MSG_ERROR(missing termcap library for rtbuf))
-
- AC_SUBST([RTBUF_LIBS])
-fi
-AM_CONDITIONAL([ENABLE_RTBUF], [test x"$enable_rtbuf" = x"true"])
-
-MUSIC_LIBS="-lm"
-AC_SUBST([MUSIC_LIBS])
-
-AC_ARG_ENABLE([signal],
- [AS_HELP_STRING([--disable-signal], [do not build rtbuf signal library])],
- [],
- [enable_signal=yes])
-if test x"$enable_signal" = x"yes"; then
- SIGNAL_LIBS="-lm"
- AC_SUBST([SIGNAL_LIBS])
-fi
-AM_CONDITIONAL([ENABLE_SIGNAL], [test x"$enable_signal" = x"yes"])
-
-AC_ARG_ENABLE([sndio],
- [AS_HELP_STRING([--disable-sndio], [do not build rtbuf sndio library])],
- [],
- [enable_sndio=check])
-if test x"$enable_sndio" != x"no"; then
- SNDIO_LIBS=
- AC_SEARCH_LIBS([sio_open], [sndio],
- [enable_sndio=yes
- SNDIO_LIBS=-lsndio],
- [enable_sndio=no])
- AC_SUBST([SNDIO_LIBS])
-fi
-AM_CONDITIONAL([ENABLE_SNDIO], [test x"$enable_sndio" = x"yes"])
-
-AC_ARG_ENABLE([portaudio],
- [AS_HELP_STRING([--enable-portaudio], [build rtbuf portaudio library])],
- [],
- [enable_portaudio=check])
-if test x"$enable_portaudio" != x"no"; then
- PORTAUDIO_LIBS=
- AC_SEARCH_LIBS([Pa_Initialize], [portaudio],
- [enable_portaudio=yes
- PORTAUDIO_LIBS=-lportaudio],
- [enable_portaudio=no])
- AC_SUBST([PORTAUDIO_LIBS])
-fi
-AM_CONDITIONAL([ENABLE_PORTAUDIO], [test x"$enable_portaudio" = x"yes"])
-
-AC_ARG_ENABLE([glfw3],
- [AS_HELP_STRING([--enable-glfw3], [build rtbuf OpenGL library])],
- [],
- [enable_glfw3=check])
-if test x"$enable_glfw3" != x"no"; then
- PKG_CHECK_MODULES([GLFW3], [glfw3],
- [enable_glfw3=yes],
- [enable_glfw3=no])
- AC_SUBST([GLFW3_CFLAGS])
- AC_SUBST([GLFW3_LIBS])
-fi
-AM_CONDITIONAL([ENABLE_GLFW3], [test x"$enable_glfw3" = x"yes"])
-
-LIBS=
-
-AC_PREFIX_DEFAULT([~/.rtbuf])
-
-AC_ARG_ENABLE(debug,
- AS_HELP_STRING([--enable-debug],
- [enable debugging, default: yes]),
- [],
- [enable_debug=yes])
-if test x"$enable_debug" = x"yes"; then
- CFLAGS="$CFLAGS -DDEBUG -O0 -ggdb"
-else
- CFLAGS="$CFLAGS -DNDEBUG -O2"
-fi
-AM_CONDITIONAL([DEBUG], [test x"$enable_debug" = x"true"])
-
-AC_ARG_ENABLE([nsis],
- [AS_HELP_STRING([--enable-nsis], [build rtbuf NSIS installer])],
- [],
- [enable_nsis=check])
-if test x"$enable_nsis" != x"no"; then
- AC_CHECK_PROG([enable_nsis],
- [makensis],
- [enable_nsis=yes],
- [enable_nsis=no])
-fi
-AM_CONDITIONAL([ENABLE_NSIS], [test x"$enable_nsis" = x"yes"])
-
-AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([cli/Makefile])
-AC_CONFIG_FILES([gtk3/Makefile])
-AC_CONFIG_FILES([lib/Makefile])
-AC_CONFIG_FILES([lib/dynamic/Makefile])
-AC_CONFIG_FILES([lib/glfw3/Makefile])
-AC_CONFIG_FILES([lib/portaudio/Makefile])
-AC_CONFIG_FILES([lib/signal/Makefile])
-AC_CONFIG_FILES([lib/sndio/Makefile])
-AC_CONFIG_FILES([lib/synth/Makefile])
-AC_CONFIG_FILES([librtbuf/Makefile])
-AC_OUTPUT
-
-echo "Building status :"
-echo " librtbuf : true $LIBRTBUF_LIBS"
-echo " rtbuf-gtk3 : $enable_gtk3 $GTK3_LIBS"
-echo " rtbuf : $enable_rtbuf $RTBUF_LIBS"
-echo " lib/signal : $enable_signal $SIGNAL_LIBS"
-echo " lib/sndio : $enable_sndio $SNDIO_LIBS"
-echo " lib/portaudio : $enable_portaudio $PORTAUDIO_LIBS"
-echo " lib/glfw3 : $enable_glfw3 $GLFW3_LIBS"
diff --git a/gtk3/Makefile b/gtk3/Makefile
new file mode 100644
index 0000000..088f77a
--- /dev/null
+++ b/gtk3/Makefile
@@ -0,0 +1,21 @@
+CLEANFILES=
+
+all: rtbuf-gtk3
+
+clean:
+ rm -rf .libs *.o *.lo *.la rtbuf-gtk3 ${CLEANFILES}
+
+rtbuf_gtk3_UI = \
+ rtbuf_gtk3_input_widget.ui \
+ rtbuf_gtk3_modular.ui \
+ rtbuf_gtk3_output_widget.ui \
+ rtbuf_gtk3_widget.ui
+
+rtbuf_gtk3_resources.c: rtbuf_gtk3.gresource.xml ${rtbuf_gtk3_UI}
+ glib-compile-resources rtbuf_gtk3.gresource.xml --target=rtbuf_gtk3_resources.c --generate-source
+
+CLEANFILES = rtbuf_gtk3_resources.c
+
+.PHONY: all clean
+
+.include "config.mk"
diff --git a/gtk3/Makefile.am b/gtk3/Makefile.am
deleted file mode 100644
index a8d1a1b..0000000
--- a/gtk3/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-if ENABLE_GTK3
-
-bin_PROGRAMS = rtbuf-gtk3
-rtbuf_gtk3_CFLAGS = ${GTK3_CFLAGS}
-rtbuf_gtk3_LDADD = ${GTK3_LIBS} ../librtbuf/librtbuf.la \
- ../cli/librtbuf_cli.la
-rtbuf_gtk3_SOURCES = \
- list.c \
- queue.c \
- rtbuf_gtk3.c \
- rtbuf_gtk3_connection.c \
- rtbuf_gtk3_input.c \
- rtbuf_gtk3_library.c \
- rtbuf_gtk3_output.c \
- rtbuf_gtk3_resources.c \
- rtbuf_gtk3_rtbuf.c \
- rtbuf_gtk3_rtbuf_info.c \
- rtbuf_gtk3_input_widget.c \
- rtbuf_gtk3_output_widget.c \
- rtbuf_gtk3_widget.c \
- stack.c
-
-rtbuf_includedir = $(includedir)/rtbuf
-rtbuf_include_HEADERS = \
- list.h \
- queue.h \
- rtbuf_gtk3.h \
- rtbuf_gtk3_library.h \
- rtbuf_gtk3_rtbuf_info.h \
- rtbuf_gtk3_input_widget.h \
- rtbuf_gtk3_output_widget.h \
- rtbuf_gtk3_widget.h \
- stack.h
-
-rtbuf_gtk3_UI = \
- rtbuf_gtk3_input_widget.ui \
- rtbuf_gtk3_modular.ui \
- rtbuf_gtk3_output_widget.ui \
- rtbuf_gtk3_widget.ui
-rtbuf_gtk3_resources.c: rtbuf_gtk3.gresource.xml ${rtbuf_gtk3_UI}
- glib-compile-resources rtbuf_gtk3.gresource.xml --target=rtbuf_gtk3_resources.c --generate-source
-
-CLEANFILES = \
- rtbuf_gtk3_resources.c
-
-endif
diff --git a/gtk3/configure b/gtk3/configure
new file mode 100755
index 0000000..3dbf17b
--- /dev/null
+++ b/gtk3/configure
@@ -0,0 +1,46 @@
+#!/bin/sh
+set -e
+
+. ../config.subr
+
+PROG=rtbuf-gtk3
+
+SOURCES="$(ls *.c | tr '\n' ' ')"
+echo "SOURCES = $SOURCES" >> ${CONFIG_MK}
+
+OBJECTS="$(c2o "$SOURCES")"
+echo "OBJECTS = $OBJECTS" >> ${CONFIG_MK}
+
+CPPFLAGS=
+if test -d /usr/local/include; then
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ CPPFLAGS="$CPPFLAGS $(pkg-config --cflags-only-I gtk+-3.0)"
+fi
+echo "CPPFLAGS = $CPPFLAGS" >> ${CONFIG_MK}
+
+if [ x"$DEBUG" = x"yes" ]; then
+ CFLAGS="-DDEBUG -O0 -ggdb"
+else
+ CFLAGS="-DNDEBUG -O3"
+fi
+CFLAGS="$CFLAGS -W -Wall -Werror"
+CFLAGS="$CFLAGS $(pkg-config --cflags-only-other gtk+-3.0)"
+echo "CFLAGS = $CFLAGS" >> ${CONFIG_MK}
+
+LDFLAGS="-pthread"
+echo "LDFLAGS = $LDFLAGS" >> ${CONFIG_MK}
+
+LIBS="../librtbuf/librtbuf.la ../cli/librtbuf_cli.la"
+LIBS="$LIBS $(pkg-config --libs gtk+-3.0)"
+echo "LIBS = $LIBS" >> ${CONFIG_MK}
+
+for SRC in $SOURCES; do
+ SRC_O=$(c2o $SRC)
+ echo >> ${CONFIG_MK}
+ o_rule $SRC >> ${CONFIG_MK}
+ echo "\t\${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_O" >> ${CONFIG_MK}
+done
+
+echo >> ${CONFIG_MK}
+echo "$PROG: $OBJECTS" >> ${CONFIG_MK}
+echo "\t${LIBTOOL} --tag=CC --mode=link \${CC} \${LDFLAGS} ${OBJECTS} ${LIBS} -o $PROG" >> ${CONFIG_MK}
diff --git a/gtk3/rtbuf_gtk3.c b/gtk3/rtbuf_gtk3.c
index 88d9347..ae2185e 100644
--- a/gtk3/rtbuf_gtk3.c
+++ b/gtk3/rtbuf_gtk3.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -19,14 +19,14 @@
#include <time.h>
#include <pthread.h>
#include <gtk/gtk.h>
-#include <rtbuf/rtbuf.h>
-#include <rtbuf/lib.h>
-#include <rtbuf/var.h>
-#include <rtbuf/cli.h>
-#include "rtbuf_gtk.h"
-#include "rtbuf_gtk_library.h"
-#include "rtbuf_input_widget.h"
-#include "rtbuf_widget.h"
+#include "../librtbuf/rtbuf.h"
+#include "../librtbuf/lib.h"
+#include "../librtbuf/var.h"
+#include "../cli/rtbuf_cli.h"
+#include "rtbuf_gtk3.h"
+#include "rtbuf_gtk3_library.h"
+#include "rtbuf_gtk3_input_widget.h"
+#include "rtbuf_gtk3_widget.h"
#include "stack.h"
extern int snprintf (char *, size_t, const char *, ...);
@@ -223,7 +223,7 @@ void rtbuf_gtk_modular_close (GtkWidget *widget,
(void) widget;
(void) data;
printf("rtbuf-gtk modular close\n");
- gtk_main_quit();
+ exit(0);
}
void rtbuf_gtk_modular_draw_arrow (cairo_t *cr, int x1, int y1,
@@ -452,9 +452,9 @@ int rtbuf_gtk_builder ()
{
GError *error = NULL;
builder = gtk_builder_new ();
- if (gtk_builder_add_from_resource(builder, "/rtbuf/rtbuf_modular.ui",
+ if (gtk_builder_add_from_resource(builder, "/rtbuf/rtbuf_gtk3_modular.ui",
&error) == 0) {
- g_printerr("Error loading resource /rtbuf/rtbuf_modular.ui: %s\n",
+ g_printerr("Error loading resource /rtbuf/rtbuf_gtk3_modular.ui: %s\n",
error->message);
g_clear_error(&error);
return 1;
diff --git a/gtk3/rtbuf_gtk3.gresource.xml b/gtk3/rtbuf_gtk3.gresource.xml
index 41b0bcc..12ef9da 100644
--- a/gtk3/rtbuf_gtk3.gresource.xml
+++ b/gtk3/rtbuf_gtk3.gresource.xml
@@ -4,10 +4,10 @@
<file>player_play.png</file>
<file>player_stop.png</file>
<file>rtbuf.png</file>
- <file preprocess="xml-stripblanks">rtbuf_input_widget.ui</file>
- <file preprocess="xml-stripblanks">rtbuf_modular.ui</file>
- <file preprocess="xml-stripblanks">rtbuf_output_widget.ui</file>
- <file preprocess="xml-stripblanks">rtbuf_widget.ui</file>
+ <file preprocess="xml-stripblanks">rtbuf_gtk3_input_widget.ui</file>
+ <file preprocess="xml-stripblanks">rtbuf_gtk3_modular.ui</file>
+ <file preprocess="xml-stripblanks">rtbuf_gtk3_output_widget.ui</file>
+ <file preprocess="xml-stripblanks">rtbuf_gtk3_widget.ui</file>
</gresource>
<gresource prefix="/org/gtk/libgtk/icons/24x24/status/">
<file>image-missing.png</file>
diff --git a/gtk3/rtbuf_gtk3.h b/gtk3/rtbuf_gtk3.h
index bf6a162..f50673d 100644
--- a/gtk3/rtbuf_gtk3.h
+++ b/gtk3/rtbuf_gtk3.h
@@ -17,11 +17,11 @@
#define RTBUF_GTK_H
#include <gtk/gtk.h>
-#include "rtbuf_gtk_connection.h"
-#include "rtbuf_gtk_rtbuf_info.h"
-#include "rtbuf_input_widget.h"
-#include "rtbuf_output_widget.h"
-#include "rtbuf_widget.h"
+#include "rtbuf_gtk3_connection.h"
+#include "rtbuf_gtk3_rtbuf_info.h"
+#include "rtbuf_gtk3_input_widget.h"
+#include "rtbuf_gtk3_output_widget.h"
+#include "rtbuf_gtk3_widget.h"
typedef struct signal_binding {
const char *signal;
diff --git a/gtk3/rtbuf_gtk3_connection.c b/gtk3/rtbuf_gtk3_connection.c
index 159b9f9..ab0c745 100644
--- a/gtk3/rtbuf_gtk3_connection.c
+++ b/gtk3/rtbuf_gtk3_connection.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,8 +15,8 @@
*/
#include <assert.h>
-#include <rtbuf/data.h>
-#include "rtbuf_gtk.h"
+#include "../librtbuf/data.h"
+#include "rtbuf_gtk3.h"
s_data_type g_rtbuf_gtk_connection_type = {
sizeof(s_rtbuf_gtk_connection) * 8,
diff --git a/gtk3/rtbuf_gtk3_connection.h b/gtk3/rtbuf_gtk3_connection.h
index 19efd9d..52a51be 100644
--- a/gtk3/rtbuf_gtk3_connection.h
+++ b/gtk3/rtbuf_gtk3_connection.h
@@ -1,8 +1,23 @@
+/*
+ * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
#ifndef RTBUF_GTK_CONNECTION_H
#define RTBUF_GTK_CONNECTION_H
-#include "rtbuf_input_widget.h"
-#include "rtbuf_output_widget.h"
+#include "rtbuf_gtk3_input_widget.h"
+#include "rtbuf_gtk3_output_widget.h"
typedef struct rtbuf_gtk_connection s_rtbuf_gtk_connection;
diff --git a/gtk3/rtbuf_gtk3_input.c b/gtk3/rtbuf_gtk3_input.c
index 42577d3..d771d15 100644
--- a/gtk3/rtbuf_gtk3_input.c
+++ b/gtk3/rtbuf_gtk3_input.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -17,9 +17,9 @@
#include <assert.h>
#include <gtk/gtk.h>
#include <stdio.h>
-#include <rtbuf/rtbuf.h>
-#include "rtbuf_gtk.h"
-#include "rtbuf_input_widget.h"
+#include "../librtbuf/rtbuf.h"
+#include "rtbuf_gtk3.h"
+#include "rtbuf_gtk3_input_widget.h"
void rtbuf_gtk_input_disconnect (RtbufInputWidget *widget)
{
@@ -50,7 +50,7 @@ void rtbuf_gtk_input_menu (RtbufInputWidget *widget, GdkEvent *event)
signal,
0,
NULL,
- G_CALLBACK(rtbuf_gtk_input_disconnect),
+ (void*) G_CALLBACK(rtbuf_gtk_input_disconnect),
NULL);
g_signal_connect_swapped(G_OBJECT(disconnect), "activate",
G_CALLBACK(rtbuf_gtk_input_disconnect),
diff --git a/gtk3/rtbuf_gtk3_input_widget.c b/gtk3/rtbuf_gtk3_input_widget.c
index aeebe29..6a2ca74 100644
--- a/gtk3/rtbuf_gtk3_input_widget.c
+++ b/gtk3/rtbuf_gtk3_input_widget.c
@@ -17,9 +17,9 @@
#include <assert.h>
#include <math.h>
#include <gtk/gtk.h>
-#include "rtbuf_gtk.h"
-#include "rtbuf_input_widget.h"
-#include <rtbuf/rtbuf.h>
+#include "rtbuf_gtk3.h"
+#include "rtbuf_gtk3_input_widget.h"
+#include "../librtbuf/rtbuf.h"
struct _RtbufInputWidgetPrivate {
s_rtbuf *rtbuf;
diff --git a/gtk3/rtbuf_gtk3_input_widget.h b/gtk3/rtbuf_gtk3_input_widget.h
index 5add3ed..fa159a6 100644
--- a/gtk3/rtbuf_gtk3_input_widget.h
+++ b/gtk3/rtbuf_gtk3_input_widget.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +17,7 @@
#ifndef RTBUF_INPUT_WIDGET_H
#define RTBUF_INPUT_WIDGET_H
-#include <rtbuf/rtbuf.h>
+#include "../librtbuf/rtbuf.h"
#define RTBUF_INPUT_WIDGET_TYPE \
(rtbuf_input_widget_get_type())
diff --git a/gtk3/rtbuf_gtk3_library.c b/gtk3/rtbuf_gtk3_library.c
index 08696a8..7d4e61b 100644
--- a/gtk3/rtbuf_gtk3_library.c
+++ b/gtk3/rtbuf_gtk3_library.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -21,9 +21,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
-#include <rtbuf/rtbuf.h>
-#include <rtbuf/lib.h>
-#include "rtbuf_gtk_library.h"
+#include "../librtbuf/rtbuf.h"
+#include "../librtbuf/lib.h"
+#include "rtbuf_gtk3_library.h"
#include "queue.h"
s_rtbuf_gtk_library_tree *g_rtbuf_gtk_library_tree = NULL;
diff --git a/gtk3/rtbuf_gtk3_output.c b/gtk3/rtbuf_gtk3_output.c
index 36e8991..71df7b5 100644
--- a/gtk3/rtbuf_gtk3_output.c
+++ b/gtk3/rtbuf_gtk3_output.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -17,9 +17,9 @@
#include <assert.h>
#include <gtk/gtk.h>
#include <stdio.h>
-#include <rtbuf/rtbuf.h>
-#include "rtbuf_gtk.h"
-#include "rtbuf_output_widget.h"
+#include "../librtbuf/rtbuf.h"
+#include "rtbuf_gtk3.h"
+#include "rtbuf_gtk3_output_widget.h"
void rtbuf_gtk_output_disconnect (RtbufOutputWidget *widget)
{
@@ -50,7 +50,7 @@ void rtbuf_gtk_output_menu (RtbufOutputWidget *widget, GdkEvent *event)
signal,
0,
NULL,
- G_CALLBACK(rtbuf_gtk_output_disconnect),
+ (void*) G_CALLBACK(rtbuf_gtk_output_disconnect),
NULL);
g_signal_connect_swapped(G_OBJECT(disconnect), "activate",
G_CALLBACK(rtbuf_gtk_output_disconnect),
diff --git a/gtk3/rtbuf_gtk3_output_widget.c b/gtk3/rtbuf_gtk3_output_widget.c
index 7718a19..1f8dbf8 100644
--- a/gtk3/rtbuf_gtk3_output_widget.c
+++ b/gtk3/rtbuf_gtk3_output_widget.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -16,9 +16,9 @@
#include <assert.h>
#include <gtk/gtk.h>
-#include "rtbuf_gtk.h"
-#include "rtbuf_output_widget.h"
-#include <rtbuf/rtbuf.h>
+#include "rtbuf_gtk3.h"
+#include "rtbuf_gtk3_output_widget.h"
+#include "../librtbuf/rtbuf.h"
struct _RtbufOutputWidgetPrivate {
s_rtbuf *rtbuf;
diff --git a/gtk3/rtbuf_gtk3_output_widget.h b/gtk3/rtbuf_gtk3_output_widget.h
index 0eb46d0..1a5f16f 100644
--- a/gtk3/rtbuf_gtk3_output_widget.h
+++ b/gtk3/rtbuf_gtk3_output_widget.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +17,7 @@
#ifndef RTBUF_OUTPUT_WIDGET_H
#define RTBUF_OUTPUT_WIDGET_H
-#include <rtbuf/rtbuf.h>
+#include "../librtbuf/rtbuf.h"
#define RTBUF_OUTPUT_WIDGET_TYPE \
(rtbuf_output_widget_get_type())
diff --git a/gtk3/rtbuf_gtk3_rtbuf.c b/gtk3/rtbuf_gtk3_rtbuf.c
index b998678..a0f8d58 100644
--- a/gtk3/rtbuf_gtk3_rtbuf.c
+++ b/gtk3/rtbuf_gtk3_rtbuf.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -17,9 +17,9 @@
#include <assert.h>
#include <gtk/gtk.h>
#include <stdio.h>
-#include <rtbuf/rtbuf.h>
-#include "rtbuf_gtk.h"
-#include "rtbuf_widget.h"
+#include "../librtbuf/rtbuf.h"
+#include "rtbuf_gtk3.h"
+#include "rtbuf_gtk3_widget.h"
void rtbuf_gtk_rtbuf_rename (RtbufWidget *widget)
{
diff --git a/gtk3/rtbuf_gtk3_rtbuf_info.c b/gtk3/rtbuf_gtk3_rtbuf_info.c
index f3c9a01..360c234 100644
--- a/gtk3/rtbuf_gtk3_rtbuf_info.c
+++ b/gtk3/rtbuf_gtk3_rtbuf_info.c
@@ -16,7 +16,7 @@
#include <assert.h>
#include <gtk/gtk.h>
-#include "rtbuf_gtk_rtbuf_info.h"
+#include "rtbuf_gtk3_rtbuf_info.h"
s_data_type g_rtbuf_gtk_rtbuf_info_type = {
sizeof(s_rtbuf_gtk_rtbuf_info) * 8,
diff --git a/gtk3/rtbuf_gtk3_rtbuf_info.h b/gtk3/rtbuf_gtk3_rtbuf_info.h
index a27e49b..8edc6cb 100644
--- a/gtk3/rtbuf_gtk3_rtbuf_info.h
+++ b/gtk3/rtbuf_gtk3_rtbuf_info.h
@@ -16,9 +16,9 @@
#ifndef RTBUF_GTK_RTBUF_INFO_H
#define RTBUF_GTK_RTBUF_INFO_H
-#include "rtbuf_widget.h"
-#include "rtbuf_input_widget.h"
-#include "rtbuf_output_widget.h"
+#include "rtbuf_gtk3_widget.h"
+#include "rtbuf_gtk3_input_widget.h"
+#include "rtbuf_gtk3_output_widget.h"
typedef struct rtbuf_gtk_rtbuf_info {
RtbufWidget *widget;
diff --git a/gtk3/rtbuf_gtk3_widget.c b/gtk3/rtbuf_gtk3_widget.c
index ad91837..0f37f3c 100644
--- a/gtk3/rtbuf_gtk3_widget.c
+++ b/gtk3/rtbuf_gtk3_widget.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -16,11 +16,11 @@
#include <assert.h>
#include <gtk/gtk.h>
-#include "rtbuf_gtk.h"
-#include "rtbuf_input_widget.h"
-#include "rtbuf_output_widget.h"
-#include "rtbuf_widget.h"
-#include <rtbuf/rtbuf.h>
+#include "rtbuf_gtk3.h"
+#include "rtbuf_gtk3_input_widget.h"
+#include "rtbuf_gtk3_output_widget.h"
+#include "rtbuf_gtk3_widget.h"
+#include "../librtbuf/rtbuf.h"
struct _RtbufWidgetPrivate {
s_rtbuf *rtbuf;
diff --git a/gtk3/rtbuf_gtk3_widget.h b/gtk3/rtbuf_gtk3_widget.h
index 1bfa5fa..3fc1639 100644
--- a/gtk3/rtbuf_gtk3_widget.h
+++ b/gtk3/rtbuf_gtk3_widget.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
+ * Copyright 2020-2021 Thomas de Grivel <thoxdg@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +17,7 @@
#ifndef RTBUF_WIDGET_H
#define RTBUF_WIDGET_H
-#include <rtbuf/rtbuf.h>
+#include "../librtbuf/rtbuf.h"
#define RTBUF_WIDGET_TYPE \
(rtbuf_widget_get_type())
diff --git a/lib/configure b/lib/configure
index 816943e..da4706a 100755
--- a/lib/configure
+++ b/lib/configure
@@ -78,13 +78,13 @@ echo "libraries:${LIBRARIES}" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
echo "subdirs:" >> ${CONFIG_MK}
for DIR in $DIRS; do
- echo "\t\${MAKE} -C $DIR" >> ${CONFIG_MK}
+ echo "\t\${MAKE} -C \${PWD}/$DIR" >> ${CONFIG_MK}
done
echo >> ${CONFIG_MK}
echo "subdirs-clean:" >> ${CONFIG_MK}
for DIR in $DIRS; do
- echo "\t\${MAKE} -C $DIR clean" >> ${CONFIG_MK}
+ echo "\t\${MAKE} -C \${PWD}/$DIR clean" >> ${CONFIG_MK}
done
echo >> ${CONFIG_MK}