iproute2/devlink/Makefile
Matthias Schiffer cfd6ccbfd0 devlink, rdma, tipc: properly define TARGETS without HAVE_MNL
Leaving a variable with a generic name such as TARGETS undefined would lead
to Make picking up its value from the environment. Avoid this by always
defining TARGETS in the Makefiles.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-05 16:32:17 -08:00

26 lines
446 B
Makefile

# 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)
endif
all: $(TARGETS) $(LIBS)
devlink: $(DEVLINKOBJ)
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
install: all
install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
clean:
rm -f $(DEVLINKOBJ) $(TARGETS)