diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..8007b7458 --- /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 000000000..a5c5f6b35 --- /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 000000000..f0015d5f4 --- /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 000000000..021175283 --- /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 000000000..7c298693a --- /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 000000000..b82b6fb10 --- /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 000000000..56e8b6f64 --- /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 000000000..a8f1ff6a2 --- /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 000000000..d3decf556 --- /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 +