59 lines
1.4 KiB
Makefile
59 lines
1.4 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=libs2json
|
|
PKG_VERSION:=1
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_BUILD_DIR := $(COMPILE_DIR)/$(PKG_NAME)
|
|
|
|
include $(BUILD_DIR)/package.mk
|
|
|
|
define Package/libs2json
|
|
SECTION:=libs2json
|
|
CATEGORY:=Libraries
|
|
TITLE:=Automatic convert between struct and json string.
|
|
DEPENDS:=+libcjson
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/Default
|
|
SECTION:=utils
|
|
CATEGORY:=Allwinner
|
|
DEPENDS:=+libpthread +libstdcpp +liballwinner-base +liballwinner +dlna-service
|
|
endef
|
|
|
|
define Build/Prepare
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
$(CP) ./src $(PKG_BUILD_DIR)/
|
|
endef
|
|
|
|
define Build/Configure
|
|
endef
|
|
|
|
define Build/Compile
|
|
#compile demo
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/src \
|
|
ARCH="$(TARGET_ARCH)" \
|
|
AR="$(TARGET_AR)" \
|
|
CC="$(TARGET_CC)" \
|
|
CXX="$(TARGET_CXX)" \
|
|
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/cjson"\
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \
|
|
all \
|
|
V=1
|
|
endef
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(INSTALL_DIR) $(1)/usr/include/cjson
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/libs2json.so $(1)/usr/lib/
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/include/*.h $(1)/usr/include/cjson
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/install
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/libs2json.so $(1)/usr/lib/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|