package/Makefile
mt7688sdk/package/your_package/Makefile 寫法是有講究的
以 helloworld 為例,如果你把 helloworld/Makefile Line 4 與 Line 6 調換會如何?(為了節省版面,Line 編號可能與實際 Makefile 內的編號不一樣,但 Line 4,6的內容一樣,並且只有出現一次)
調換前:# This specifies the directory where we're going to build the program. # The root build directory, $(BUILD_DIR), is by default the build_mipsel # directory in your OpenWrt SDK directory PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk調換後:
# This specifies the directory where we're going to build the program. # The root build directory, $(BUILD_DIR), is by default the build_mipsel # directory in your OpenWrt SDK directory include $(INCLUDE_DIR)/package.mk PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)編譯:
mt7688sdk# make package/helloworld/compile編譯結果:
怎麼會這樣呢?
這是因為當 include 在 PKG_BUILD_DIR 之前時,必須把 -$(PKG_VERSION) 加在 PKG_BUILD_DIR... 的尾端:
# This specifies the directory where we're going to build the program. # The root build directory, $(BUILD_DIR), is by default the build_mipsel # directory in your OpenWrt SDK directory include $(INCLUDE_DIR)/package.mk PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)這次就沒問題了:
Q. 安裝完 Unbuntu 14.04 LTS 64bit Desktop 與 7688 SDK 後為何無法編譯 helloworld?
A.
# apt-get install gawk # apt-get install ccache
謝謝你的資料!!
回覆刪除這份資料幫助到我
不客氣!
刪除謝謝你的POST,獲益良多
回覆刪除