openwrtmakefile的使用与管理

一、Makefile的基本知识

Makefile是一种可以执行程序自动化编译的工具,它通过对文件和源代码的依赖性关系来确定需要重新编译的文件,从而提高了编译和构建的效率。

Makefile文件包含一系列的规则,每条规则定义了一个目标文件、依赖文件和如何生成目标文件的指令。其中,目标文件是所需要生成的文件,依赖文件是目标文件生成所需要的文件或者是其他目标文件。

例如,下面是一个简单的Makefile文件的示例:

target: dependency1 dependency2
    command1
    command2

其中,“target”是目标文件,依赖文件是“dependency1”和“dependency2”,“command1”和“command2”是生成目标文件的指令。

二、openwrtmakefile的基本结构

openwrtmakefile是基于Makefile的一种扩展,它专门用于编译和构建OpenWrt软件包。

下面是一个openwrtmakefile的基本结构示例:

include $(TOPDIR)/rules.mk

PKG_NAME:=example
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

PKG_SOURCE_URL:=http://example.com
PKG_SOURCE:=example-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MD5SUM:=0123456789abcdef0123456789abcdef

include $(INCLUDE_DIR)/package.mk

define Package/example
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=Example package
  DEPENDS:=+libopenssl
endef

define Package/example/description
 This is an example package for OpenWrt.
endef

define Build/Prepare
    mkdir -p $(PKG_BUILD_DIR)
    $(CP) $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/$(PKG_SOURCE)
    cd $(PKG_BUILD_DIR) && tar xzf $(PKG_SOURCE)
endef

