blob: d47edf770e0ec0963c91ca075643f2e040a60260 [file] [log] [blame]
Sam Mendoza-Jonas61bfdf22016-02-10 10:15:24 +11001################################################################################
2#
3# libflash - builds libflash libraries from skiboot source
4#
5################################################################################
6
Stewart Smith1e49b592017-08-01 16:31:38 +10007LIBFLASH_VERSION = v5.7-76-g830fc9a0ed0a
Sam Mendoza-Jonas61bfdf22016-02-10 10:15:24 +11008
9LIBFLASH_SITE = $(call github,open-power,skiboot,$(LIBFLASH_VERSION))
10LIBFLASH_INSTALL_STAGING = YES
11LIBFLASH_INSTALL_TARGET = YES
12
Stewart Smithb16ba5b2017-01-10 12:55:55 +110013LIBFLASH_LICENSE_FILES = LICENCE
14
Sam Mendoza-Jonas61bfdf22016-02-10 10:15:24 +110015LIBFLASH_MAKE_OPTS += CC="$(TARGET_CC)" LD="$(TARGET_LD)" \
16 AS="$(TARGET_AS)" AR="$(TARGET_AR)" NM="$(TARGET_NM)" \
17 OBJCOPY="$(TARGET_OBJCOPY)" OBJDUMP="$(TARGET_OBJDUMP)" \
18 SIZE="$(TARGET_CROSS)size"
19
Samuel Mendoza-Jonas70a42c62017-06-20 14:07:50 +100020LIBFLASH_MAKE_ENV = \
21 SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
22 $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS)
23
24
Sam Mendoza-Jonas61bfdf22016-02-10 10:15:24 +110025define LIBFLASH_BUILD_CMDS
Samuel Mendoza-Jonas70a42c62017-06-20 14:07:50 +100026 PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared
27 $(if $(BR2_PACKAGE_PFLASH),
28 PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) \
29 -C $(@D)/external/pflash)
Sam Mendoza-Jonas61bfdf22016-02-10 10:15:24 +110030endef
31
32define LIBFLASH_INSTALL_STAGING_CMDS
Samuel Mendoza-Jonas70a42c62017-06-20 14:07:50 +100033 PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared \
34 install
Sam Mendoza-Jonas61bfdf22016-02-10 10:15:24 +110035endef
36
37define LIBFLASH_INSTALL_TARGET_CMDS
Samuel Mendoza-Jonas70a42c62017-06-20 14:07:50 +100038 PREFIX=$(TARGET_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared \
39 install-lib
40 $(if $(BR2_PACKAGE_PFLASH),
41 DESTDIR=$(TARGET_DIR) $(LIBFLASH_MAKE_ENV) \
42 -C $(@D)/external/pflash install)
Sam Mendoza-Jonas61bfdf22016-02-10 10:15:24 +110043endef
44
45$(eval $(generic-package))