Commit f56b7698f9ccfe5a0b7973752c4cc4368c835326

Thomas de Grivel 2021-02-21T20:22:22

wip remove autotools

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
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}