2014-12-14 18:20:30 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# liblinear
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2016-01-30 16:13:19 +01:00
|
|
|
LIBLINEAR_VERSION = 2.1
|
2015-02-20 14:51:56 +01:00
|
|
|
LIBLINEAR_SITE = http://www.csie.ntu.edu.tw/~cjlin/liblinear
|
2014-12-14 18:20:30 +01:00
|
|
|
LIBLINEAR_LICENSE = BSD-3c
|
2015-04-05 18:48:22 +02:00
|
|
|
LIBLINEAR_LICENSE_FILES = COPYRIGHT
|
2014-12-14 18:20:30 +01:00
|
|
|
LIBLINEAR_INSTALL_STAGING = YES
|
2014-12-22 18:50:38 +01:00
|
|
|
LIBLINEAR_CFLAGS = $(TARGET_CFLAGS)
|
2014-12-14 18:20:30 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
|
|
|
|
# $1: destination directory
|
|
|
|
define LIBLINEAR_INSTALL_SHARED
|
2015-09-19 23:33:49 +02:00
|
|
|
$(INSTALL) -m 0644 -D $(@D)/liblinear.so.3 $(1)/usr/lib/liblinear.so.3
|
|
|
|
ln -sf liblinear.so.3 $(1)/usr/lib/liblinear.so
|
2014-12-14 18:20:30 +01:00
|
|
|
endef
|
2014-12-22 18:50:38 +01:00
|
|
|
LIBLINEAR_CFLAGS += -fPIC
|
2014-12-14 18:20:30 +01:00
|
|
|
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
|
2014-12-22 18:50:38 +01:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(LIBLINEAR_CFLAGS)" -C $(@D) \
|
2014-12-14 18:20:30 +01:00
|
|
|
$(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))
|