1 ################################################################################
5 ################################################################################
7 LIBLINEAR_VERSION
= 2.1
8 LIBLINEAR_SITE
= http
://www.csie.ntu.edu.tw
/~cjlin
/liblinear
9 LIBLINEAR_LICENSE
= BSD-3c
10 LIBLINEAR_LICENSE_FILES
= COPYRIGHT
11 LIBLINEAR_INSTALL_STAGING
= YES
12 LIBLINEAR_CFLAGS
= $(TARGET_CFLAGS
)
14 ifeq ($(BR2_SHARED_LIBS
)$(BR2_SHARED_STATIC_LIBS
),y
)
15 # $1: destination directory
16 define LIBLINEAR_INSTALL_SHARED
17 $(INSTALL
) -m
0644 -D
$(@D
)/liblinear.so
.3 $(1)/usr
/lib
/liblinear.so
.3
18 ln
-sf liblinear.so
.3 $(1)/usr
/lib
/liblinear.so
20 LIBLINEAR_CFLAGS
+= -fPIC
23 ifeq ($(BR2_STATIC_LIBS
)$(BR2_SHARED_STATIC_LIBS
),y
)
24 # $1: destination directory
25 define LIBLINEAR_INSTALL_STATIC
26 $(INSTALL
) -m
0644 -D
$(@D
)/liblinear.a
$(1)/usr
/lib
/liblinear.a
30 define LIBLINEAR_BUILD_CMDS
31 $(MAKE
) $(TARGET_CONFIGURE_OPTS
) CFLAGS
="$(LIBLINEAR_CFLAGS)" -C
$(@D
) \
32 $(if
$(BR2_SHARED_LIBS
)$(BR2_SHARED_STATIC_LIBS
),lib
) \
33 $(if
$(BR2_STATIC_LIBS
)$(BR2_SHARED_STATIC_LIBS
),static-lib
)
36 define LIBLINEAR_INSTALL_STAGING_CMDS
37 $(INSTALL
) -m
0644 -D
$(@D
)/linear.h
$(STAGING_DIR
)/usr
/include/linear.h
38 $(call LIBLINEAR_INSTALL_SHARED
,$(STAGING_DIR
))
39 $(call LIBLINEAR_INSTALL_STATIC
,$(STAGING_DIR
))
42 define LIBLINEAR_INSTALL_TARGET_CMDS
43 $(call LIBLINEAR_INSTALL_SHARED
,$(TARGET_DIR
))
46 $(eval
$(generic-package
))