soylent r245 - in trunk: . libsoylent libsoylent/example



Author: svenp
Date: Sat Jul 26 13:36:01 2008
New Revision: 245
URL: http://svn.gnome.org/viewvc/soylent?rev=245&view=rev

Log:
added example executable for future code-demonstration

Added:
   trunk/libsoylent/example/   (props changed)
   trunk/libsoylent/example/Makefile.am
   trunk/libsoylent/example/example.c
   trunk/libsoylent/example/example.h
Modified:
   trunk/configure.ac
   trunk/libsoylent/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sat Jul 26 13:36:01 2008
@@ -118,6 +118,12 @@
 		glib-2.0
 		libebook-1.2
 	])
+
+  PKG_CHECK_MODULES(EXAMPLE,
+  [
+    glib-2.0
+    libebook-1.2
+  ])
 	
 	AC_DEFINE(ENABLE_LIBSOYLENT, 1, [Build libsoylent])
 fi
@@ -128,6 +134,8 @@
 AC_SUBST(LIBSOYLENT_LIBS)
 AC_SUBST(TEST_CFLAGS)
 AC_SUBST(TEST_LIBS)
+AC_SUBST(EXAMPLE_CFLAGS)
+AC_SUBST(EXAMPLE_LIBS)
 
 AC_DEFINE(LIBSOYLENT_VERSION, libsoylent_version, [libsoylent version])
 
@@ -176,6 +184,7 @@
   src/Makefile
   libsoylent/Makefile
   libsoylent/test/Makefile
+  libsoylent/example/Makefile
   docs/Makefile
   docs/reference/Makefile
   docs/reference/libsoylent/Makefile

Modified: trunk/libsoylent/Makefile.am
==============================================================================
--- trunk/libsoylent/Makefile.am	(original)
+++ trunk/libsoylent/Makefile.am	Sat Jul 26 13:36:01 2008
@@ -1,6 +1,6 @@
 #
 
-SUBDIRS = . test
+SUBDIRS = . test example
 
 lib_LTLIBRARIES = libsoylent.la
 

Added: trunk/libsoylent/example/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/libsoylent/example/Makefile.am	Sat Jul 26 13:36:01 2008
@@ -0,0 +1,12 @@
+#
+
+noinst_PROGRAMS = example
+
+example_SOURCES = \
+  example.h \
+  example.c
+
+example_CFLAGS = $(WARN_CFLAGS) $(EXAMPLE_CFLAGS)
+example_LDADD = $(top_builddir)/libsoylent/libsoylent.la $(EXAMPLE_LIBS)
+
+AM_CPPFLAGS = -I$(top_srcdir)

Added: trunk/libsoylent/example/example.c
==============================================================================
--- (empty file)
+++ trunk/libsoylent/example/example.c	Sat Jul 26 13:36:01 2008
@@ -0,0 +1,34 @@
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "example.h"
+
+#include <stdlib.h>
+#include <glib.h>
+
+int
+main (int argc, char **argv)
+{
+  g_print ("Hello World\n");
+  return EXIT_SUCCESS;
+}

Added: trunk/libsoylent/example/example.h
==============================================================================
--- (empty file)
+++ trunk/libsoylent/example/example.h	Sat Jul 26 13:36:01 2008
@@ -0,0 +1,22 @@
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]