Makefile revision fd21eb38
1 2include $(TOPDIR)/rules.mk 3 4PKG_NAME:=appfilter 5PKG_VERSION:=5.0.2 6PKG_RELEASE:=1 7 8PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) 9 10 11include $(INCLUDE_DIR)/package.mk 12#include $(INCLUDE_DIR)/kernel.mk 13 14define Package/appfilter 15 SECTION:=Derry Apps 16 CATEGORY:=Derry Apps 17 DEPENDS:=+libubox +libubus +libuci +libpthread +libjson-c +libblobmsg-json 18 TITLE:=App filter userspace module 19endef 20 21define Build/Prepare 22 mkdir -p $(PKG_BUILD_DIR) 23 cp -rf ./src/* $(PKG_BUILD_DIR) 24endef 25 26define Build/Compile 27 $(MAKE) -C $(PKG_BUILD_DIR)/ \ 28 CC="$(TARGET_CROSS)gcc" \ 29 CFLAGS="$(TARGET_CFLAGS)" \ 30 LIBS="$(TARGET_LDFLAGS) -lm -lpthread -lubox -luci -lubus -ljson-c -lblobmsg_json" \ 31 all 32endef 33 34 35define Build/Compile/Default 36 37endef 38 39define Package/appfilter/description 40 open appfilter app 41endef 42 43 44define Package/appfilter/install 45 echo "install" 46 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d 47 $(INSTALL_DIR) $(1)/etc/appfilter 48 $(INSTALL_DIR) $(1)/etc/config 49 $(CP) ./files/*.cfg $(1)/etc/appfilter/ 50 $(INSTALL_BIN) ./files/appfilter.init $(1)/etc/init.d/appfilter 51 $(INSTALL_BIN) ./files/oaf_rule $(1)/usr/bin 52 $(INSTALL_BIN) ./files/gen_class.sh $(1)/usr/bin 53 $(INSTALL_BIN) ./files/appfilter.config $(1)/etc/config/appfilter 54 $(INSTALL_BIN) $(PKG_BUILD_DIR)/oafd $(1)/usr/bin 55endef 56 57 58$(eval $(call BuildPackage,appfilter)) 59 60