1 # these are the variables your Makefile.am should set
2 # the example is based on the colorbalance interface
4 #glib_enum_headers=$(colorbalance_headers)
5 #glib_enum_define=GST_COLOR_BALANCE
6 #glib_enum_prefix=gst_color_balance
8 enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
10 # these are all the rules generating the relevant files
11 %-marshal.h: %-marshal.list
12 $(AM_V_GEN)glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp && \
13 mv $*-marshal.h.tmp $*-marshal.h
15 %-marshal.c: %-marshal.list
16 $(AM_V_GEN)echo "#include \"$*-marshal.h\"" >> $*-marshal.c.tmp && \
17 glib-genmarshal --body --prefix=$(glib_enum_prefix)_marshal $^ >> $*-marshal.c.tmp && \
18 mv $*-marshal.c.tmp $*-marshal.c
20 %-enumtypes.h: $(glib_enum_headers)
21 $(AM_V_GEN)glib-mkenums \
22 --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
23 --fprod "\n/* enumerations from \"@filename@\" */\n" \
24 --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
25 --ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \
28 %-enumtypes.c: $(glib_enum_headers)
29 @if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi
30 $(AM_V_GEN)glib-mkenums \
31 --fhead "#include \"$*-enumtypes.h\"\n$(enum_headers)" \
32 --fprod "\n/* enumerations from \"@filename@\" */" \
33 --vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \
34 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
35 --vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n" \
38 # a hack rule to make sure .Plo files exist because they get include'd
43 .deps/%-enumtypes.Plo: