665e13c85e
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed from "prefer static libraries when possible" to "use only static libraries". The former semantic didn't make much sense, since the user had absolutely no control/idea of which package would use static libraries, and which packages would not. Therefore, for quite some time, we have been starting to enforce that BR2_PREFER_STATIC_LIB should really build everything with static libraries. As a consequence, this patch renames BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS, and adjust the Config.in option accordingly. This also helps preparing the addition of other options to select shared, shared+static or just static. Note that we have verified that this commit can be reproduced by simply doing a global rename of BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
47 lines
1.3 KiB
Makefile
47 lines
1.3 KiB
Makefile
################################################################################
|
|
#
|
|
# libsepol
|
|
#
|
|
################################################################################
|
|
|
|
LIBSEPOL_VERSION = 2.1.9
|
|
LIBSEPOL_SITE = http://userspace.selinuxproject.org/releases/20130423
|
|
LIBSEPOL_LICENSE = LGPLv2.1+
|
|
LIBSEPOL_LICENSE_FILES = COPYING
|
|
|
|
LIBSEPOL_INSTALL_STAGING = YES
|
|
|
|
LIBSEPOL_MAKE_FLAGS = $(TARGET_CONFIGURE_OPTS)
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
LIBSEPOL_MAKE_FLAGS += STATIC=1
|
|
endif
|
|
|
|
define LIBSEPOL_BUILD_CMDS
|
|
# DESTDIR is needed during the compile to compute library and
|
|
# header paths.
|
|
$(MAKE) -C $(@D) $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(STAGING_DIR)
|
|
endef
|
|
|
|
define LIBSEPOL_INSTALL_STAGING_CMDS
|
|
$(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(STAGING_DIR)
|
|
endef
|
|
|
|
define LIBSEPOL_INSTALL_TARGET_CMDS
|
|
$(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(TARGET_DIR)
|
|
endef
|
|
|
|
define HOST_LIBSEPOL_BUILD_CMDS
|
|
$(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR)
|
|
endef
|
|
|
|
define HOST_LIBSEPOL_INSTALL_CMDS
|
|
$(MAKE) -C $(@D) install $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR)
|
|
mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib
|
|
(cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so)
|
|
-rmdir $(HOST_DIR)/lib
|
|
endef
|
|
|
|
$(eval $(generic-package))
|
|
$(eval $(host-generic-package))
|