summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/tuner
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/tuner')
-rw-r--r--gst-libs/gst/tuner/.gitignore4
-rw-r--r--gst-libs/gst/tuner/Makefile.am48
-rw-r--r--gst-libs/gst/tuner/tuner-marshal.list (renamed from gst-libs/gst/tuner/tunermarshal.list)0
-rw-r--r--gst-libs/gst/tuner/tuner.c2
-rw-r--r--gst-libs/gst/tuner/tuner.h2
5 files changed, 19 insertions, 37 deletions
diff --git a/gst-libs/gst/tuner/.gitignore b/gst-libs/gst/tuner/.gitignore
index 9052893a..cd5f805b 100644
--- a/gst-libs/gst/tuner/.gitignore
+++ b/gst-libs/gst/tuner/.gitignore
@@ -1,2 +1,2 @@
-tunerenumtypes.[ch]
-tunermarshal.[ch]
+tuner-enumtypes.[ch]
+tuner-marshal.[ch]
diff --git a/gst-libs/gst/tuner/Makefile.am b/gst-libs/gst/tuner/Makefile.am
index c4020a4b..af1020fa 100644
--- a/gst-libs/gst/tuner/Makefile.am
+++ b/gst-libs/gst/tuner/Makefile.am
@@ -1,3 +1,9 @@
+# variables used for enum/marshal generation
+glib_enum_headers=$(tuner_headers)
+glib_enum_define=GST_TUNER
+glib_root=tuner
+glib_enum_prefix=gst_tuner
+
libgsttunerincludedir = \
$(includedir)/gstreamer-@GST_MAJORMINOR@/gst/tuner
@@ -7,8 +13,8 @@ tuner_headers = \
tunerchannel.h
built_headers = \
- tunermarshal.h
- tunerenumtypes.h
+ $(glib_root)-marshal.h \
+ $(glib_root)-enumtypes.h
libgsttunerinclude_HEADERS = $(tuner_headers) $(built_headers)
@@ -18,41 +24,17 @@ libgsttuner_la_SOURCES = \
tuner.c \
tunernorm.c \
tunerchannel.c \
- tunermarshal.c
+ $(glib_root)-marshal.c
+
libgsttuner_la_CFLAGS = $(GST_CFLAGS)
BUILT_SOURCES = \
- tunermarshal.c \
- tunermarshal.h \
- tunerenumtypes.c \
- tunerenumtypes.h
+ $(glib_root)-marshal.c \
+ $(glib_root)-enumtypes.c \
+ $(built_headers)
-EXTRA_DIST = tunermarshal.list
+EXTRA_DIST = $(glib_root)-marshal.list
CLEANFILES = $(BUILT_SOURCES)
-tunermarshal.h: tunermarshal.list
- glib-genmarshal --header --prefix=gst_tuner_marshal $^ > tunermarshal.h.tmp
- mv tunermarshal.h.tmp tunermarshal.h
-
-tunermarshal.c: tunermarshal.list
- echo "#include \"tunermarshal.h\"" >> tunermarshal.c.tmp
- glib-genmarshal --body --prefix=gst_tuner_marshal $^ >> tunermarshal.c.tmp
- mv tunermarshal.c.tmp tunermarshal.c
-
-tunerenumtypes.h: $(tuner_headers)
- glib-mkenums \
- --fhead "#ifndef __GST_TUNER_ENUM_TYPES_H__\n#define __GST_TUNER_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
- --fprod "/* enumerations from \"@filename@\" */\n" \
- --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
- --ftail "G_END_DECLS\n\n#endif /* __GST_TUNER_ENUM_TYPES_H__ */" \
- $^ > $@
-
-tunerenumtypes.c: $(tuner_headers)
- glib-mkenums \
- --fhead "#include <tuner.h>" \
- --fprod "\n/* enumerations from \"@filename@\" */" \
- --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
- --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
- --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
- $^ > $@
+include $(top_srcdir)/common/glib-gen.mak
diff --git a/gst-libs/gst/tuner/tunermarshal.list b/gst-libs/gst/tuner/tuner-marshal.list
index c99ddc7d..c99ddc7d 100644
--- a/gst-libs/gst/tuner/tunermarshal.list
+++ b/gst-libs/gst/tuner/tuner-marshal.list
diff --git a/gst-libs/gst/tuner/tuner.c b/gst-libs/gst/tuner/tuner.c
index 471fc5d2..54bab863 100644
--- a/gst-libs/gst/tuner/tuner.c
+++ b/gst-libs/gst/tuner/tuner.c
@@ -24,7 +24,7 @@
#endif
#include "tuner.h"
-#include "tunermarshal.h"
+#include "tuner-marshal.h"
#include <string.h>
diff --git a/gst-libs/gst/tuner/tuner.h b/gst-libs/gst/tuner/tuner.h
index c4c45c65..8c935389 100644
--- a/gst-libs/gst/tuner/tuner.h
+++ b/gst-libs/gst/tuner/tuner.h
@@ -25,7 +25,7 @@
#include <gst/gst.h>
#include <gst/tuner/tunernorm.h>
#include <gst/tuner/tunerchannel.h>
-#include <gst/tuner/tunerenumtypes.h>
+#include <gst/tuner/tuner-enumtypes.h>
G_BEGIN_DECLS