1、各类文件的书写

hello word 应用程序的编写

src中的文件:

hello word 应用程序的编写

hello word 应用程序的编写

hello文件夹中的Makefile文件

hello word 应用程序的编写

hello word 应用程序的编写

 

#
# Copyright (C) 2010-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=hello
PKG_VERSION:=1
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/hello
SECTION:=utils
CATEGORY:=Utilities
TITLE:=hello 
MAINTAINER:=tingpan
PKGARCH:=all
endef
define Package/hello/description
hello world!
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -Wall" \
LDFLAGS="$(TARGET_LDFLAGS)"
endef
define Package/hello/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hello $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,hello))

2、配置及编译

hello word 应用程序的编写

hello word 应用程序的编写

hello word 应用程序的编写

hello word 应用程序的编写

hello word 应用程序的编写

3、用scp上传

3.1、复制到win7桌面

hello word 应用程序的编写

hello word 应用程序的编写

hello word 应用程序的编写

4、CRT登陆

4.1 登陆

hello word 应用程序的编写

4.2 命令行运行

查看

ls

安装ipk

opkg install **.ipk

运行

hello

卸载

opkg remove **

hello word 应用程序的编写

相关文章:

  • 2021-07-15
  • 2022-01-07
  • 2021-06-29
  • 2022-12-23
  • 2021-04-10
  • 2021-08-01
  • 2021-12-29
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-07
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-12-26
相关资源
相似解决方案