Makefile 745 B

123456789101112131415161718192021222324252627282930313233
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=jshn
  3. PKG_VERSION:=0.1
  4. PKG_RELEASE=1
  5. include $(INCLUDE_DIR)/package.mk
  6. define Package/jshn
  7. SECTION:=utils
  8. CATEGORY:=Utilities
  9. DEPENDS:=+libjson
  10. TITLE:=JSON SHell Notation
  11. endef
  12. define Package/jshn/description
  13. Library for parsing and generating JSON from shell scripts
  14. endef
  15. PKG_BUILD_DEPENDS += libubox
  16. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include --std=gnu99
  17. define Build/Compile
  18. $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/jshn src/jshn.c $(TARGET_LDFLAGS) -ljson
  19. endef
  20. define Package/jshn/install
  21. $(INSTALL_DIR) $(1)/bin $(1)/lib/functions
  22. $(INSTALL_BIN) $(PKG_BUILD_DIR)/jshn $(1)/bin
  23. $(INSTALL_DATA) ./files/jshn.sh $(1)/lib/functions
  24. endef
  25. $(eval $(call BuildPackage,jshn))