]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Use LIBADD instead of LDADD when appropriate.
authorVincent Bernat <bernat@luffy.cx>
Tue, 24 Jan 2012 06:45:44 +0000 (07:45 +0100)
committerVincent Bernat <bernat@luffy.cx>
Tue, 24 Jan 2012 07:08:46 +0000 (08:08 +0100)
src/Makefile.am
tests/Makefile.am

index 006ac62438c61a06abbe66c810e9b093ecaf5ff2..3778ab974c7acf37717d00833dc59c06a7b6af8d 100644 (file)
@@ -1,14 +1,20 @@
 sbin_PROGRAMS = lldpd lldpctl
 noinst_LTLIBRARIES = liblldpd.la libcommon.la
 
-## Shared by all executables
+## Convenience library for lldpd, lldpctl and tests
 libcommon_la_SOURCES = log.c ctl.c marshal.c marshal.h lldpd.h lldp.h cdp.h compat.h sonmp.h edp.h
 libcommon_la_LIBADD = @LTLIBOBJS@ 
 
-## Used for lldpd and tests
+## Convenience library for lldpd and tests
 liblldpd_la_SOURCES = frame.h frame.c lldpd.c lldp.c cdp.c sonmp.c edp.c \
        interfaces.c client.c priv.c privsep_fdpass.c dmi.c ctl-server.c
 liblldpd_la_LIBADD = libcommon.la
+# Add SNMP support if needed
+if USE_SNMP
+liblldpd_la_SOURCES += agent.c agent_priv.c agent.h
+liblldpd_la_CFLAGS = @NETSNMP_CFLAGS@
+liblldpd_la_LIBADD += @NETSNMP_LIBS@
+endif
 
 ## lldpd
 lldpd_SOURCES = main.c
@@ -17,18 +23,8 @@ lldpd_LDADD = liblldpd.la
 ## lldpctl
 lldpctl_SOURCES = lldpctl.h lldpctl.c display.c writer.h text_writer.c kv_writer.c
 lldpctl_LDADD = libcommon.la
-
-## With SNMP...
-if USE_SNMP
-liblldpd_la_SOURCES += agent.c agent_priv.c agent.h
-liblldpd_la_CFLAGS = @NETSNMP_CFLAGS@
-lldpd_LDADD += @NETSNMP_LIBS@
-endif
-
 if USE_XML
 lldpctl_SOURCES += xml_writer.c
 lldpctl_CFLAGS = @XML2_CFLAGS@
 lldpctl_LDADD  += @XML2_LIBS@
 endif
-
-
index df67292b2023a1203e21d648707234fcc805730f..9f6ae471e3c72b17477ff6466cef7d9fb9efcadb 100644 (file)
@@ -33,8 +33,6 @@ TESTS += check_snmp
 check_snmp_SOURCES = check_snmp.c \
        $(top_builddir)/src/lldpd.h \
        $(top_builddir)/src/agent.h
-
-LDADD += @NETSNMP_LIBS@
 endif
 
 check_PROGRAMS = $(TESTS)