54 lines
1.4 KiB
Makefile
54 lines
1.4 KiB
Makefile
|
include $(TOPDIR)/rules.mk
|
||
|
|
||
|
PKG_NAME:=libcjson
|
||
|
PKG_VERSION:=2017-06-28
|
||
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||
|
|
||
|
PKG_SOURCE_PROTO:=git
|
||
|
PKG_SOURCE_URL=https://github.com/DaveGamble/cJSON.git
|
||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||
|
PKG_SOURCE_VERSION:=d3bc571a38bb1bea06cc8b263b66a41a84bb7322
|
||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||
|
PKG_MIRROR_MD5SUM:=
|
||
|
CMAKE_INSTALL:=1
|
||
|
|
||
|
PKG_LICENSE:=ISC
|
||
|
PKG_LICENSE_FILES:=LICENSE
|
||
|
|
||
|
PKG_MAINTAINER:=Dave Gamble
|
||
|
|
||
|
include $(BUILD_DIR)/package.mk
|
||
|
include $(BUILD_DIR)/cmake.mk
|
||
|
|
||
|
CMAKE_OPTIONS =
|
||
|
|
||
|
define Package/libcjson
|
||
|
SECTION:=libcjson
|
||
|
CATEGORY:=Libraries
|
||
|
TITLE:=Ultralightweight JSON parser in ANSI C
|
||
|
ABI_VERSION:=$(PKG_VERSION)
|
||
|
DEPENDS:=
|
||
|
endef
|
||
|
|
||
|
define Package/libcjson/description
|
||
|
cJSON aims to be the dumbest possible parser that you can get your job done with. It's a single file of C, and a single header file.
|
||
|
endef
|
||
|
|
||
|
|
||
|
TARGET_CFLAGS += -DENABLE_CJSON_TEST=Off -DENABLE_VALGRIND=Off
|
||
|
|
||
|
define Build/InstallDev
|
||
|
$(INSTALL_DIR) $(1)/usr/include/cjson
|
||
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/cjson/*.h $(1)/usr/include/cjson/
|
||
|
|
||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
|
||
|
endef
|
||
|
|
||
|
define Package/libcjson/install
|
||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
|
||
|
endef
|
||
|
|
||
|
$(eval $(call BuildPackage,libcjson))
|