summaryrefslogtreecommitdiffstats
path: root/package/flashbench/flashbench.mk
blob: faf8ae69ec6d44260ba4b9540b6bc25acf53c347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#############################################################
#
# flashbench
#
#############################################################

FLASHBENCH_VERSION = 2e30b1968a66147412f21002ea844122a0d5e2f0
FLASHBENCH_SITE = git://git.linaro.org/people/arnd/flashbench.git
FLASHBENCH_LICENSE = GPLv2
FLASHBENCH_LICENSE_FILES = COPYING

FLASHBENCH_CFLAGS = $(TARGET_CFLAGS)

ifeq ($(BR2_microblaze),y)
# microblaze toolchain only provides LLONG_MAX when used with gnu99 dialect
FLASHBENCH_CFLAGS += -std=gnu99
endif

define FLASHBENCH_BUILD_CMDS
	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
		CFLAGS="$(FLASHBENCH_CFLAGS)" \
		LDFLAGS="$(TARGET_LDFLAGS) -lrt"
endef

define FLASHBENCH_INSTALL_TARGET_CMDS
	$(INSTALL) -m 755 -D $(@D)/flashbench $(TARGET_DIR)/usr/bin/flashbench
	$(INSTALL) -m 755 -D $(@D)/erase $(TARGET_DIR)/usr/bin/erase
endef

$(eval $(generic-package))