summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--configure.in42
-rw-r--r--include/Makefile.am1
-rw-r--r--include/osmocore/Makefile.am7
-rw-r--r--libosmocore.pc.in11
-rw-r--r--src/Makefile.am11
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/sms/Makefile.am5
-rw-r--r--tests/timer/Makefile.am6
9 files changed, 91 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..8007b745
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,7 @@
+AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
+
+INCLUDES = $(all_includes) -I$(top_srcdir)/include
+SUBDIRS = include src tests
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libosmocore.pc
diff --git a/configure.in b/configure.in
new file mode 100644
index 00000000..a5c5f6b3
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,42 @@
+AC_INIT
+
+AM_INIT_AUTOMAKE(libosmocore, 0.0alpha1)
+
+dnl kernel style compile messages
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+dnl checks for programs
+AC_PROG_MAKE_SET
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+
+dnl checks for header files
+AC_HEADER_STDC
+AC_CHECK_HEADERS(execinfo.h sys/select.h)
+
+# The following test is taken from WebKit's webkit.m4
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fvisibility=hidden "
+AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
+AC_COMPILE_IFELSE([char foo;],
+ [ AC_MSG_RESULT([yes])
+ SYMBOL_VISIBILITY="-fvisibility=hidden"],
+ AC_MSG_RESULT([no]))
+CFLAGS="$saved_CFLAGS"
+AC_SUBST(SYMBOL_VISIBILITY)
+
+dnl Generate the output
+AM_CONFIG_HEADER(config.h)
+
+AC_OUTPUT(
+ libosmocore.pc
+ include/osmocore/Makefile
+ include/osmocore/protocol/Makefile
+ include/Makefile
+ src/Makefile
+ tests/Makefile
+ tests/timer/Makefile
+ tests/sms/Makefile
+ Makefile)
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 00000000..f0015d5f
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = osmocore
diff --git a/include/osmocore/Makefile.am b/include/osmocore/Makefile.am
new file mode 100644
index 00000000..02117528
--- /dev/null
+++ b/include/osmocore/Makefile.am
@@ -0,0 +1,7 @@
+osmocore_HEADERS = signal.h linuxlist.h timer.h talloc.h msgb.h select.h \
+ tlv.h bitvec.h comp128.h statistics.h gsm_utils.h utils.h \
+ gsmtap.h
+
+osmocoredir = $(includedir)/osmocore
+
+SUBDIRS = protocol
diff --git a/libosmocore.pc.in b/libosmocore.pc.in
new file mode 100644
index 00000000..7c298693
--- /dev/null
+++ b/libosmocore.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Osmocom Core Library
+Description: C Utility Library
+Version: @VERSION@
+Libs: -L${libdir} -losmocore
+Cflags: -I${includedir}/
+
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 00000000..b82b6fb1
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,11 @@
+# This is _NOT_ the library release version, it's an API version.
+# Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification
+LIBVERSION=0:0:0
+
+INCLUDES = $(all_includes) -I$(top_srcdir)/include
+AM_CFLAGS = -fPIC -Wall
+
+lib_LTLIBRARIES = libosmocore.la
+
+libosmocore_la_SOURCES = msgb.c timer.c talloc.c select.c signal.c \
+ tlv_parser.c bitvec.c comp128.c gsm_utils.c statistics.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 00000000..56e8b6f6
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = timer sms
diff --git a/tests/sms/Makefile.am b/tests/sms/Makefile.am
new file mode 100644
index 00000000..a8f1ff6a
--- /dev/null
+++ b/tests/sms/Makefile.am
@@ -0,0 +1,5 @@
+INCLUDES = $(all_includes) -I$(top_srcdir)/include
+noinst_PROGRAMS = sms_test
+
+sms_test_SOURCES = sms_test.c
+sms_test_LDADD = $(top_builddir)/src/libosmocore.la
diff --git a/tests/timer/Makefile.am b/tests/timer/Makefile.am
new file mode 100644
index 00000000..d3decf55
--- /dev/null
+++ b/tests/timer/Makefile.am
@@ -0,0 +1,6 @@
+INCLUDES = $(all_includes) -I$(top_srcdir)/include
+noinst_PROGRAMS = timer_test
+
+timer_test_SOURCES = timer_test.c
+timer_test_LDADD = $(top_builddir)/src/libosmocore.la
+