summaryrefslogtreecommitdiffstats
path: root/common/basicobjects/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'common/basicobjects/Makefile.am')
-rw-r--r--common/basicobjects/Makefile.am60
1 files changed, 60 insertions, 0 deletions
diff --git a/common/basicobjects/Makefile.am b/common/basicobjects/Makefile.am
new file mode 100644
index 0000000..54e36f1
--- /dev/null
+++ b/common/basicobjects/Makefile.am
@@ -0,0 +1,60 @@
+#DEBUG_FLAGS=@DEBUG_VAR@
+TRACE_LEVEL=@TRACE_VAR@
+
+DOXYGEN = @DOXYGEN@
+
+topdir=$(srcdir)/..
+
+AM_CFLAGS =
+if HAVE_GCC
+ AM_CFLAGS += \
+ -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wwrite-strings
+endif
+
+AM_CPPFLAGS = -I$(topdir) -I$(topdir)/trace $(TRACE_LEVEL)
+
+ACLOCAL_AMFLAGS = -I m4
+
+# Set up the pkg-config file
+pkgconfigdir = $(libdir)/pkgconfig
+dist_pkgconfig_DATA = basicobjects.pc
+
+dist_include_HEADERS = \
+ simplebuffer.h
+
+dist_noinst_DATA = m4
+
+# Build library
+lib_LTLIBRARIES = libbasicobjects.la
+libbasicobjects_la_SOURCES = \
+ simplebuffer.c \
+ ../trace/trace.h
+
+libbasicobjects_la_LDFLAGS = \
+ -version-info 1:0:0
+
+# Build unit test
+check_PROGRAMS = simplebuffer_ut
+simplebuffer_ut_SOURCES = simplebuffer_ut.c
+simplebuffer_ut_LDADD = libbasicobjects.la
+
+if HAVE_DOXYGEN
+docs:
+# A temp way of building docs until we hook into the package build
+ rm -fR doc
+ mkdir -p doc
+ $(DOXYGEN) basicobjects.cfg.doxy
+else
+docs:
+ @echo "Doxygen not installed, cannot generate documentation"
+ @exit 1
+endif
+
+
+TESTS = simplebuffer_ut
+
+tests: all $(check_PROGRAMS)
+
+clean-local:
+ rm -Rf doc