From 4785fe4a9704b659f857e9297ddb9f6e800620ce Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Tue, 3 Feb 2004 16:49:54 +0000 Subject: use glib-gen.mak fix Makefile.am bugs and clean them up Original commit message from CVS: use glib-gen.mak fix Makefile.am bugs and clean them up --- gst-libs/gst/play/.gitignore | 2 +- gst-libs/gst/play/Makefile.am | 31 +++++++++++-------------------- gst-libs/gst/play/play.h | 2 +- 3 files changed, 13 insertions(+), 22 deletions(-) (limited to 'gst-libs/gst/play') diff --git a/gst-libs/gst/play/.gitignore b/gst-libs/gst/play/.gitignore index fcb0f7c4..02277ef5 100644 --- a/gst-libs/gst/play/.gitignore +++ b/gst-libs/gst/play/.gitignore @@ -1 +1 @@ -playenumtypes.[ch] +play-enumtypes.[ch] diff --git a/gst-libs/gst/play/Makefile.am b/gst-libs/gst/play/Makefile.am index 58728f1d..17460384 100644 --- a/gst-libs/gst/play/Makefile.am +++ b/gst-libs/gst/play/Makefile.am @@ -1,14 +1,20 @@ +# variables used for enum generation +glib_enum_headers=$(play_headers) +glib_enum_define=GST_PLAY +glib_root=play +glib_enum_prefix=gst_play + librarydir = $(libdir) play_headers = \ play.h built_headers = \ - playenumtypes.h + $(glib_root)-enumtypes.h library_LTLIBRARIES = libgstplay-@GST_MAJORMINOR@.la -libgstplay_@GST_MAJORMINOR@_la_SOURCES = play.c playenumtypes.c +libgstplay_@GST_MAJORMINOR@_la_SOURCES = play.c $(glib_root)-enumtypes.c libgstplay_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/play libgstplay_@GST_MAJORMINOR@include_HEADERS = $(play_headers) $(built_headers) @@ -22,24 +28,9 @@ libgstplay_@GST_MAJORMINOR@_la_LDFLAGS = \ -version-info @GST_PLUGINS_LIBVERSION@ BUILT_SOURCES = \ - playenumtypes.c \ - playenumtypes.h + $(glib_root)-enumtypes.c \ + $(built_headers) CLEANFILES = $(BUILT_SOURCES) -playenumtypes.h: $(play_headers) - glib-mkenums \ - --fhead "#ifndef __GST_PLAY_ENUM_TYPES_H__\n#define __GST_PLAY_ENUM_TYPES_H__\n\n#include \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_PLAY_ENUM_TYPES_H__ */" \ - $^ > $@ - -playenumtypes.c: $(play_headers) - glib-mkenums \ - --fhead "#include " \ - --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/play/play.h b/gst-libs/gst/play/play.h index 2701036c..8ccf827d 100644 --- a/gst-libs/gst/play/play.h +++ b/gst-libs/gst/play/play.h @@ -22,7 +22,7 @@ #include #include -#include +#include /* GError stuff */ -- cgit v1.2.1