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 <jengelh@inai.de>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Jan Engelhardt 2013-11-26 15:19:45 +01:00 committed by Thomas Graf
parent ae19ac0154
commit bda0f668b6
2 changed files with 8 additions and 5 deletions

View File

@ -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 \

View File

@ -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 \