define Build/Compile
    $(MAKE) -C $(PKG_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
endef

define Package/example/install
    $(INSTALL_DIR) $(1)/usr/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/example $(1)/usr/bin/
endef

$(eval $(call BuildPackage,example))

其中,第1行引用了OpenWrt的rules.mk文件,第3-7行定义了软件包的名称、版本号、发布号等基本信息,第9-14行定义了软件包的基本信息和依赖关系。之后的define语句分别定义了软件包不同阶段的操作。

通过openwrtmakefile,我们可以轻松地定义软件包各个阶段的操作,如编译、安装、打包等。

三、openwrtmakefile中常用的内容

1. 定义软件包信息

在openwrtmakefile中,我们可以通过define语句来定义软件包的基本信息和依赖关系。

define Package/
  SECTION:=
CATEGORY:= TITLE:= DEPENDS:= endef </pre> <p>其中,“”是软件包的名称,“</p> <section>”是软件包所属的部分,“”是软件包所属的类别,例如“Utilities”或“Network”,“<title>”是软件包的名称,而“”是软件包的依赖关系,例如“+libopenssl”或“kmod-usb-serial”等。</p> <h4>2. 定义软件包的编译、安装、删除等阶段操作</h4> <p>在openwrtmakefile中,我们可以通过define语句来定义软件包在不同阶段的操作。</p> <pre> define Build/Prepare # 编译前的操作 endef define Build/Compile # 编译操作 endef define Package//install # 安装操作 endef define Package//uninstall # 删除操作 endef </pre> <h4>3. 定义软件包的源代码信息和下载地址</h4> <p>在openwrtmakefile中,我们可以通过下面的内容来定义软件包的源代码信息和下载地址。</p> <pre> PKG_SOURCE_URL:= PKG_SOURCE:= PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_MD5SUM:= </pre> <p>其中,“”是软件包的下载地址,“”是下载的文件名,“”是文件的MD5校验值。</p> <h4>4. 定义软件包的文件安装目录</h4> <p>在openwrtmakefile中,我们可以通过下面的内容来定义软件包的文件安装目录。</p> <pre> define Package//install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ $(1)/usr/bin/ endef </pre> <p>其中,“”是编译后所生成的文件,例如“example”。</p> <h3>四、openwrtmakefile的实际应用</h3> <p>下面我们以实际的openwrtmakefile为例,来介绍它的应用。</p> <h4>1. 配置文件的生成</h4> <pre> define Package//conffiles /etc/.conf endef define Package//preinst #!/bin/sh if [ -e /etc/.conf ]; then cp /etc/.conf /tmp/.conf fi endef define Package//postinst #!/bin/sh if [ ! -e /etc/.conf ]; then cp /tmp/.conf /etc/.conf fi endef define Package//prerm #!/bin/sh rm -f /tmp/.conf endef define Package//postrm endef </pre> <p>在上面的示例中,我们定义了软件包的配置文件和四个不同阶段的操作,包括“conffiles”、“preinst”、“postinst”、“prerm”和“postrm”。</p> <p>其中,“conffiles”是软件包的配置文件,“preinst”表示在安装之前的操作,“postinst”表示在安装之后的操作,“prerm”表示在卸载之前的操作,而“postrm”表示在卸载之后的操作。</p> <h4>2. 安装脚本的生成</h4> <pre> define Build/Prepare endef define Package//postinst #!/bin/sh if [ -z "$${IPKG_INSTROOT}" ]; then /etc/init.d/ enable /etc/init.d/ start fi endef define Package//prerm #!/bin/sh if [ -z "$${IPKG_INSTROOT}" ]; then /etc/init.d/ stop /etc/init.d/ disable fi define Package//install #安装脚本 $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/ $(1)/etc/init.d/ chmod +x $(1)/etc/init.d/ #常规文件 $(CP) ./files/* $(1)/ $(RM) $(1)/files/ endef </pre> <p>上面的示例中,我们可以看到“postinst”和“prerm”脚本,它们在安装和卸载软件包时分别运行。在“postinst”脚本中,我们启用并启动一个服务,而在“prerm”脚本中,我们停止并禁用该服务。另外,在“install”操作中,我们安装了脚本和常规文件。</p> <h4>3. 附加命令的生成</h4> <pre> define Package//install # 安装命令 $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ $(1)/usr/bin/ # 附加命令 $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) files/ $(1)/usr/sbin/ endef </pre> <p>在上面的示例中,我们安装了一个命令,它对应着编译中生成的文件,而另一个附加命令则是通过安装一些脚本来实现的。</p> <h3>五、总结</h3> <p>本文介绍了openwrtmakefile的基本知识、结构和常用内容,以及一些实际应用的示例。通过openwrtmakefile,我们可以灵活地管理和控制OpenWrt的软件包构建和编译过程。</p> <p>Makefile本身是一种强大而高效的工具,而openwrtmakefile则为OpenWrt提供了更为便捷的软件包编译和打包功能,使得开发和维护OpenWrt软件包变得更加简单和快捷。</p> <div class="entry-readmore"><div class="entry-readmore-btn"></div></div> <div class="entry-copyright"><p>原创文章,作者:小蓝,如若转载,请注明出处:https://www.506064.com/n/251716.html</p></div> </div> <div class="entry-tag"><a href="https://www.506064.com/n/tag/openwrtmakefile" rel="tag">openwrtmakefile</a></div> <div class="entry-action"> <div class="btn-zan" data-id="251716"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up-fill"></use></svg></i> 赞 <span class="entry-action-num">(0)</span></div> <div class="btn-dashang"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-cny-circle-fill"></use></svg></i> 打赏 <span class="dashang-img dashang-img2"> <span> <img src="//static.506064.com/wp-content/uploads/2024/12/2024121004124055.png" alt="微信扫一扫"/> 微信扫一扫 </span> <span> <img src="//static.506064.com/wp-content/uploads/2024/12/2024121004113670.png" alt="支付宝扫一扫"/> 支付宝扫一扫 </span> </span> </div> </div> <div class="entry-bar"> <div class="entry-bar-inner"> <div class="entry-bar-author"> <a data-user="22595" target="_blank" href="https://www.506064.com/n/author/f08e84c43f" class="avatar j-user-card"> <img alt='小蓝' src='https://g.izt6.com/avatar/?s=60&d=mm&r=g' srcset='https://g.izt6.com/avatar/?s=120&d=mm&r=g 2x' class='avatar avatar-60 photo avatar-default' height='60' width='60' decoding='async'/><span class="author-name">小蓝</span> </a> </div> <div class="entry-bar-info"> <div class="info-item meta"> <a class="meta-item" href="#comments"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i> <span class="data">0</span></a> </div> <div class="info-item share"> <a class="meta-item mobile j-mobile-share" href="javascript:;" data-id="251716" data-qrcode="https://www.506064.com/n/251716.html"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> 生成海报</a> <a class="meta-item wechat" data-share="wechat" target="_blank" rel="nofollow" href="#"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-wechat"></use></svg></i> </a> <a class="meta-item weibo" data-share="weibo" target="_blank" rel="nofollow" href="#"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-weibo"></use></svg></i> </a> <a class="meta-item qq" data-share="qq" target="_blank" rel="nofollow" href="#"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qq"></use></svg></i> </a> </div> <div class="info-item act"> <a href="javascript:;" id="j-reading"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-article"></use></svg></i></a> </div> </div> </div> </div> </div> <div class="entry-page"> <div class="entry-page-prev entry-page-nobg"> <a href="https://www.506064.com/n/251752.html" title="c语言去掉一行,C语言去掉换行符" rel="prev"> <span>c语言去掉一行,C语言去掉换行符</span> </a> <div class="entry-page-info"> <span class="pull-left"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-left-double"></use></svg></i> 上一篇</span> <span class="pull-right">2024-12-13 17:32</span> </div> </div> <div class="entry-page-next entry-page-nobg"> <a href="https://www.506064.com/n/251719.html" title="EMQ X SSL:如何在MQTT Broker中启用SSL/TLS端口" rel="next"> <span>EMQ X SSL:如何在MQTT Broker中启用SSL/TLS端口</span> </a> <div class="entry-page-info"> <span class="pull-right">下一篇 <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-double"></use></svg></i></span> <span class="pull-left">2024-12-13 17:32</span> </div> </div> </div> <div id="comments" class="entry-comments"> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title">发表回复 <small><a rel="nofollow" id="cancel-comment-reply-link" href="/n/251716.html#respond" style="display:none;"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-close"></use></svg></i></a></small></h3><div class="comment-form"><div class="comment-must-login">请登录后评论...</div><div class="form-submit"><div class="form-submit-text pull-left"><a href="https://www.506064.com/wp-login.php">登录</a>后才能评论</div> <button name="submit" type="submit" id="must-submit" class="wpcom-btn btn-primary btn-xs submit">提交</button></div></div> </div><!-- #respond --> </div><!-- .comments-area --> </article> </main> <aside class="sidebar"> <div class="widget widget_profile"> <div class="cover_photo"></div> <div class="avatar-wrap"> <a target="_blank" href="https://www.506064.com/n/author/f08e84c43f" class="avatar-link"><img alt='小蓝' src='https://g.izt6.com/avatar/?s=120&d=mm&r=g' srcset='https://g.izt6.com/avatar/?s=240&d=mm&r=g 2x' class='avatar avatar-120 photo avatar-default' height='120' width='120' decoding='async'/></a></div> <div class="profile-info"> <a target="_blank" href="https://www.506064.com/n/author/f08e84c43f" class="profile-name"><span class="author-name">小蓝</span></a> <p class="author-description">这个人很懒,什么都没有留下~</p> </div> <div class="profile-posts"> <h3 class="widget-title"><span>最近文章</span></h3> <ul> <li><a href="https://www.506064.com/n/313016.html" title="探究request.session()">探究request.session()</a></li> <li><a href="https://www.506064.com/n/313015.html" title="深入浅出JS解构赋值">深入浅出JS解构赋值</a></li> <li><a href="https://www.506064.com/n/313014.html" title="Python函数编写:提高代码模块性和重复利用性">Python函数编写:提高代码模块性和重复利用性</a></li> <li><a href="https://www.506064.com/n/313013.html" title="javajson聚合(java组合和聚合)">javajson聚合(java组合和聚合)</a></li> <li><a href="https://www.506064.com/n/313012.html" title="mysql数据库中间表如何设计,mysql数据库表的设计">mysql数据库中间表如何设计,mysql数据库表的设计</a></li> </ul> </div> </div><div class="widget widget_lastest_products"><h3 class="widget-title"><span>可能喜欢</span></h3> <ul class="p-list"> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/213.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="krenz平面设计构成色彩第12期" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/03/krenz12-480x300.png" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/213.html" title="krenz平面设计构成色彩第12期"> krenz平面设计构成色彩第12期 </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/162518.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="可灵AI悄然上线独立APP!" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/11/image-24-480x300.png" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/162518.html" title="可灵AI悄然上线独立APP!"> 可灵AI悄然上线独立APP! </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/160107.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="超过 3 万个公开可用的 IPTV 频道列表" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/11/image-21-480x300.png" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/160107.html" title="超过 3 万个公开可用的 IPTV 频道列表"> 超过 3 万个公开可用的 IPTV 频道列表 </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/151811.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="4核8G云服务器适合装宝塔MySQL 那个版本" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/11/mysql-480x300.jpg" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/151811.html" title="4核8G云服务器适合装宝塔MySQL 那个版本"> 4核8G云服务器适合装宝塔MySQL 那个版本 </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/143381.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="提升敲命令体验的 Raycast 插件:快命令" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/10/97d9ad6abf3fb4da-480x300.jpg" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/143381.html" title="提升敲命令体验的 Raycast 插件:快命令"> 提升敲命令体验的 Raycast 插件:快命令 </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/125944.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="AI Logo 制作工具 LogoAI.ai,快速生成高质量 Logo" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/09/1725603329861slvpz89t-480x300.png" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/125944.html" title="AI Logo 制作工具 LogoAI.ai,快速生成高质量 Logo"> AI Logo 制作工具 LogoAI.ai,快速生成高质量 Logo </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/117551.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="字节跳动旗下豆包AI编程助手MarsCode拉新活动:京东E卡" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/08/image-480x300.png" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/117551.html" title="字节跳动旗下豆包AI编程助手MarsCode拉新活动:京东E卡"> 字节跳动旗下豆包AI编程助手MarsCode拉新活动:京东E卡 </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/6832.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="腾讯云遨驰终端(OrcaTerm)轻量(2折)和CVM(5折)服务器续费券" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/04/qcloud-OrcaTerm-480x300.jpg" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/6832.html" title="腾讯云遨驰终端(OrcaTerm)轻量(2折)和CVM(5折)服务器续费券"> 腾讯云遨驰终端(OrcaTerm)轻量(2折)和CVM(5折)服务器续费券 </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/6993.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="「百度快速抓取2024年最新申请方法」使用说明与权益获取" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/04/070111713518646-480x300.png" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/6993.html" title="「百度快速抓取2024年最新申请方法」使用说明与权益获取"> 「百度快速抓取2024年最新申请方法」使用说明与权益获取 </a> </h4> </div> </li> <li class="col-xs-24 col-md-12 p-item"> <div class="p-item-wrap"> <a class="thumb" href="https://www.506064.com/n/217.html"> <img width="480" height="300" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="Epic免费领游戏:荒野的召唤:垂钓者+无敌少侠:原子伊芙" decoding="async" data-original="https://static.506064.com/wp-content/uploads/2024/03/Epic-480x300.png" /> </a> <h4 class="title"> <a href="https://www.506064.com/n/217.html" title="Epic免费领游戏:荒野的召唤:垂钓者+无敌少侠:原子伊芙"> Epic免费领游戏:荒野的召唤:垂钓者+无敌少侠:原子伊芙 </a> </h4> </div> </li> </ul> </div> </aside> </div> </div> <footer class="footer"> <div class="container"> <div class="footer-col-wrap footer-with-none"> <div class="footer-col footer-col-copy"> <ul class="footer-nav hidden-xs"><li id="menu-item-2539" class="menu-item menu-item-2539"><a href="/tools/base64/">Base64编码解码</a></li> <li id="menu-item-2550" class="menu-item menu-item-2550"><a href="/tools/jianying/">剪映字幕导出工具</a></li> <li id="menu-item-2551" class="menu-item menu-item-2551"><a href="/tools/jianying/srtdr.html">导入剪映字幕工具</a></li> </ul> <div class="copyright"> <p>Copyright © 2024 简单一点 版权所有 <a href="https://beian.miit.gov.cn" target="_blank" rel="nofollow noopener">滇ICP备2024022404号-1</a> Powered by 506064.Com</p> </div> </div> </div> </div> </footer> <div class="action action-style-0 action-color-0 action-pos-0" style="bottom:20%;"> <div class="action-item j-share"> <i class="wpcom-icon wi action-item-icon"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> </div> <div class="action-item gotop j-top"> <i class="wpcom-icon wi action-item-icon"><svg aria-hidden="true"><use xlink:href="#wi-arrow-up-2"></use></svg></i> </div> </div> <script type="speculationrules"> {"prefetch":[{"source":"document","where":{"and":[{"href_matches":"\/*"},{"not":{"href_matches":["\/wp-*.php","\/wp-admin\/*","\/wp-content\/uploads\/*","\/wp-content\/*","\/wp-content\/plugins\/*","\/wp-content\/themes\/justnews\/*","\/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]} </script> <script type="text/javascript" id="main-js-extra"> /* <![CDATA[ */ var _wpcom_js = {"webp":"?x-oss-process=image\/format,webp","ajaxurl":"https:\/\/www.506064.com\/wp-admin\/admin-ajax.php","theme_url":"https:\/\/www.506064.com\/wp-content\/themes\/justnews","slide_speed":"5000","is_admin":"0","lang":"zh_CN","js_lang":{"share_to":"\u5206\u4eab\u5230:","copy_done":"\u590d\u5236\u6210\u529f\uff01","copy_fail":"\u6d4f\u89c8\u5668\u6682\u4e0d\u652f\u6301\u62f7\u8d1d\u529f\u80fd","confirm":"\u786e\u5b9a","qrcode":"\u4e8c\u7ef4\u7801","page_loaded":"\u5df2\u7ecf\u5230\u5e95\u4e86","no_content":"\u6682\u65e0\u5185\u5bb9","load_failed":"\u52a0\u8f7d\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01","expand_more":"\u9605\u8bfb\u5269\u4f59 %s"},"share":"1","share_items":{"weibo":{"title":"\u5fae\u535a","icon":"weibo"},"wechat":{"title":"\u5fae\u4fe1","icon":"wechat"},"qzone":{"title":"QQ\u7a7a\u95f4","icon":"qzone"},"qq":{"title":"QQ\u597d\u53cb","icon":"qq"},"douban":{"name":"douban","title":"\u8c46\u74e3","icon":"douban"}},"lightbox":"1","post_id":"251716","poster":{"notice":"\u8bf7\u300c\u70b9\u51fb\u4e0b\u8f7d\u300d\u6216\u300c\u957f\u6309\u4fdd\u5b58\u56fe\u7247\u300d\u540e\u5206\u4eab\u7ed9\u66f4\u591a\u597d\u53cb","generating":"\u6b63\u5728\u751f\u6210\u6d77\u62a5\u56fe\u7247...","failed":"\u6d77\u62a5\u56fe\u7247\u751f\u6210\u5931\u8d25"},"video_height":"482","fixed_sidebar":"1","dark_style":"0","font_url":"\/\/static.506064.com\/wp-content\/uploads\/wpcom\/fonts.f5a8b036905c9579.css"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.506064.com/wp-content/themes/justnews/js/main.js?ver=6.19.6" id="main-js"></script> <script type="text/javascript" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/js/icons-2.8.9.js?ver=2.8.9" id="wpcom-icons-js"></script> <script type="text/javascript" src="https://www.506064.com/wp-content/themes/justnews/themer/assets/js/comment-reply.js?ver=6.19.6" id="comment-reply-js"></script> <script type="text/javascript" src="https://www.506064.com/wp-content/themes/justnews/js/wp-embed.js?ver=6.19.6" id="wp-embed-js"></script> <script> var _mtj = _mtj || []; (function () { var mtj = document.createElement("script"); mtj.src = "https://node60.aizhantj.com:21233/tjjs/?k=3o93o6cc7gr"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(mtj, s); })(); </script> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "@id": "https://www.506064.com/n/251716.html", "url": "https://www.506064.com/n/251716.html", "headline": "openwrtmakefile的使用与管理", "description": "一、Makefile的基本知识 Makefile是一种可以执行程序自动化编译的工具,它通过对文件和源代码的依赖性关系来确定需要重新编译的文件,从而提高了编译和构建的效率。 Make…", "datePublished": "2024-12-13T17:32:26+08:00", "dateModified": "2024-12-13T17:32:26+08:00", "author": {"@type":"Person","name":"小蓝","url":"https://www.506064.com/n/author/f08e84c43f"} } </script> </body> </html>