sngrep: fix error if gnutls and openssl are both enabled
[buildroot-gz.git] / package / libjson / libjson.mk
blobc73a69f10e78a45465ea9f8e1379d62380a435a9
1 ################################################################################
3 # libjson
5 ################################################################################
7 LIBJSON_VERSION = 7.6.1
8 LIBJSON_SITE = http://downloads.sourceforge.net/project/libjson
9 LIBJSON_SOURCE = libjson_$(LIBJSON_VERSION).zip
10 LIBJSON_INSTALL_STAGING = YES
11 LIBJSON_LICENSE = BSD-2c
12 LIBJSON_LICENSE_FILES = License.txt
14 LIBJSON_CXXFLAGS = $(TARGET_CFLAGS) -DNDEBUG
16 ifeq ($(BR2_STATIC_LIBS),y)
17 LIBJSON_MAKE_OPTS += SHARED=0
18 else
19 LIBJSON_MAKE_OPTS += SHARED=1
20 LIBJSON_CXXFLAGS += -fPIC
21 endif
23 LIBJSON_MAKE_OPTS += BUILD_TYPE= CXXFLAGS="$(LIBJSON_CXXFLAGS)"
25 define LIBJSON_EXTRACT_CMDS
26 $(UNZIP) -d $(@D) $(DL_DIR)/$(LIBJSON_SOURCE)
27 mv $(@D)/libjson/* $(@D)
28 $(RM) -r $(@D)/libjson
29 $(SED) '/ldconfig/d' $(@D)/makefile
30 endef
32 define LIBJSON_BUILD_CMDS
33 mkdir -p $(@D)/Objects_$(if $(BR2_STATIC_LIBS),static,shared) \
34 $(@D)/_internal/Source/Dependencies
35 $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
36 $(LIBJSON_MAKE_OPTS) -C $(@D)
37 endef
39 define LIBJSON_INSTALL_TARGET_CMDS
40 $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
41 $(LIBJSON_MAKE_OPTS) prefix=$(TARGET_DIR)/usr install -C $(@D)
42 endef
44 define LIBJSON_INSTALL_STAGING_CMDS
45 $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
46 $(LIBJSON_MAKE_OPTS) prefix=$(STAGING_DIR)/usr install -C $(@D)
47 endef
49 $(eval $(generic-package))