Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright (C) 2018 Onion Corporation
  2. #
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=oboo-clock-card-manager
  9. PKG_VERSION:=0.2.9
  10. PKG_RELEASE:=1
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  12. include $(INCLUDE_DIR)/package.mk
  13. # application package
  14. define Package/oboo-clock-card-manager
  15. SECTION:=onion
  16. CATEGORY:=Onion
  17. SUBMENU:=Oboo
  18. TITLE:=Oboo card manager and GUI framework
  19. DEPENDS:=+libmosquitto-ssl +mosquitto-ssl +mosquitto-client-ssl
  20. endef
  21. define Package/oboo-clock-card-manager/description
  22. Oboo card manager and GUI framework
  23. endef
  24. define Build/Prepare
  25. mkdir -p $(PKG_BUILD_DIR)/
  26. $(CP) ./src/* $(PKG_BUILD_DIR)/
  27. endef
  28. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
  29. TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
  30. define Build/Compile
  31. $(MAKE) -C $(PKG_BUILD_DIR)/ \
  32. CC="$(TARGET_CC)" \
  33. CFLAGS="$(TARGET_CFLAGS)" \
  34. LDFLAGS="$(TARGET_LDFLAGS)"
  35. endef
  36. define Package/oboo-clock-card-manager/install
  37. $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
  38. # install the binary
  39. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/card-manager $(1)/usr/bin/
  40. # install the init.d script
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/device/etc/init.d/card-manager $(1)/etc/init.d/card-manager
  42. # install scripts
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/cards/status.sh $(1)/usr/bin/
  44. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/cards/select.sh $(1)/usr/bin/
  45. endef
  46. $(eval $(call BuildPackage,$(PKG_NAME)))