2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-27 11:28:00 +01:00
|
|
|
#
|
|
|
|
# libjson
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-27 11:28:00 +01:00
|
|
|
|
|
|
|
LIBJSON_VERSION = 7.6.1
|
|
|
|
LIBJSON_SITE = http://downloads.sourceforge.net/project/libjson
|
|
|
|
LIBJSON_SOURCE = libjson_$(LIBJSON_VERSION).zip
|
|
|
|
LIBJSON_INSTALL_STAGING = YES
|
2017-03-30 15:43:39 +02:00
|
|
|
LIBJSON_LICENSE = BSD-2-Clause
|
2013-03-27 11:28:00 +01:00
|
|
|
LIBJSON_LICENSE_FILES = License.txt
|
|
|
|
|
2021-08-02 00:00:24 +02:00
|
|
|
LIBJSON_CXXFLAGS = $(TARGET_CFLAGS) -DNDEBUG -std=c++11
|
2013-05-03 13:10:23 +02:00
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2014-09-27 21:32:38 +02:00
|
|
|
LIBJSON_MAKE_OPTS += SHARED=0
|
2013-05-03 13:10:23 +02:00
|
|
|
else
|
2014-09-27 21:32:38 +02:00
|
|
|
LIBJSON_MAKE_OPTS += SHARED=1
|
2013-05-03 13:10:23 +02:00
|
|
|
LIBJSON_CXXFLAGS += -fPIC
|
|
|
|
endif
|
|
|
|
|
2014-09-27 21:32:38 +02:00
|
|
|
LIBJSON_MAKE_OPTS += BUILD_TYPE= CXXFLAGS="$(LIBJSON_CXXFLAGS)"
|
2013-03-27 11:28:00 +01:00
|
|
|
|
|
|
|
define LIBJSON_EXTRACT_CMDS
|
2018-04-02 15:09:24 +02:00
|
|
|
$(UNZIP) -d $(@D) $(LIBJSON_DL_DIR)/$(LIBJSON_SOURCE)
|
2013-03-27 11:28:00 +01:00
|
|
|
mv $(@D)/libjson/* $(@D)
|
|
|
|
$(RM) -r $(@D)/libjson
|
|
|
|
$(SED) '/ldconfig/d' $(@D)/makefile
|
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBJSON_BUILD_CMDS
|
2014-12-03 22:41:29 +01:00
|
|
|
mkdir -p $(@D)/Objects_$(if $(BR2_STATIC_LIBS),static,shared) \
|
2013-03-27 11:28:00 +01:00
|
|
|
$(@D)/_internal/Source/Dependencies
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
2014-09-27 21:32:38 +02:00
|
|
|
$(LIBJSON_MAKE_OPTS) -C $(@D)
|
2013-03-27 11:28:00 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBJSON_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
2014-09-27 21:32:38 +02:00
|
|
|
$(LIBJSON_MAKE_OPTS) prefix=$(TARGET_DIR)/usr install -C $(@D)
|
2013-03-27 11:28:00 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBJSON_INSTALL_STAGING_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
2014-09-27 21:32:38 +02:00
|
|
|
$(LIBJSON_MAKE_OPTS) prefix=$(STAGING_DIR)/usr install -C $(@D)
|
2013-03-27 11:28:00 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|