include $(TOPDIR)/rules.mk PKG_NAME:=helloworld PKG_VERSION:=1.0 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk define Package/helloworld CATEGORY:=Helloworld TITLE:=Helloworld -- by hzlarm endef define Build/Prepare mkdir -p $(PKG_BUILD_DIR) $(CP) ./src/* $(PKG_BUILD_DIR)/ endef define Package/helloworld/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/bin/ endef $(eval $(call BuildPackage,helloworld))
Add a variable called source_dir with the directory address to your code in your makefile. for example:
SOURCE_DIR:=/home/johndoe/helloworld
also you need to update your package feeds using:
标签:helloworld,your,endef,BUILD,openwrt,DIR,PKG From: https://www.cnblogs.com/hshy/p/17121903.htmlcd /home/johndoe/openwrt ./scripts/feeds update mypackages ./scripts/feeds install -a -p mypackages
【转】https://stackoverflow.com/questions/51511225/no-rule-to-make-target-package-helloworld-install-stop
注意:Makefile格式 最后一行没有tab