Makefile: Make it possible to disable kafel and libnl3 from envvar
authorRobert Swiecki <robert@swiecki.net>
Sun, 20 Nov 2016 22:37:38 +0000 (23:37 +0100)
committerRobert Swiecki <robert@swiecki.net>
Sun, 20 Nov 2016 22:37:38 +0000 (23:37 +0100)
Makefile

index d112c1bf4e0cbd8fecccabaee3782dd884efb806..7e8771a0156a0a23de5b282a376360e8e69a607a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,15 +34,21 @@ ifdef DEBUG
        CFLAGS += -g -ggdb -gdwarf-4
 endif
 
+USE_KAFEL = yes
 ifneq ("$(wildcard kafel/include/kafel.h)","")
+ifeq ($(USE_KAFEL), yes)
        CFLAGS += -I./kafel/include/ -DUSE_KAFEL
        LIBS += kafel/libkafel.a
 endif
+endif
 
+USE_NL3 = yes
 ifeq ("$(wildcard /usr/include/libnl3/netlink/route/link/macvlan.h)","/usr/include/libnl3/netlink/route/link/macvlan.h")
+ifeq ($(USE_NL3), yes)
        CFLAGS += -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3
        LDFLAGS += -lnl-3 -lnl-route-3
 endif
+endif
 
 .c.o: %.c
        $(CC) $(CFLAGS) $< -o $@