+2004-07-23 Greg Troxel <gdt@poblano.ir.bbn.com>
+
+ * */Makefile.am: Use ../dir/libfoo.la, rather than "-L../dir
+ -lfoo", to avoid linking against installed libraries from a
+ previous version.
+
+ * {lib,ospfd,ospfclient}/Makefile.am: explicitly define the shared
+ library version number to be 0.0
+
+ * configure.ac: remove spurious , so extract.pl is chmod'd +x.
+
+ * HACKING: explain shared library versioning rules
+
2004-07-22 Paul Jakma <paul@dishone.st>
* configure.ac: modify default CFLAGS to be compiler agnostic
-*- mode: text; -*-
-$Id: HACKING,v 1.6 2004/05/13 13:38:06 paul Exp $
+$Id: HACKING,v 1.7 2004/07/23 16:23:56 gdt Exp $
GUIDELINES FOR HACKING ON QUAGGA
[TBD: resolve per-dir vs top-level, perhaps by reading GNU coding
standards]
+SHARED LIBRARY VERSIONING
+
+[this section is at the moment just gdt's opinion]
+
+Quagga builds several shared libaries (lib/libzebra, ospfd/libospf,
+ospfclient/libsopfapiclient). These may be used by external programs,
+e.g. a new routing protocol that works with the zebra daemon, or
+ospfapi clients. The libtool info pages (node Versioning) explain
+when major and minor version numbers should be changed. These values
+are set in Makefile.am near the definition of the library. If you
+make a change that requires changing the shared library version,
+please update Makefile.am.
+
+libospf exports far more than it should, and is needed by ospfapi
+clients. Only bump libospf for changes to functions for which it is
+reasonable for a user of ospfapi to call, and please err on the side
+of not bumping.
+
+There is no support intended for installing part of zebra. The core
+library libzebra and the included daemons should always be built and
+installed together.
+
PATCH SUBMISSION
* Send a clean diff against the head of CVS in unified diff format, eg by:
bgpd_SOURCES = \
bgp_main.c $(libbgp_a_SOURCES)
-bgpd_LDADD = -L../lib -lzebra @LIBCAP@
+bgpd_LDADD = ../lib/libzebra.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = bgpd.conf.sample bgpd.conf.sample2
## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
##
-## $Id: configure.ac,v 1.56 2004/07/22 18:16:59 paul Exp $
+## $Id: configure.ac,v 1.57 2004/07/23 16:23:56 gdt Exp $
AC_PREREQ(2.53)
AC_INIT(quagga, 0.96.5, [http://bugzilla.quagga.net])
ospfclient/Makefile
vtysh/extract.pl
redhat/Makefile redhat/quagga.spec
- lib/version.h,
- tests/Makefile,
+ lib/version.h
+dnl tests/Makefile
+ ,
[chmod +x vtysh/extract.pl])
echo "
bin_PROGRAMS = zebra-guile
zebra_guile_SOURCES = zebra-guile.c zebra-support.c guile-bgp.c
noinst_HEADERS = zebra-guile.h
-zebra_guile_LDADD = @GUILE_LDFLAGS@ ../bgpd/libbgp.a -L../lib -lzebra
+zebra_guile_LDADD = @GUILE_LDFLAGS@ ../bgpd/libbgp.a ../lib/libzebra.la
isisd_SOURCES = \
isis_main.c $(libisis_a_SOURCES)
-isisd_LDADD = -L../lib -lzebra @LIBCAP@
+isisd_LDADD = ../lib/libzebra.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = isisd.conf.sample
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
lib_LTLIBRARIES = libzebra.la
+libzebra_la_LDFLAGS = -version 0:0:0
libzebra_la_SOURCES = \
version.c network.c pid_output.c getopt.c getopt1.c daemon.c \
ospf6d_SOURCES = \
ospf6_main.c $(libospf6_a_SOURCES)
-ospf6d_LDADD = -L../lib -lzebra @LIBCAP@
+ospf6d_LDADD = ../lib/libzebra.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = ospf6d.conf.sample
INCLUDES = -I../lib -I../
lib_LTLIBRARIES = libospfapiclient.la
+libospfapiclient_la_LDFLAGS = -version 0:0:0
+
sbin_PROGRAMS = ospfclient
libospfapiclient_la_SOURCES = \
ospfclient.c
ospfclient_LDADD = libospfapiclient.la \
- -L../ospfd -lospf -L../lib -lzebra @LIBCAP@
+ ../ospfd/libospf.la ../lib/libzebra.la @LIBCAP@
INSTALL_SDATA=@INSTALL@ -m 600
lib_LTLIBRARIES = libospf.la
+libospf_la_LDFLAGS = -version 0:0:0
+
sbin_PROGRAMS = ospfd
libospf_la_SOURCES = \
ospfd_SOURCES = ospf_main.c
-ospfd_LDADD = libospf.la -L../lib -lzebra @LIBCAP@
+ospfd_LDADD = libospf.la ../lib/libzebra.la @LIBCAP@
EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt
ripd_SOURCES = \
rip_main.c $(librip_a_SOURCES)
-ripd_LDADD = -L../lib -lzebra @LIBCAP@
+ripd_LDADD = ../lib/libzebra.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = ripd.conf.sample
ripngd_SOURCES = \
ripng_main.c $(libripng_a_SOURCES)
-ripngd_LDADD = -L../lib -lzebra @LIBCAP@
+ripngd_LDADD = ../lib/libzebra.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = ripngd.conf.sample
nodist_vtysh_SOURCES = vtysh_cmd.c
CLEANFILES = vtysh_cmd.c
noinst_HEADERS = vtysh.h vtysh_user.h
-vtysh_LDADD = -L../lib -lzebra @LIBCAP@
+vtysh_LDADD = ../lib/libzebra.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = vtysh.conf.sample
connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \
interface.h ipforward.h irdp.h
-zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) -L../lib -lzebra
+zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
zebra_DEPENDENCIES = $(otherobj)
ioctl.c ioctl_solaris.c \
GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB
-#client : client_main.o -L../lib -lzebra
-# $(CC) -g -o client client_main.o -L../lib -lzebra $(LIBS) $(LIB_IPV6)
+#client : client_main.o ../lib/libzebra.la
+# $(CC) -g -o client client_main.o ../liblzebra.la $(LIBS) $(LIB_IPV6)
quaggaconfdir = $(sysconfdir)