Use $(shell ... )
authorJoachim Breitner <mail@joachim-breitner.de>
Thu, 20 Sep 2012 11:24:15 +0000 (13:24 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Thu, 20 Sep 2012 11:26:14 +0000 (13:26 +0200)
Makefile
libnss_gw_name.c

index bb828a3..e07cc3a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,16 +12,15 @@ SHARED_OBJECT = libnss_gw_name$(BITSOFS).so.2
 INSTALL_NAME = libnss_gw_name.so.2
 # This only works sometimes, give manually when needed:
 BIT_CFLAGS = $(if $(BITSOFS),-m$(BITSOFS))
-CFLAGS = $(BIT_CFLAGS) -g -O2 -Wall -Wpointer-arith \
-       `pkg-config --cflags libnl-3.0 libnl-route-3.0`
-CPPFLAGS =
-LIBS = `pkg-config --libs libnl-3.0 libnl-route-3.0`
+CFLAGS = $(BIT_CFLAGS) -g -O2 -Wall -Wpointer-arith
+CPPFLAGS = $(shell pkg-config --cflags libnl-3.0 libnl-route-3.0)
+LIBS = $(shell pkg-config --libs libnl-3.0 libnl-route-3.0)
 LDFLAGS = -shared -Wl,-soname,$(INSTALL_NAME) -Wl,-z,defs
 
 all: $(SHARED_OBJECT)
 
 $(SHARED_OBJECT): $(OBJECTS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o $(SHARED_OBJECT) $(OBJECTS) $(LIBS)
+       $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) -o $(SHARED_OBJECT) $(OBJECTS) $(LIBS)
 
 %$(OBJSUFFIX): %.c
        $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c -o $@ $<
index bc26e8e..49780f6 100644 (file)
@@ -19,8 +19,6 @@
  *  © 2004 Lennart Poettering.
  */
 
-
-// #include <netlink/route/rtnl.h>
 #include <netlink/socket.h>
 #include <netlink/route/route.h>
 #include <nss.h>