From b9093f88dc4b6a02d781a828018358d45a837890 Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Fri, 16 May 2014 17:50:40 +0000 Subject: [PATCH] Make a first attempt to build a shared library (not to be installed by now). git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1304 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 6 ++++++ Makefile.am | 5 +++++ bootstrap | 2 ++ configure.ac | 8 +++----- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bccd22d6..a617ac4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-05-16 Joerg Wunsch + + * configure.ac: Bump version, add libtool hooks + * Makefile.am: First attempt to define building a shared library + (not to be installed by now) + 2014-05-16 Joerg Wunsch * dfu.c (dfu_open, dfu_init): Fix signature of the dummy functions diff --git a/Makefile.am b/Makefile.am index 69a34f7c..f7a2966d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,16 +59,19 @@ AM_YFLAGS = -d avrdude_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" libavrdude_a_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" +libavrdude_la_CPPFLAGS = $(libavrdude_a_CPPFLAGS) avrdude_CFLAGS = @ENABLE_WARNINGS@ libavrdude_a_CFLAGS = @ENABLE_WARNINGS@ +libavrdude_la_CFLAGS = $(libavrdude_a_CFLAGS) avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB_1_0@ @LIBUSB@ @LIBFTDI1@ @LIBFTDI@ @LIBHID@ @LIBELF@ @LIBPTHREAD@ -lm bin_PROGRAMS = avrdude noinst_LIBRARIES = libavrdude.a +noinst_LTLIBRARIES = libavrdude.la # automake thinks these generated files should be in the distribution, # but this might cause trouble for some users, so we rather don't want @@ -182,6 +185,8 @@ libavrdude_a_SOURCES = \ update.c \ wiring.h \ wiring.c +libavrdude_la_SOURCES = $(libavrdude_a_SOURCES) +libavrdude_la_LDFLAGS = -version-info 1:0 avrdude_SOURCES = \ main.c \ diff --git a/bootstrap b/bootstrap index 9dd39f15..0c1f84cc 100755 --- a/bootstrap +++ b/bootstrap @@ -13,6 +13,8 @@ set -x rm -rf autom4te.cache +libtoolize + ${ACLOCAL} ${AUTOHEADER} ${AUTOCONF} diff --git a/configure.ac b/configure.ac index 94be984c..3a863ff3 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.60) -AC_INIT(avrdude, 6.1-20140313, avrdude-dev@nongnu.org) +AC_INIT(avrdude, 6.1-20140516, avrdude-dev@nongnu.org) AC_CANONICAL_BUILD AC_CANONICAL_HOST @@ -33,16 +33,14 @@ AC_CONFIG_SRCDIR([main.c]) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS(ac_cfg.h) +LT_INIT() + # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_SED AC_PROG_YACC AC_PROG_LEX -AN_MAKEVAR([RANLIB], [AC_PROG_RANLIB]) -AN_PROGRAM([ranlib], [AC_PROG_RANLIB]) -AC_DEFUN([AC_PROG_RANLIB], [AC_CHECK_TARGET_TOOL(RANLIB, ranlib, :)]) -AC_PROG_RANLIB AN_MAKEVAR([AR], [AC_PROG_AR]) AN_PROGRAM([ar], [AC_PROG_AR]) AC_DEFUN([AC_PROG_AR], [AC_CHECK_TARGET_TOOL(AR, ar, :)])