aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2014-12-30 08:46:09 +0200
committerPetri Lehtinen <petri@digip.org>2014-12-30 08:50:33 +0200
commitfc83f10c85db30558b223b6327a2f64f6073b5a3 (patch)
tree52ae9a69570859be88c7b299c6a72f48d18bf4b0
parent8d561cd94e3bd6ed496eac9bffd4b221e37d4207 (diff)
downloadjansson-fc83f10c85db30558b223b6327a2f64f6073b5a3.zip
jansson-fc83f10c85db30558b223b6327a2f64f6073b5a3.tar.gz
jansson-fc83f10c85db30558b223b6327a2f64f6073b5a3.tar.bz2
Add Makefile.am for examples
-rw-r--r--configure.ac1
-rw-r--r--examples/Makefile.am9
-rw-r--r--examples/README.rst10
3 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8c9adcd..5b85180 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,5 +114,6 @@ AC_CONFIG_FILES([
test/bin/Makefile
test/suites/Makefile
test/suites/api/Makefile
+ examples/Makefile
])
AC_OUTPUT
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 0000000..f8735fc
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,9 @@
+EXTRA_PROGRAMS = simple_parse
+
+simple_parse_SOURCES = simple_parse.c
+
+AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src
+LDFLAGS = -static # for easier running
+LDADD = $(top_builddir)/src/libjansson.la
+
+all: simple_parse
diff --git a/examples/README.rst b/examples/README.rst
new file mode 100644
index 0000000..689fd64
--- /dev/null
+++ b/examples/README.rst
@@ -0,0 +1,10 @@
+Jansson examples
+================
+
+This directory contains simple example programs that use Jansson.
+
+You can compile the examples by running the configure script normally
+in Jansson's top directory, and then:
+
+ cd examples
+ make