From e8af6da24aada3b985dc98e096b600e0c7346a2c Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 20 Feb 2012 11:42:23 -0800 Subject: gst-project-maker: Create tools, pass make distcheck Create a tools directory for an application. Add source code stubs to allow the project to compile and pass make distcheck. Add notes in source code to tell the user how to create plugin or app code using the other -maker scripts. --- tools/gst-project-maker | 86 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 10 deletions(-) (limited to 'tools') diff --git a/tools/gst-project-maker b/tools/gst-project-maker index c2acc0846..c75fae64f 100755 --- a/tools/gst-project-maker +++ b/tools/gst-project-maker @@ -46,6 +46,12 @@ NAME=$(echo $name | sed -e 's/\(.*\)/\U\1/') Prefix=$(echo $prefix | sed -e 's/_\(.\)/\U\1/g' -e 's/^\(.\)/\U\1/') Name=$(echo $name | sed -e 's/_\(.\)/\U\1/g' -e 's/^\(.\)/\U\1/') +if [ "$prefix" != "gst" ] ; then + cmdline_prefix="--prefix $prefix" +else + cmdline_prefix="" +fi + GST_IS_REPLACE=${PREFIX}_IS_${NAME} GST_REPLACE=${PREFIX}_${NAME} GST_TYPE_REPLACE=${PREFIX}_TYPE_${NAME} @@ -134,6 +140,7 @@ AM_MAINTAINER_MODE([enable]) dnl check for tools (compiler etc.) AC_PROG_CC +AM_PROG_CC_C_O dnl required version of libtool LT_PREREQ([2.2.6]) @@ -197,12 +204,12 @@ dnl set proper LDFLAGS for plugins GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*' AC_SUBST(GST_PLUGIN_LDFLAGS) -AC_CONFIG_FILES([Makefile plugins/Makefile]) +AC_CONFIG_FILES([Makefile plugins/Makefile tools/Makefile]) AC_OUTPUT EOF cat >$basedir/Makefile.am <$basedir/plugins/Makefile.am < +#include "gstreplace.h" static gboolean plugin_init (GstPlugin * plugin) { -#if 0 - gst_element_register (replace, "replace", GST_RANK_NONE, - GST_TYPE_REPLACE_TEMPLATE); -#endif + gst_element_register (plugin, "replace", GST_RANK_NONE, + GST_TYPE_REPLACE); return TRUE; } @@ -316,9 +322,69 @@ generate | sed \ -e "s/GstReplace/$GstReplace/g" \ -e "s/gst_replace/$gst_replace/g" \ -e "s/gstreplace/$gstreplace/g" \ - -e "s/replace/$replace/g" >$basedir/plugins/$gstreplace.c + -e "s/replace/$replace/g" >$basedir/plugins/${gstreplace}plugin.c + +gst-indent $basedir/plugins/${gstreplace}plugin.c +rm -f $basedir/plugins/${gstreplace}plugin.c~ + +cat >$basedir/plugins/${gstreplace}.c <$basedir/plugins/${gstreplace}.h <$basedir/tools/Makefile.am <$basedir/tools/${gstreplace}.c < +int main (void) { printf ("FIXME\n"); return 0; } +EOF -- cgit v1.2.1