]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/efivar/efivar.mk
d06192ed22a032c03f35f734815d134747131f5b
[coffee/buildroot.git] / package / efivar / efivar.mk
1 ################################################################################
2 #
3 # efivar
4 #
5 ################################################################################
6
7 EFIVAR_VERSION = 30
8 EFIVAR_SITE = $(call github,rhinstaller,efivar,$(EFIVAR_VERSION))
9 EFIVAR_LICENSE = LGPL-2.1
10 EFIVAR_LICENSE_FILES = COPYING
11 EFIVAR_DEPENDENCIES = popt
12 EFIVAR_INSTALL_STAGING = YES
13
14 # BINTARGETS is set to skip efivar-static which requires static popt,
15 # and since we depend on dynamic libraries, efivar will never be built
16 # in a static-only environment.
17 # -fPIC is needed at least on MIPS, otherwise fails to build shared
18 # -library.
19 EFIVAR_MAKE_OPTS = \
20         libdir=/usr/lib \
21         BINTARGETS=efivar \
22         LDFLAGS="$(TARGET_LDFLAGS) -fPIC"
23
24 define EFIVAR_BUILD_CMDS
25         # makeguids is an internal host tool and must be built separately with
26         # $(HOST_CC), otherwise it gets cross-built.
27         $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \
28                 CFLAGS="$(HOST_CFLAGS) -std=gnu99" \
29                 $(MAKE) -C $(@D)/src gcc_cflags=  makeguids
30
31         $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \
32                 AR=$(TARGET_AR) NM=$(TARGET_NM) RANLIB=$(TARGET_RANLIB) \
33                 $(EFIVAR_MAKE_OPTS) \
34                 all
35 endef
36
37 define EFIVAR_INSTALL_STAGING_CMDS
38         $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \
39                 $(EFIVAR_MAKE_OPTS) \
40                 DESTDIR="$(STAGING_DIR)" \
41                 install
42 endef
43
44 define EFIVAR_INSTALL_TARGET_CMDS
45         $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \
46                 $(EFIVAR_MAKE_OPTS) \
47                 DESTDIR="$(TARGET_DIR)" \
48                 install
49 endef
50
51 $(eval $(generic-package))