From: Jan Engelhardt Date: Tue, 26 Nov 2013 14:19:45 +0000 (+0100) Subject: build: separate compiler and linker flags X-Git-Tag: libnl3_2_24rc1~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bda0f668b6355e84b1db89d934e8e5062a2ef0bb;p=libnl build: separate compiler and linker flags -Wall is a compiler flag, and thus should be in CFLAGS, not CPPFLAGS. Similarly, -l belongs into LDADD/LIBADD because of ordering constraints. Signed-off-by: Jan Engelhardt Signed-off-by: Thomas Graf --- diff --git a/src/Makefile.am b/src/Makefile.am index 87dd871..b2b7fc7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,8 @@ SUBDIRS = lib -AM_CPPFLAGS = -Wall -I${top_srcdir}/include -I${top_builddir}/include -D_GNU_SOURCE -DSYSCONFDIR=\"$(sysconfdir)/libnl\" +AM_CPPFLAGS = -I${top_srcdir}/include -I${top_builddir}/include -D_GNU_SOURCE -DSYSCONFDIR=\"$(sysconfdir)/libnl\" +AM_CFLAGS = -Wall LDADD = \ ${top_builddir}/src/lib/libnl-cli-3.la \ diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 6688e7c..5161115 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -1,10 +1,12 @@ # -*- Makefile -*- -AM_CPPFLAGS = -Wall -I${top_srcdir}/include -I${top_builddir}/include -D_GNU_SOURCE -DPKGLIBDIR=\"$(pkglibdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -rdynamic +AM_CPPFLAGS = -I${top_srcdir}/include -I${top_builddir}/include -D_GNU_SOURCE -DPKGLIBDIR=\"$(pkglibdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -rdynamic +AM_CFLAGS = -Wall AM_LDFLAGS = \ - -L${top_builddir}/lib \ - -ldl \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +NL_LIBADD = \ + -L${top_builddir}/lib \ + -ldl #nobase_pkglib_LTLIBRARIES = cls/basic.la cls/ematch/cmp.la #cls_basic_la_LDFLAGS = -module -version-info 2:0:0 @@ -34,7 +36,7 @@ lib_LTLIBRARIES = \ libnl_cli_3_la_LIBADD = ${top_builddir}/lib/libnl-3.la \ ${top_builddir}/lib/libnl-route-3.la \ ${top_builddir}/lib/libnl-nf-3.la \ - ${top_builddir}/lib/libnl-genl-3.la + ${top_builddir}/lib/libnl-genl-3.la ${NL_LIBADD} libnl_cli_3_la_SOURCES = \ utils.c addr.c ct.c link.c neigh.c rule.c route.c \