buildroot/package/dropwatch/dropwatch.mk
Baruch Siach 8934cb0795 dropwatch: fix static link
Use LDLIBS for the list of libraries, since LDFLAGS appear before the source
files in the link command, and the upstream LDLIBS lacks -lncurses which is a
dependency of readline. We already pass target LDFLAGS in
TARGET_CONFIGURE_OPTS, so drop that part.

Fixes:
http://autobuild.buildroot.net/results/ce4/ce436bdd7e7950c801edac01f311b89110d87d62/
http://autobuild.buildroot.net/results/691/691d61d13849150c3616b1c74c964f50118ff1d9/
http://autobuild.buildroot.net/results/291/2918c75e473c5a2434e72f2e409becc5b4d07908/

Cc: Tzu-Jung Lee <roylee17@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-01 12:42:06 +02:00

33 lines
953 B
Makefile

################################################################################
#
# dropwatch
#
################################################################################
DROPWATCH_VERSION = 7c33d8a8ed105b07a46b55d71d93b36ed34c16db
DROPWATCH_SITE = git://git.infradead.org/users/nhorman/dropwatch.git
DROPWATCH_DEPENDENCIES = binutils libnl readline host-pkgconf
DROPWATCH_LICENSE = GPL-2.0
DROPWATCH_LICENSE_FILES = COPYING
# libbfd may be linked to libintl
# Ugly... but LDLIBS are hardcoded anyway
DROPWATCH_LDLIBS = \
-lbfd -lreadline -lnl-3 -lnl-genl-3 -lpthread -lncurses -lm
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
DROPWATCH_LDLIBS += -lintl
endif
define DROPWATCH_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
LDLIBS="$(DROPWATCH_LDLIBS)" build
endef
define DROPWATCH_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/src/dropwatch \
$(TARGET_DIR)/usr/bin/dropwatch
endef
$(eval $(generic-package))