Also contextually remove the AC_PROG_LIBTOOL call (which is an obsolete name for what is now LT_INIT).
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- configure.ac | 3 +-- src/Makefile.am | 2 +- src/input/Makefile.am | 2 +- src/trau/Makefile.am | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac index f90da49..5be721f 100644 --- a/configure.ac +++ b/configure.ac @@ -11,8 +11,7 @@ dnl checks for programs AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_INSTALL -LT_INIT -AC_PROG_LIBTOOL +LT_INIT([pic-only])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/src/Makefile.am b/src/Makefile.am index 7aaa046..2155a76 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,7 +5,7 @@ SUBDIRS=input trau LIBVERSION=1:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS= -fPIC -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) +AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(COVERAGE_LDFLAGS)
lib_LTLIBRARIES = libosmoabis.la diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 9937465..309fe9d 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -1,7 +1,7 @@ noinst_LTLIBRARIES = libosmoabis-input.la
INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS= -fPIC -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) +AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(COVERAGE_LDFLAGS)
libosmoabis_input_la_SOURCES = dahdi.c \ diff --git a/src/trau/Makefile.am b/src/trau/Makefile.am index 47b5875..71a219c 100644 --- a/src/trau/Makefile.am +++ b/src/trau/Makefile.am @@ -4,7 +4,7 @@ LIBVERSION=0:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS= -fPIC -Wall \ +AM_CFLAGS= -Wall \ $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) \ $(ORTP_CFLAGS) $(COVERAGE_CFLAGS) AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \
This simplifies installation of include files, as make no longer have to recurse into subdirectories and install each subset of files in different directories.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- configure.ac | 3 --- include/Makefile.am | 5 ++++- include/osmocom/Makefile.am | 1 - include/osmocom/abis/Makefile.am | 10 ---------- include/osmocom/trau/Makefile.am | 3 --- 5 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 include/osmocom/Makefile.am delete mode 100644 include/osmocom/abis/Makefile.am delete mode 100644 include/osmocom/trau/Makefile.am
diff --git a/configure.ac b/configure.ac index 5be721f..f1da635 100644 --- a/configure.ac +++ b/configure.ac @@ -44,9 +44,6 @@ AC_OUTPUT( libosmoabis.pc libosmotrau.pc include/Makefile - include/osmocom/Makefile - include/osmocom/abis/Makefile - include/osmocom/trau/Makefile src/Makefile src/input/Makefile src/trau/Makefile diff --git a/include/Makefile.am b/include/Makefile.am index ea38eec..61e6cf5 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,3 +1,6 @@ noinst_HEADERS=mISDNif.h internal.h
-SUBDIRS=osmocom +nobase_include_HEADERS = osmocom/abis/ipa.h osmocom/abis/trau_frame.h \ + osmocom/abis/ipa_proxy.h osmocom/abis/ipaccess.h osmocom/abis/abis.h \ + osmocom/abis/subchan_demux.h osmocom/abis/e1_input.h \ + osmocom/abis/lapd.h osmocom/trau/osmo_ortp.h diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am deleted file mode 100644 index a8574ba..0000000 --- a/include/osmocom/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS=abis trau diff --git a/include/osmocom/abis/Makefile.am b/include/osmocom/abis/Makefile.am deleted file mode 100644 index 5d47363..0000000 --- a/include/osmocom/abis/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -osmoabis_HEADERS = abis.h \ - e1_input.h \ - lapd.h \ - subchan_demux.h \ - ipa.h \ - ipa_proxy.h \ - ipaccess.h \ - trau_frame.h - -osmoabisdir = $(includedir)/osmocom/abis diff --git a/include/osmocom/trau/Makefile.am b/include/osmocom/trau/Makefile.am deleted file mode 100644 index d796c7c..0000000 --- a/include/osmocom/trau/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -osmotrau_HEADERS = osmo_ortp.h - -osmotraudir = $(includedir)/osmocom/trau
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am index 19db4f8..640f4ef 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include AM_CFLAGS=-Wall -g $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(COVERAGE_CFLAGS) AM_LDFLAGS = $(COVERAGE_LDFLAGS)
-noinst_PROGRAMS = e1inp_ipa_bsc_test \ +check_PROGRAMS = e1inp_ipa_bsc_test \ e1inp_ipa_bts_test \ e1inp_hsl_bsc_test \ e1inp_hsl_bts_test \
automake is well capable of building sources present in sub-directory without requiring a recursion, so there is no reason to use a non-installed library just for the extra files.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- configure.ac | 1 - src/Makefile.am | 12 +++++++++--- src/input/Makefile.am | 13 ------------- 3 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 src/input/Makefile.am
diff --git a/configure.ac b/configure.ac index f1da635..2c04240 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,6 @@ AC_OUTPUT( libosmotrau.pc include/Makefile src/Makefile - src/input/Makefile src/trau/Makefile tests/Makefile Makefile) diff --git a/src/Makefile.am b/src/Makefile.am index 2155a76..a13223e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS=input trau +SUBDIRS=trau
# 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 @@ -10,10 +10,16 @@ AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(COVERAG
lib_LTLIBRARIES = libosmoabis.la
-libosmoabis_la_LIBADD = input/libosmoabis-input.la libosmoabis_la_SOURCES = init.c \ e1_input.c \ e1_input_vty.c \ ipa_proxy.c \ subchan_demux.c \ - trau_frame.c + trau_frame.c \ + input/dahdi.c \ + input/hsl.c \ + input/ipa.c \ + input/ipaccess.c \ + input/lapd.c \ + input/misdn.c \ + input/rs232.c diff --git a/src/input/Makefile.am b/src/input/Makefile.am deleted file mode 100644 index 309fe9d..0000000 --- a/src/input/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -noinst_LTLIBRARIES = libosmoabis-input.la - -INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) -AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(COVERAGE_LDFLAGS) - -libosmoabis_input_la_SOURCES = dahdi.c \ - hsl.c \ - ipa.c \ - ipaccess.c \ - lapd.c \ - misdn.c \ - rs232.c
This spares us another recursion, and allows a much higher parallelisation, since trau is only one source unit and one standalone library.
Incidentally, also make sure that the version specification for libosmoabis is applied.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- configure.ac | 1 - src/Makefile.am | 17 ++++++++++++----- src/trau/Makefile.am | 15 --------------- 3 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 src/trau/Makefile.am
diff --git a/configure.ac b/configure.ac index 2c04240..b85718b 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,5 @@ AC_OUTPUT( libosmotrau.pc include/Makefile src/Makefile - src/trau/Makefile tests/Makefile Makefile) diff --git a/src/Makefile.am b/src/Makefile.am index a13223e..cf58aaa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,15 +1,17 @@ -SUBDIRS=trau - # 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=1:0:0 +ABIS_LIBVERSION=1:0:0 +TRAU_LIBVERSION=0:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) -AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(COVERAGE_LDFLAGS) +AM_LDFLAGS = $(COVERAGE_LDFLAGS) +COMMONLIBS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS)
-lib_LTLIBRARIES = libosmoabis.la +lib_LTLIBRARIES = libosmoabis.la libosmotrau.la
+libosmoabis_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ABIS_LIBVERSION) +libosmoabis_la_LIBADD = $(COMMONLIBS) libosmoabis_la_SOURCES = init.c \ e1_input.c \ e1_input_vty.c \ @@ -23,3 +25,8 @@ libosmoabis_la_SOURCES = init.c \ input/lapd.c \ input/misdn.c \ input/rs232.c + +libosmotrau_la_CFLAGS = $(AM_CFLAGS) $(ORTP_CFLAGS) +libosmotrau_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(TRAU_LIBVERSION) +libosmotrau_la_LIBADD = $(COMMONLIBS) $(ORTP_LIBS) +libosmotrau_la_SOURCES = trau/osmo_ortp.c diff --git a/src/trau/Makefile.am b/src/trau/Makefile.am deleted file mode 100644 index 71a219c..0000000 --- a/src/trau/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# 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 -I$(top_builddir) -AM_CFLAGS= -Wall \ - $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) \ - $(ORTP_CFLAGS) $(COVERAGE_CFLAGS) -AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(ORTP_LIBS) $(COVERAGE_LDFLAGS) - -lib_LTLIBRARIES = libosmotrau.la - -libosmotrau_la_SOURCES = osmo_ortp.c
Also disable building the gzip distribution since we're building the bzip2-compressed tarball already.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- Makefile.am | 1 - configure.ac | 2 +- 2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 7a64c68..4ba09f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,3 @@ -AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 ACLOCAL_AMFLAGS = -I m4
INCLUDES = $(all_includes) -I$(top_srcdir)/include diff --git a/configure.ac b/configure.ac index b85718b..101a1e8 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_INIT([libosmo-abis], m4_esyscmd([./git-version-gen .tarball-version]), [openbsc@lists.osmocom.org])
-AM_INIT_AUTOMAKE([dist-bzip2]) +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.6])
dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Therre is no current use of HAVE_* variables for these checks in the code, so there is no reason to keep the checks around.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- configure.ac | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac index 101a1e8..fdaf15a 100644 --- a/configure.ac +++ b/configure.ac @@ -15,10 +15,6 @@ LT_INIT([pic-only])
AC_CONFIG_MACRO_DIR([m4])
-dnl checks for header files -AC_HEADER_STDC -AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h) - # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden "
Diego Elio Pettenò wrote:
Therre is no current use of HAVE_* variables for these checks in the code, so there is no reason to keep the checks around.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu
All 7
Acked-by: Peter Stuge peter@stuge.se
Hi Diego,
On Sat, Jun 30, 2012 at 03:22:56PM -0700, Diego Elio Pettenò wrote:
Also contextually remove the AC_PROG_LIBTOOL call (which is an obsolete name for what is now LT_INIT).
[...]
Thanks, merged!