我使用make -j4 CC=distcc進行編譯.
distccmon-text可以檢測到distcc運行.但我在Makefile里直接設置CC = distcc,使用make -j4卻沒有效果,不會使用distcc編譯.
另外,-j4 這個功能可以通過修改Makefile做到嗎?
我想實現只用make進行編譯,就包含-j4和CC=distcc的功能.
還有
編譯過程中打印如下信息.
gcc -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-
statement -fno-common -fPIC -o dbus-cleanup-sockets dbus-cleanup-sockets.o
我知道編譯選項是怎麼來的
CFLAGS = -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-statement -fno-common -fPIC
但怎樣做到gcc前加distcc.使編譯命令形如:
distcc gcc -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-
statement -fno-common -fPIC -o dbus-cleanup-sockets dbus-cleanup-sockets.o
這樣應該就不用再make時加CC=distcc了.
怎樣才能通過修改Makefile,實現distcc編譯
-
- 帖子: 15
- 注册时间: 2008-08-19 9:25
- lhw828
- 帖子: 2797
- 注册时间: 2007-03-15 16:58
- 来自: 湖北武汉
- 联系:
Re: 怎樣才能通過修改Makefile,實現distcc編譯

.
Linux下安装QQ的各种办法——2017年3月7日更新——QQ8.8
Linux/Ubuntu学习笔记——用前人的经验,让你快速进入Linux的怀抱
科学上网的姿势,无痛穿越长城
Ubuntu交流QQ群:16308991(500人群)和10993386(500人群)疯狂招人!大家速来!
.