常用waf命令
常用waf命令
一、配置及編譯:
$ ./waf configure [option]
$ ./waf
幫助: $ ./waf --help
配置調試,優化調試:
$ ./waf -d <debug level> configure
<debug level>: debug,optimized
改變flag: $ CXXFLAGS="-O3" ./waf configure
或者: $CXX=g++-3.4 ./waf configure
編譯的結果放在目錄:build/<debuglevel>/srcpath
二、常見命令
1.開啓例子及幫助:
$ ./waf configure --enable-examples --enable-tests
2.運行doxygen生成文檔
$ ./waf --doxygen
3.運行代碼分析:
$ ./waf configure --enable-gcov
$ ./waf --lcov-report
4.運行程序
$ ./waf --run "program [args]"
5.使用幫助工具運行waf
$ ./waf --run programname --command-template "... %s ..."
如: $ ./waf --run run-tests --command-template "valgrind %s"
6.使用shell調試
$ ./waf --shell
例: $./waf --shell
$cd build/debug/examples
$gdb first
7.清除整個build目錄
$ ./waf distclean
8.創建一個發佈壓縮包,包含源代碼目錄中的所有文件
$ ./waf dist
9.強制禁止python bindings
$./waf --disable-python configure
10.讓build系統使用sudo設置suid bit
$./waf --enable-sudo configure
11.重置waf
$cd repos/ns-3-allinone
$ ./build.py
一、配置及編譯:
$ ./waf configure [option]
$ ./waf
幫助: $ ./waf --help
配置調試,優化調試:
$ ./waf -d <debug level> configure
<debug level>: debug,optimized
改變flag: $ CXXFLAGS="-O3" ./waf configure
或者: $CXX=g++-3.4 ./waf configure
編譯的結果放在目錄:build/<debuglevel>/srcpath
二、常見命令
1.開啓例子及幫助:
$ ./waf configure --enable-examples --enable-tests
2.運行doxygen生成文檔
$ ./waf --doxygen
3.運行代碼分析:
$ ./waf configure --enable-gcov
$ ./waf --lcov-report
4.運行程序
$ ./waf --run "program [args]"
5.使用幫助工具運行waf
$ ./waf --run programname --command-template "... %s ..."
如: $ ./waf --run run-tests --command-template "valgrind %s"
6.使用shell調試
$ ./waf --shell
例: $./waf --shell
$cd build/debug/examples
$gdb first
7.清除整個build目錄
$ ./waf distclean
8.創建一個發佈壓縮包,包含源代碼目錄中的所有文件
$ ./waf dist
9.強制禁止python bindings
$./waf --disable-python configure
10.讓build系統使用sudo設置suid bit
$./waf --enable-sudo configure
11.重置waf
$cd repos/ns-3-allinone
$ ./build.py
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.