[Assorted-commits] SF.net SVN: assorted:[1338] ydb/trunk/src/Makefile
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-04-07 03:06:25
|
Revision: 1338 http://assorted.svn.sourceforge.net/assorted/?rev=1338&view=rev Author: yangzhang Date: 2009-04-07 03:06:11 +0000 (Tue, 07 Apr 2009) Log Message: ----------- added DISTCC control; some rearrangement Modified Paths: -------------- ydb/trunk/src/Makefile Modified: ydb/trunk/src/Makefile =================================================================== --- ydb/trunk/src/Makefile 2009-04-07 03:03:54 UTC (rev 1337) +++ ydb/trunk/src/Makefile 2009-04-07 03:06:11 UTC (rev 1338) @@ -4,7 +4,10 @@ SHELL := bash CCACHE := ccache -export CCACHE_PREFIX := distcc +DISTCC := distcc +ifneq ($(DISTCC),) +export CCACHE_PREFIX := $(DISTCC) +endif ifneq ($(WTF),) WTF := wtf endif @@ -76,13 +79,6 @@ CXXFLAGS0 = $(OPT) -MD -pthread $(GPROF) $(WARNINGS) -std=gnu++0x \ $(ORIGCXXFLAGS) -ifneq ($(PCH),) - CXXFLAGS = $(CXXFLAGS0) -include pch.h -$(LZZOBJS): pch.h.gch -else - CXXFLAGS = $(CXXFLAGS0) -endif - LDFLAGS := -pthread $(GPROF) $(LDFLAGS) LDLIBS := -lstx -lst -lresolv -lprotobuf -lgtest \ @@ -112,7 +108,6 @@ COGS := $(wildcard tpcc/*.cog) COGOUTS := $(foreach cog,$(COGS),$(patsubst %.cog,%,$(cog))) -GENOBJS := $(LZZOBJS) $(PBOBJS) $(COGOBJS) GENOUTS := $(CLAMPOUTS) $(PBOUTS) $(COGOUTS) TPCCOBJS := clock randomgenerator tpccclient tpccdb tpccgenerator tpcctables @@ -140,7 +135,7 @@ protoc --cpp_out=. $< %.clamp: %.clamp.lzz - ln -sf $< $@ + cp $< $@ chmod -w $@ %.cc.clamp %.hh.clamp: %.clamp @@ -171,6 +166,15 @@ %.h.gch: %.h $(LINK.cc) $(OUTPUT_OPTION) $< +# Be careful with PCH and distcc! It actually makes compilation *slower* for +# me when used with distcc (anecdotal: 12s vs 15s). +ifneq ($(PCH),) +CXXFLAGS = $(CXXFLAGS0) -include pch.h +$(OBJS): pch.h.gch pch.h +else +CXXFLAGS = $(CXXFLAGS0) +endif + # # Project-specific rules # @@ -193,7 +197,7 @@ -Wno-unused-parameter clean: - rm -rf $(GENOUTS) $(OBJS) $(TARGET) $(TARGETS) $(CLAMPS) $(LZZOUTS) pch.h pch.h.gch .clamp/ *.d tpcc/*.d deps.mk + rm -rf $(GENOUTS) $(OBJS) $(TARGET) $(TARGETS) $(CLAMPS) $(LZZOUTS) .clamp/ *.d tpcc/*.d deps.mk # pch.h pch.h.gch .SECONDARY: $(GENOUTS) $(OBJS) $(CLAMPS) $(LZZOUTS) pch.h pch.h.gch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |