From 3ff81b1a6b830d16803f3fc7356e9fd71162b6c6 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 20 Aug 2014 19:58:40 +0200 Subject: [PATCH] libctrl: autotools build system integration Now we actually build the recently-imported libctrl --- Makefile.am | 4 ++-- configure.ac | 2 ++ include/Makefile.am | 2 ++ libosmoctrl.pc.in | 11 +++++++++++ src/ctrl/Makefile.am | 15 ++++++++++----- 5 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 libosmoctrl.pc.in diff --git a/Makefile.am b/Makefile.am index 717d3db02..f2899ccbf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,11 @@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -SUBDIRS = include src src/vty src/codec src/gsm src/gb tests utils +SUBDIRS = include src src/vty src/codec src/gsm src/gb src/ctrl tests utils pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmocore.pc libosmocodec.pc libosmovty.pc libosmogsm.pc \ - libosmogb.pc + libosmogb.pc libosmoctrl.pc BUILT_SOURCES = $(top_srcdir)/.version $(top_srcdir)/.version: diff --git a/configure.ac b/configure.ac index eaaab5033..deaa8bf74 100644 --- a/configure.ac +++ b/configure.ac @@ -186,12 +186,14 @@ AC_OUTPUT( libosmovty.pc libosmogsm.pc libosmogb.pc + libosmoctrl.pc include/Makefile src/Makefile src/vty/Makefile src/codec/Makefile src/gsm/Makefile src/gb/Makefile + src/ctrl/Makefile tests/Makefile utils/Makefile Doxyfile.core diff --git a/include/Makefile.am b/include/Makefile.am index 03d21f466..6f14cb083 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -37,6 +37,8 @@ nobase_include_HEADERS = \ osmocom/core/write_queue.h \ osmocom/crypt/auth.h \ osmocom/crypt/gprs_cipher.h \ + osmocom/ctrl/control_cmd.h \ + osmocom/ctrl/control_if.h \ osmocom/gprs/gprs_bssgp.h \ osmocom/gprs/gprs_bssgp_bss.h \ osmocom/gprs/gprs_msgb.h \ diff --git a/libosmoctrl.pc.in b/libosmoctrl.pc.in new file mode 100644 index 000000000..ce44819a2 --- /dev/null +++ b/libosmoctrl.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Osmocom Control Interface Library +Description: C Utility Library +Version: @VERSION@ +Libs: -L${libdir} -losmoctrl +Cflags: -I${includedir}/ + diff --git a/src/ctrl/Makefile.am b/src/ctrl/Makefile.am index 4f039c826..29a8ee234 100644 --- a/src/ctrl/Makefile.am +++ b/src/ctrl/Makefile.am @@ -1,7 +1,12 @@ -AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) -AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOABIS_LIBS) $(COVERAGE_LDFLAGS) +# 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 -noinst_LIBRARIES = libctrl.a +AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -libctrl_a_SOURCES = control_if.c control_cmd.c +lib_LTLIBRARIES = libosmoctrl.la + +libosmoctrl_la_SOURCES = control_cmd.c control_if.c + +libosmoctrl_la_LDFLAGS = $(LTLDFLAGS_OSMOCTRL) -version-info $(LIBVERSION) -no-undefined +libosmoctrl_la_LIBADD = $(top_builddir)/src/libosmocore.la