[distcc] One machine compile only

Piero B. Contezini distcc at piero.contezini.net
Mon Oct 13 16:32:41 GMT 2003


Thanks, After i made the changes it just become to use all the machines.

Piero

On Monday 13 October 2003 14:39, you wrote:
> Am Monday 13 October 2003 16:05 schrieb Piero B. Contezini:
> > Ahm, Make -j8 dont actually do this?
> > My Makefile is quite simple:
>
> [..]
>
> > server:
> > 	$(CC) -c -o procmcast.o procmcast.cpp $(INCLUDE)
> > 	$(CC) -c -o proctcppacket.o proctcppacket.cpp $(INCLUDE)
> > 	$(CC) -c -o data.o data.cpp $(INCLUDE)
> > 	$(CC) -c -o server.o main.cpp $(INCLUDE)
> > 	$(CC) -c -o pdata.o pdata.cpp $(INCLUDE)
> > 	$(CC) -o server server.o procmcast.o proctcppacket.o data.o pdata.o
> > $(EOBJECTS) $(ARCHIVES) $(LDFLAGS) -lstdc++
>
> This is a clumsy construct and makes it very hard (if not impossible, as
> your case suggests) to paralellize things. Better use something like this:
>
> %.o: %.cpp
> 	$(CXX) -c -o $@ $<
>
> server: procmcast.o proctcppacket.o data.o server.o pdata.o
> 	$(CXX) -o server $^ $(EOBJECTS) $(ARCHIVES) $(LDFLAGS)
>
> This is a lot less to type and should achieve the same - and make it
> possible for make to paralellize things, because now each .cpp -> .o step
> is a rule of it's own and thus can be outsourced.
>
> - Frerich
>
> P.S.: You don't need to link against libstdc++ by hand, g++ does that
> automatically.




More information about the distcc mailing list