我想修改一個makefile來交叉編譯二進制文件。有問題的命令如下:瞭解makefile中的make-command?
# GNU Make solution makefile autogenerated by Premake
# Type "make help" for usage help
ifndef config
config=debug
endif
export config
PROJECTS := json openjaus openjaus-core openjaus-environment openjaus-mobility openjaus-manipulator openjaus-ugv Base Managed PingTest LargeMessageTest PdDemo GposDemo GposClientDemo StillImageSensorDemo StillImageClientDemo
.PHONY: all clean help $(PROJECTS)
all: $(PROJECTS)
json:
@echo "==== Building json ($(config)) ===="
@${MAKE} --no-print-directory -C .build -f json.make
可以看出,makefile有幾個目標。它們都與'json'目標具有相同的結構。在有關問題的命令是
@${MAKE} --no-print-directory -C .build -f json.make
的「$ {MAKE}」變量=做(我已經驗證了這一點回聲) 什麼是-C嗎? .build是做什麼的? 我很好-f json.make
此外,當我運行使得json.make文件獲取創建編譯文件並刪除它自我,所以我沒有訪問該文件。
,當我有問題修改命令我收到的錯誤是
==== Building json (debug) ====
make[1]: Nothing to be done for `/home/botbear/openwrt/trunk/staging_dir/toolchain- arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/bin/arm-openwrt-linux-c++'.
修改後的命令如下:
@${MAKE} /home/botbear/openwrt/trunk/staging_dir/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/bin/arm-openwrt-linux-c++ --no-print-directory -C .build -f json.make
任何幫助表示讚賞!
可能的重複[如何在makefile中指定編譯器?](http://stackoverflow.com/questions/10541293/how-to-specify-compiler-in-makefile) – Beta