Extend autotools build to create shared library libopenocd with libtool:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 10 May 2009 22:03:57 +0000 (22:03 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 10 May 2009 22:03:57 +0000 (22:03 +0000)
- Add libtoolize step too bootstrap script; creates ltmain.sh script.
- Add AC_PROG_LIBTOOL to configure.in to add libtool support to build.
- Change Makefile.am library rules from static (_a) to libtool (_la).
- Install libopenocd.{la,so,a} in $(libdir); update openocd link rules.
- Extend MAINTAINERCLEANFILES in top-level Makefile.am to remove ltmain.sh.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1695 b42882b7-edfa-0310-969c-e2dbd0fdcd60

12 files changed:
Makefile.am
bootstrap
configure.in
src/Makefile.am
src/flash/Makefile.am
src/helper/Makefile.am
src/jtag/Makefile.am
src/pld/Makefile.am
src/server/Makefile.am
src/svf/Makefile.am
src/target/Makefile.am
src/xsvf/Makefile.am

index c01c48f6c07f1e4dd97a98ba338b1ee8c3fe1660..98c38f3815100e317ca71baaec9b758b19e23ffc 100644 (file)
@@ -20,6 +20,7 @@ MAINTAINERCLEANFILES = \
        config.h.in \
        config.h.in~ \
        compile \
        config.h.in \
        config.h.in~ \
        compile \
+       ltmain.sh \
        missing \
        aclocal.m4 \
        install-sh
        missing \
        aclocal.m4 \
        install-sh
index d5a808e8e944a4be0379cb26557bd37fc7fd734d..b49fda3244058bda5cb46d890baae3ecbb2ef44e 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,5 +1,6 @@
 aclocal \
 && autoheader \
 aclocal \
 && autoheader \
+&& libtoolize --automake \
 && automake --foreign --add-missing --copy \
 && autoconf
 
 && automake --foreign --add-missing --copy \
 && autoconf
 
index a6177e1d9d60fb9c46e942f470c25fba4ed0ff2d..8256adb7b1158a56ebec0138a0860ac4388b8c31 100644 (file)
@@ -787,6 +787,7 @@ AC_PROG_CC
 AC_PROG_CC_C99
 AM_PROG_CC_C_O
 AC_PROG_RANLIB
 AC_PROG_CC_C99
 AM_PROG_CC_C_O
 AC_PROG_RANLIB
+AC_PROG_LIBTOOL
 
 # Look for environ alternatives.  Possibility #1: is environ in unistd.h or stdlib.h?
 AC_MSG_CHECKING([for environ in unistd.h and stdlib.h])
 
 # Look for environ alternatives.  Possibility #1: is environ in unistd.h or stdlib.h?
 AC_MSG_CHECKING([for environ in unistd.h and stdlib.h])
index 3cbfd3e49e3c4ae3da1dc893deea4e7979782c6b..c785e2acd7d80375283f674492c26fc5241e418a 100644 (file)
@@ -1,3 +1,6 @@
+SUBDIRS = helper jtag xsvf svf target server flash pld
+
+lib_LTLIBRARIES = libopenocd.la
 bin_PROGRAMS = openocd
 
 if ECOSBOARD
 bin_PROGRAMS = openocd
 
 if ECOSBOARD
@@ -6,7 +9,10 @@ else
 MAINFILE = main.c
 endif
 
 MAINFILE = main.c
 endif
 
-openocd_SOURCES = $(MAINFILE) openocd.c
+openocd_SOURCES = $(MAINFILE) 
+openocd_LDADD = libopenocd.la
+
+libopenocd_la_SOURCES = openocd.c
 
 # set the include path found by configure
 AM_CPPFLAGS = \
 
 # set the include path found by configure
 AM_CPPFLAGS = \
@@ -21,22 +27,21 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/pld
 
 # pass path to prefix path
        -I$(top_srcdir)/src/pld
 
 # pass path to prefix path
-openocd_CPPFLAGS = \
+libopenocd_la_CPPFLAGS = \
  -DPKGLIBDIR=\"$(pkglibdir)\" \
  -DPKGBLDDATE=\"`date +%F-%R`\"
 
 if RELEASE
  -DPKGLIBDIR=\"$(pkglibdir)\" \
  -DPKGBLDDATE=\"`date +%F-%R`\"
 
 if RELEASE
-openocd_CPPFLAGS += -DRELSTR=\"Release\" -DPKGBLDREV=\"\"
+libopenocd_la_CPPFLAGS += -DRELSTR=\"Release\" -DPKGBLDREV=\"\"
 else
 else
-openocd_CPPFLAGS += -DRELSTR=\"svn:\" -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
+libopenocd_la_CPPFLAGS += -DRELSTR=\"svn:\" -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
 endif
 
 # add default CPPFLAGS
 endif
 
 # add default CPPFLAGS
-openocd_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
+libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
 
 # the library search path.
 
 # the library search path.
-openocd_LDFLAGS = $(all_libraries) 
-SUBDIRS = helper jtag xsvf svf target server flash pld
+libopenocd_la_LDFLAGS = $(all_libraries) 
 
 if IS_MINGW
 MINGWLDADD = -lwsock32
 
 if IS_MINGW
 MINGWLDADD = -lwsock32
@@ -72,16 +77,19 @@ endif
 endif
 endif
 
 endif
 endif
 
-openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a $(top_builddir)/src/svf/libsvf.a \
-       $(top_builddir)/src/target/libtarget.a $(top_builddir)/src/jtag/libjtag.a \
-       $(top_builddir)/src/helper/libhelper.a \
-       $(top_builddir)/src/server/libserver.a $(top_builddir)/src/helper/libhelper.a \
-       $(top_builddir)/src/flash/libflash.a $(top_builddir)/src/target/libtarget.a \
-       $(top_builddir)/src/pld/libpld.a \
+libopenocd_la_LIBADD = \
+       $(top_builddir)/src/xsvf/libxsvf.la \
+       $(top_builddir)/src/svf/libsvf.la \
+       $(top_builddir)/src/pld/libpld.la \
+       $(top_builddir)/src/jtag/libjtag.la \
+       $(top_builddir)/src/flash/libflash.la \
+       $(top_builddir)/src/target/libtarget.la \
+       $(top_builddir)/src/server/libserver.la \
+       $(top_builddir)/src/helper/libhelper.la \
        $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
 
 if HTTPD
        $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
 
 if HTTPD
-openocd_LDADD += -lmicrohttpd
+libopenocd_la_LIBADD += -lmicrohttpd
 endif
 
 nobase_dist_pkglib_DATA = \
 endif
 
 nobase_dist_pkglib_DATA = \
index db24001ae09e3ced718dd1794b26da65dc4595f8..7895edc85af55127ad43c7749f7f539c4efb06ad 100644 (file)
@@ -4,8 +4,8 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/target
 
 METASOURCES = AUTO
        -I$(top_srcdir)/src/target
 
 METASOURCES = AUTO
-noinst_LIBRARIES = libflash.a
-libflash_a_SOURCES = \
+noinst_LTLIBRARIES = libflash.la
+libflash_la_SOURCES = \
        flash.c lpc2000.c cfi.c non_cfi.c at91sam7.c \
        str7x.c str9x.c aduc702x.c nand.c nand_ecc.c \
        lpc3180_nand_controller.c stellaris.c str9xpec.c stm32x.c tms470.c \
        flash.c lpc2000.c cfi.c non_cfi.c at91sam7.c \
        str7x.c str9x.c aduc702x.c nand.c nand_ecc.c \
        lpc3180_nand_controller.c stellaris.c str9xpec.c stm32x.c tms470.c \
index afe26b8106b53d274306c21cd38c629208c1c590..a55827830b5756872ab86c2047ac20f3f1fc204e 100644 (file)
@@ -5,7 +5,7 @@ AM_CPPFLAGS = \
        -DPKGLIBDIR=\"$(pkglibdir)\"
 
 METASOURCES = AUTO
        -DPKGLIBDIR=\"$(pkglibdir)\"
 
 METASOURCES = AUTO
-noinst_LIBRARIES = libhelper.a
+noinst_LTLIBRARIES = libhelper.la
 
 if ECOSBOARD
 CONFIGFILES = 
 
 if ECOSBOARD
 CONFIGFILES = 
@@ -15,19 +15,19 @@ endif
 
 
 
 
 
 
-libhelper_a_SOURCES = \
+libhelper_la_SOURCES = \
        binarybuffer.c $(CONFIGFILES) configuration.c \
        log.c command.c time_support.c \
        replacements.c fileio.c startup_tcl.c
 
 if IOUTIL
        binarybuffer.c $(CONFIGFILES) configuration.c \
        log.c command.c time_support.c \
        replacements.c fileio.c startup_tcl.c
 
 if IOUTIL
-libhelper_a_SOURCES += ioutil.c
+libhelper_la_SOURCES += ioutil.c
 endif
 
 endif
 
-libhelper_a_CFLAGS =
+libhelper_la_CFLAGS =
 if IS_MINGW
 # FD_* macros are sloppy with their signs on MinGW32 platform
 if IS_MINGW
 # FD_* macros are sloppy with their signs on MinGW32 platform
-libhelper_a_CFLAGS += -Wno-sign-compare
+libhelper_la_CFLAGS += -Wno-sign-compare
 endif
 
 noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \
 endif
 
 noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \
index 45883121956a0c027c6b488d611aced1c7618a2e..7ee59076b18e805af6fc40c94725cbc055c449a7 100644 (file)
@@ -3,7 +3,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/target
 
 METASOURCES = AUTO
        -I$(top_srcdir)/src/target
 
 METASOURCES = AUTO
-noinst_LIBRARIES = libjtag.a
+noinst_LTLIBRARIES = libjtag.la
 
 if BITBANG
 BITBANGFILES = bitbang.c
 
 if BITBANG
 BITBANGFILES = bitbang.c
@@ -109,8 +109,12 @@ else
 ARMJTAGEWFILES =
 endif
 
 ARMJTAGEWFILES =
 endif
 
-libjtag_a_SOURCES = jtag.c $(BITBANGFILES) $(PARPORTFILES) $(DUMMYFILES) $(FT2232FILES) $(AMTJTAGACCELFILES) $(EP93XXFILES) \
-       $(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES) $(JLINKFILES) $(RLINKFILES) $(VSLLINKFILES) $(ARMJTAGEWFILES)
+libjtag_la_SOURCES = jtag.c \
+       $(BITBANGFILES) $(PARPORTFILES) $(DUMMYFILES) \
+       $(FT2232FILES) $(AMTJTAGACCELFILES) $(EP93XXFILES) \
+       $(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) \
+       $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES) \
+       $(JLINKFILES) $(RLINKFILES) $(VSLLINKFILES) $(ARMJTAGEWFILES)
 
 noinst_HEADERS = bitbang.h jtag.h bitq.h rlink/dtc_cmd.h rlink/ep1_cmd.h rlink/rlink.h rlink/st7.h
 
 
 noinst_HEADERS = bitbang.h jtag.h bitq.h rlink/dtc_cmd.h rlink/ep1_cmd.h rlink/rlink.h rlink/st7.h
 
index 7fab855e0d19ce2ea7d67cde2810856308ea06f4..24e2c3d9395e40a50e69cdd5bf99bf6c38755c85 100644 (file)
@@ -4,8 +4,8 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/jtag
 
 METASOURCES = AUTO
        -I$(top_srcdir)/src/jtag
 
 METASOURCES = AUTO
-noinst_LIBRARIES = libpld.a
+noinst_LTLIBRARIES = libpld.la
 noinst_HEADERS = pld.h xilinx_bit.h virtex2.h
 noinst_HEADERS = pld.h xilinx_bit.h virtex2.h
-libpld_a_SOURCES = pld.c xilinx_bit.c virtex2.c
+libpld_la_SOURCES = pld.c xilinx_bit.c virtex2.c
 
 MAINTAINERCLEANFILES = Makefile.in
 
 MAINTAINERCLEANFILES = Makefile.in
index 34957a6d7b673865440f66fba8b304e94e96b7cd..4c8a3dce1477a0604ba3a9af97b73cfa385b3ffc 100644 (file)
@@ -6,23 +6,23 @@ AM_CPPFLAGS = \
        -DPKGLIBDIR=\"$(pkglibdir)\"
 
 METASOURCES = AUTO
        -DPKGLIBDIR=\"$(pkglibdir)\"
 
 METASOURCES = AUTO
-noinst_LIBRARIES = libserver.a
+noinst_LTLIBRARIES = libserver.la
 noinst_HEADERS = server.h telnet_server.h gdb_server.h
 noinst_HEADERS = server.h telnet_server.h gdb_server.h
-libserver_a_SOURCES = server.c telnet_server.c gdb_server.c
+libserver_la_SOURCES = server.c telnet_server.c gdb_server.c
 
 if HTTPD
 
 if HTTPD
-libserver_a_SOURCES += httpd.c
+libserver_la_SOURCES += httpd.c
 endif
 
 endif
 
-libserver_a_CFLAGS =
+libserver_la_CFLAGS =
 if IS_MINGW
 # FD_* macros are sloppy with their signs on MinGW32 platform
 if IS_MINGW
 # FD_* macros are sloppy with their signs on MinGW32 platform
-libserver_a_CFLAGS += -Wno-sign-compare
+libserver_la_CFLAGS += -Wno-sign-compare
 endif
 
 # tcl server addons
 noinst_HEADERS += tcl_server.h
 endif
 
 # tcl server addons
 noinst_HEADERS += tcl_server.h
-libserver_a_SOURCES += tcl_server.c
+libserver_la_SOURCES += tcl_server.c
 
 if HTTPD
 nobase_dist_pkglib_DATA = $(wildcard $(srcdir)/httpd/*.tcl $(srcdir)/httpd/*.css $(srcdir)/httpd/menu_cuts/*.png)
 
 if HTTPD
 nobase_dist_pkglib_DATA = $(wildcard $(srcdir)/httpd/*.tcl $(srcdir)/httpd/*.css $(srcdir)/httpd/menu_cuts/*.png)
index 73edd43f33f5821a374ec95619da4df6ec8b9ed2..2709788f8f2b184d4d2b28887bbdcf3e0e6fc542 100644 (file)
@@ -4,8 +4,8 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/jtag
 
 METASOURCES = AUTO
        -I$(top_srcdir)/src/jtag
 
 METASOURCES = AUTO
-noinst_LIBRARIES = libsvf.a
+noinst_LTLIBRARIES = libsvf.la
 noinst_HEADERS = svf.h
 noinst_HEADERS = svf.h
-libsvf_a_SOURCES = svf.c
+libsvf_la_SOURCES = svf.c
 
 MAINTAINERCLEANFILES = Makefile.in
 
 MAINTAINERCLEANFILES = Makefile.in
index 640ff4a6b84f49f2465d7a7924652b7a8e1eb3a0..90796180e4f2146ed9b213547f862253a25b3185 100644 (file)
@@ -11,8 +11,9 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/xsvf
 
 METASOURCES = AUTO
        -I$(top_srcdir)/src/xsvf
 
 METASOURCES = AUTO
-noinst_LIBRARIES = libtarget.a
-libtarget_a_SOURCES = target.c register.c breakpoints.c armv4_5.c embeddedice.c etm.c arm7tdmi.c arm9tdmi.c \
+noinst_LTLIBRARIES = libtarget.la
+libtarget_la_SOURCES = target.c register.c breakpoints.c \
+       armv4_5.c embeddedice.c etm.c arm7tdmi.c arm9tdmi.c \
        arm_jtag.c arm7_9_common.c algorithm.c arm920t.c arm720t.c armv4_5_mmu.c armv4_5_cache.c arm_disassembler.c \
        arm966e.c arm926ejs.c feroceon.c etb.c xscale.c arm_simulator.c image.c armv7m.c cortex_m3.c cortex_a8.c arm_adi_v5.c \
        etm_dummy.c $(OOCD_TRACE_FILES) target_request.c trace.c arm11.c arm11_dbgtap.c mips32.c mips_m4k.c \
        arm_jtag.c arm7_9_common.c algorithm.c arm920t.c arm720t.c armv4_5_mmu.c armv4_5_cache.c arm_disassembler.c \
        arm966e.c arm926ejs.c feroceon.c etb.c xscale.c arm_simulator.c image.c armv7m.c cortex_m3.c cortex_a8.c arm_adi_v5.c \
        etm_dummy.c $(OOCD_TRACE_FILES) target_request.c trace.c arm11.c arm11_dbgtap.c mips32.c mips_m4k.c \
index 3553a7af596b2548302b2d34d837c3bf91b10281..abc6b482b2d64bd0535b0773ddf5c13ef9e9defc 100644 (file)
@@ -4,8 +4,8 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/jtag
 
 METASOURCES = AUTO
        -I$(top_srcdir)/src/jtag
 
 METASOURCES = AUTO
-noinst_LIBRARIES = libxsvf.a
+noinst_LTLIBRARIES = libxsvf.la
 noinst_HEADERS = xsvf.h
 noinst_HEADERS = xsvf.h
-libxsvf_a_SOURCES = xsvf.c
+libxsvf_la_SOURCES = xsvf.c
 
 MAINTAINERCLEANFILES = Makefile.in
 
 MAINTAINERCLEANFILES = Makefile.in

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)