openwrt helloworld

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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

posted on   lydstory  阅读(27)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2022-02-15 V4L2
2022-02-15 用FPGA实现H.264/AVC硬件编解码器的构想
2022-02-15 SPIflash MiniGUI
2022-02-15 G.711aLaw
2022-02-15 TUTK p2p穿透的使用介绍
2022-02-15 上海盈方微
2021-02-15 关键字:Topsec

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示