]> granicus.if.org Git - libnl/commitdiff
build: separate compiler and linker flags
authorJan Engelhardt <jengelh@inai.de>
Tue, 26 Nov 2013 14:19:45 +0000 (15:19 +0100)
committerThomas Graf <tgraf@suug.ch>
Wed, 27 Nov 2013 22:38:50 +0000 (23:38 +0100)
-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>
src/Makefile.am
src/lib/Makefile.am

index 87dd871288a915317913d1820bcb079b1638c53c..b2b7fc7fae33df7bb846b1411c31bddc20744974 100644 (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 \
index 6688e7c0826cf1e7229284b2722cf0c5e4d611b8..516111512b515c2160e6d149d302d78c1c94a4ce 100644 (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 \