mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-02 21:48:20 +03:00
Signed-off-by: Romain Naour <romain.naour@openwide.fr> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr> [yann.morin.1998@free.fr: add ability to build a static lib; handle static-only and static+shared cases] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
45 lines
1.3 KiB
Makefile
45 lines
1.3 KiB
Makefile
################################################################################
|
|
#
|
|
# liblinear
|
|
#
|
|
################################################################################
|
|
|
|
LIBLINEAR_VERSION = 1.96
|
|
LIBLINEAR_SITE = http://www.csie.ntu.edu.tw/~cjlin/liblinear/$(LIBLINEAR_VERSION_MAJOR)
|
|
LIBLINEAR_LICENSE = BSD-3c
|
|
LIBLINEAR_LICENSE_FILES = COPYING
|
|
LIBLINEAR_INSTALL_STAGING = YES
|
|
|
|
ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
|
|
# $1: destination directory
|
|
define LIBLINEAR_INSTALL_SHARED
|
|
$(INSTALL) -m 0644 -D $(@D)/liblinear.so.2 $(1)/usr/lib/liblinear.so.2
|
|
ln -sf liblinear.so.2 $(1)/usr/lib/liblinear.so
|
|
endef
|
|
endif
|
|
|
|
ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
|
|
# $1: destination directory
|
|
define LIBLINEAR_INSTALL_STATIC
|
|
$(INSTALL) -m 0644 -D $(@D)/liblinear.a $(1)/usr/lib/liblinear.a
|
|
endef
|
|
endif
|
|
|
|
define LIBLINEAR_BUILD_CMDS
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
|
|
$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),lib) \
|
|
$(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),static-lib)
|
|
endef
|
|
|
|
define LIBLINEAR_INSTALL_STAGING_CMDS
|
|
$(INSTALL) -m 0644 -D $(@D)/linear.h $(STAGING_DIR)/usr/include/linear.h
|
|
$(call LIBLINEAR_INSTALL_SHARED,$(STAGING_DIR))
|
|
$(call LIBLINEAR_INSTALL_STATIC,$(STAGING_DIR))
|
|
endef
|
|
|
|
define LIBLINEAR_INSTALL_TARGET_CMDS
|
|
$(call LIBLINEAR_INSTALL_SHARED,$(TARGET_DIR))
|
|
endef
|
|
|
|
$(eval $(generic-package))
|