openwrt中的makefile,cp和$(cp)之间的区别是什么?
我遵循一个教程,在openwrt中编译我自己的包 在/package/helloworld目录中:openwrt中的makefile,cp和$(cp)之间的区别是什么?,makefile,embedded,openwrt,Makefile,Embedded,Openwrt,我遵循一个教程,在openwrt中编译我自己的包 在/package/helloworld目录中: .../packege/helloworld$ ls src Makefile .../packege/helloworld$ ls src hello.c main.c Makefile .../packege/helloworld$vi Makefile #helloworld makefile include $(TOPDIR)/rules.mk PKG_NAME:=helloworld
.../packege/helloworld$ ls
src Makefile
.../packege/helloworld$ ls src
hello.c main.c Makefile
.../packege/helloworld$vi Makefile
#helloworld makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=helloworld
PKG_RELEASE:=1
PKG_VERSION:=0.1
PKG_BUILD_DEPENDS:=
include $(INCLUDE_DIR)/package.mk
define Package/helloworld
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@TARGET_etrax
TITLE:=Yet Another Helloworld Application
endef
define Package/helloworld/description
This is helloworld :p
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)"
endef
define Package/helloworld/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/usr/bin/
endef
$(eval $(call BuildPackage,helloworld))
关于这个Makefile,我有两个问题: