Blame view

buildroot/buildroot-2016.08.1/package/liblinear/liblinear.mk 1.39 KB
6b13f685e   김민수   BSP 최초 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  ################################################################################
  #
  # liblinear
  #
  ################################################################################
  
  LIBLINEAR_VERSION = 2.1
  LIBLINEAR_SITE = http://www.csie.ntu.edu.tw/~cjlin/liblinear
  LIBLINEAR_LICENSE = BSD-3c
  LIBLINEAR_LICENSE_FILES = COPYRIGHT
  LIBLINEAR_INSTALL_STAGING = YES
  LIBLINEAR_CFLAGS = $(TARGET_CFLAGS)
  
  ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
  # $1: destination directory
  define LIBLINEAR_INSTALL_SHARED
  	$(INSTALL) -m 0644 -D $(@D)/liblinear.so.3 $(1)/usr/lib/liblinear.so.3
  	ln -sf liblinear.so.3 $(1)/usr/lib/liblinear.so
  endef
  LIBLINEAR_CFLAGS += -fPIC
  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) CFLAGS="$(LIBLINEAR_CFLAGS)" -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))