mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 22:15:13 +08:00
cfd6ccbfd0
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>
26 lines
446 B
Makefile
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)
|