我正在尝试为Openwrt交叉编译.c文件。我下载了Openwrt并将我的文件添加到包目录中并为其创建了Makefile,但在编译时它正在跳过。我不知道出了什么问题
这是Makefile:
*
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=gav
PKG_VERSION:=1
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/gav
SECTION:=utils
CATEGORY:=Base system
TITLE:=gaurav
endef
define Package/gav/description
This package contains an utility useful to upgrade from other firmware or
older OpenWrt releases.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR/)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Package/gav/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/gav $(1)/sbin/
endef
$(eval $(call Buildpackage,gav))
*
答案 0 :(得分:2)
如果工具链完全跳过Makefile,很可能你没有运行 make menuconfig 。
所以一般来说步骤是: