首页 > 其他分享 >openwrt helloworld

openwrt helloworld

时间:2023-02-15 10:47:51浏览次数:49  
标签:helloworld your endef BUILD openwrt DIR PKG

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:

cd /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

标签:helloworld,your,endef,BUILD,openwrt,DIR,PKG
From: https://www.cnblogs.com/hshy/p/17121903.html

相关文章

  • ubuntu搭建编译OpenWRT
    搭建OpenWRT开发环境打开终端,输入执行sudoapt-getupdate(检查软件包的更新):sudoapt-getinstallgccg++binutilspatchbzip2flexbisonmakeautoconfgettextt......
  • 编译OpenWRT-for-MT7620A(带8021x验证)
    PS:要转载请注明出处,本人版权所有。PS:这个只是基于《我自己》的理解,如果和你的原则及想法相冲突,请谅解,勿喷。前置说明  本文作为本人csdnblog的主站的备份。(BlogID......
  • vue再读6-vue的helloworld
    ####2.2HelloWorld>作用:将数据应用在html页面中1.body中,设置Vue管理的视图<divid="app"></div>2.引入vue.js3.实例化Vue对象newVue();4.设置......
  • MT7621 openWrt插件操作GPIO(mmap)
    OpenWrt应用中操作GPIO的方式多数都是:修改设备树通过shell脚本export出对应的GPIO通过shell脚本或操作文件的方式控制GPIO/通过LEDELED配置控制GPIO不用这种方式的......
  • js基础笔记学习210HelloWorld
    ......
  • openwrt开发使用-wifi命令配置开发
    前言今天分享的内容是openwrt里面wifi的开发常用操作。作者:良知犹存转载授权以及围观:欢迎关注微信公众号:羽林君或者添加作者个人微信:become_meOpenWrt简单命令配置......
  • HelloWorld之Java调用C++(JNI)
    JNI(JavaNativeInterface),通过使用Java本地接口书写程序,可以确保代码在不同的平台上方便移植。JNI技术博客:https://blog.csdn.net/m0_37537867/article/details/12413......
  • HelloWorld
    HelloWorld新建一个文件夹,存放代码新建一个java文件文件后缀名为.javaHello.java编写代码publicclassHello{publicstaticvoidmain(String[]arg......
  • 3-helloworld
    hello,world!publicclassHelloWorld{ publicstaticvoidmain(String[]args){ System.out.print("Hello,World!"); }}dos试运行......
  • Vue入门(HelloWorld篇)
    新建vue项目的流程-->(Hello_world环节)-->(软件VSCode)1-新建一个空文件,用VSCode打开2-打开Terminal-->(NewTerminal)3-初始化项目命令:npminit//然......