68fab715ef
jimtcl, perl, usb_modeswitch and x264 are registering
UPDATE_CONFIG_HOOK as a post patch hook to get their gnuconfig files
updated. lmbench is the only package calling CONFIG_UPDATE directly,
so for consistency, let's make it use the same logic as jimtcl, perl,
usb_modeswitch and x264.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 2b8b6767ab
)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
43 lines
1.5 KiB
Makefile
43 lines
1.5 KiB
Makefile
################################################################################
|
|
#
|
|
# lmbench
|
|
#
|
|
################################################################################
|
|
|
|
LMBENCH_VERSION = 3.0-a9
|
|
LMBENCH_SOURCE = lmbench-$(LMBENCH_VERSION).tgz
|
|
LMBENCH_SITE = http://downloads.sourceforge.net/project/lmbench/development/lmbench-$(LMBENCH_VERSION)
|
|
LMBENCH_LICENSE = lmbench license (based on GPL-2.0)
|
|
LMBENCH_LICENSE_FILES = COPYING COPYING-2
|
|
|
|
LMBENCH_CFLAGS = $(TARGET_CFLAGS)
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
|
LMBENCH_DEPENDENCIES += host-pkgconf libtirpc
|
|
LMBENCH_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`
|
|
LMBENCH_LDLIBS = `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`
|
|
endif
|
|
|
|
LMBENCH_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
|
|
|
|
define LMBENCH_CONFIGURE_CMDS
|
|
sed -i 's/CFLAGS=/CFLAGS+=/g' $(@D)/src/Makefile
|
|
sed -i 's/LDLIBS=/LDLIBS+=/g' $(@D)/scripts/build
|
|
sed -i '/cd .*doc/d' $(@D)/src/Makefile
|
|
sed -i '/include/d' $(@D)/src/Makefile
|
|
touch $@
|
|
endef
|
|
|
|
# Note: there is a second stage 'make' invocation from the 'scripts/build'
|
|
# script. So the variables override below don't take direct effect in
|
|
# src/Makefile.
|
|
define LMBENCH_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) CFLAGS="$(LMBENCH_CFLAGS)" LDLIBS="$(LMBENCH_LDLIBS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src
|
|
endef
|
|
|
|
define LMBENCH_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" BASE=$(TARGET_DIR)/usr -C $(@D)/src install
|
|
endef
|
|
|
|
$(eval $(generic-package))
|