]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - devlink/Makefile
devlink: Add a possibility to print arrays of devlink port handles
[mirror_iproute2.git] / devlink / Makefile
index 7256c28708eb2dac2278ce5181c96074618ea958..7da7d1fa18d5068e36ba0f842805e800d26539fa 100644 (file)
@@ -1,11 +1,12 @@
-include ../Config
+# SPDX-License-Identifier: GPL-2.0
+include ../config.mk
+
+TARGETS :=
+
 ifeq ($(HAVE_MNL),y)
 
 DEVLINKOBJ = devlink.o mnlg.o
-TARGETS=devlink
-
-CFLAGS += $(shell $(PKG_CONFIG) libmnl --cflags)
-LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
+TARGETS += devlink
 
 endif
 
@@ -15,7 +16,9 @@ devlink: $(DEVLINKOBJ)
        $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
 
 install: all
-       install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
+       for i in $(TARGETS); \
+       do install -m 0755 $$i $(DESTDIR)$(SBINDIR); \
+       done
 
 clean:
        rm -f $(DEVLINKOBJ) $(TARGETS)