Commit 29046b89 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

gst-glib-gen.mak: add support for function declaration banner

So we can e.g. add GST_EXPORT in front of our enum _get_type() functions.
parent 48a5d85e
......@@ -5,6 +5,7 @@
#glib_enum_define=GST_COLOR_BALANCE
#glib_gen_prefix=gst_color_balance
#glib_gen_basename=colorbalance
#glib_gen_decl_banner=GST_EXPORT
enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
......@@ -20,9 +21,9 @@ $(glib_gen_basename)-marshal.c: $(glib_gen_basename)-marshal.list
$(glib_gen_basename)-enumtypes.h: $(glib_enum_headers)
$(AM_V_GEN)$(GLIB_MKENUMS) \
--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" \
--fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n\nG_BEGIN_DECLS\n" \
--fprod "\n/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--vhead "$(glib_gen_decl_banner)\nGType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \
$^ > $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment