llvm.org GIT mirror llvm / 9621a2b
Modified the SUFFIXES pseudo targets so that we remove all default suffixes and explicitly declare all the ones we're using for LLVM. This quickly cancels many of GNU Make's implicit rules and reduces build time. The only caveat is that any new suffixes may need to be explictly added to the .SUFFIXES pseudo target. Removed the -only-static option as it is no longer used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7979 91177308-0d34-0410-b5e6-96231b3b80d8 John Criswell 16 years ago
2 changed file(s) with 22 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
168168 echo "LLVM Source Root: " $(LLVM_SRC_ROOT)
169169 echo "LLVM Object Root: " $(LLVM_OBJ_ROOT)
170170
171 ###########################################################################
172 # Suffixes and implicit rules:
173 # Empty out the list of suffixes, generate a list that is only
174 # used by this Makefile, and cancel useless implicit rules. This
175 # will hopefully speed up compilation a little bit.
176 ###########################################################################
177 .SUFFIXES:
178 .SUFFIXES: .c .cpp .h .hpp .y .l
179 .SUFFIXES: .lo .o .a .so .bc
180 .SUFFIXES: .ps .dot .d
181
171182 #
172183 # Mark all of these targets as phony. This will hopefully speed up builds
173184 # slightly since GNU Make will not try to find implicit rules for targets
211222 PROFILE = -pg
212223 endif
213224
214 #
215 # Suffixes for library compilation rules
216 #
217 .SUFFIXES: .so
218
219225 ###########################################################################
220226 # Library Locations:
221227 # These variables describe various library locations:
379385
380386 # Create one .o file from a bunch of .o files...
381387 Relink := ${LIBTOOL} --mode=link $(CXX)
382 ifndef SHARED_LIBRARY
383 Relink += -only-static
384 endif
385388
386389 #
387390 # Configure where the item being compiled should go.
168168 echo "LLVM Source Root: " $(LLVM_SRC_ROOT)
169169 echo "LLVM Object Root: " $(LLVM_OBJ_ROOT)
170170
171 ###########################################################################
172 # Suffixes and implicit rules:
173 # Empty out the list of suffixes, generate a list that is only
174 # used by this Makefile, and cancel useless implicit rules. This
175 # will hopefully speed up compilation a little bit.
176 ###########################################################################
177 .SUFFIXES:
178 .SUFFIXES: .c .cpp .h .hpp .y .l
179 .SUFFIXES: .lo .o .a .so .bc
180 .SUFFIXES: .ps .dot .d
181
171182 #
172183 # Mark all of these targets as phony. This will hopefully speed up builds
173184 # slightly since GNU Make will not try to find implicit rules for targets
211222 PROFILE = -pg
212223 endif
213224
214 #
215 # Suffixes for library compilation rules
216 #
217 .SUFFIXES: .so
218
219225 ###########################################################################
220226 # Library Locations:
221227 # These variables describe various library locations:
379385
380386 # Create one .o file from a bunch of .o files...
381387 Relink := ${LIBTOOL} --mode=link $(CXX)
382 ifndef SHARED_LIBRARY
383 Relink += -only-static
384 endif
385388
386389 #
387390 # Configure where the item being compiled should go.