llvm.org GIT mirror llvm / 95cc1b3
Simplifications to Makefile.common, remove support for Purify since it was broken by libtoolification anyways, and noone can use it because purify doesn't support the 64-bit sparc compilers even if it weren't broken! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7850 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
2 changed file(s) with 30 addition(s) and 52 deletion(s). Raw diff Collapse all Expand all
137137 ifdef SHARED_LIBRARY
138138 # if SHARED_LIBRARY is specified, the default is to build the dynamic lib
139139 all:: dynamic
140 endif
141
142 ifdef BYTECODE_LIBRARY
143 # if BYTECODE_LIBRARY is specified, the default is to build the bytecode lib
144 all:: bytecodelib
140145 endif
141146
142147 # Default Rule: Make sure it's also a :: rule
166171 # slightly since GNU Make will not try to find implicit rules for targets
167172 # which are marked as Phony.
168173 #
169 .PHONY: all dynamic clean distclean install test bytecode prdirs
174 .PHONY: all dynamic bytecodelib clean distclean install test bytecode prdirs
170175
171176 ###########################################################################
172177 # Miscellaneous paths and commands:
183188 #DocInstDir=/usr/doc/xxx
184189
185190 BURG_OPTS = -I
186
187 PURIFY := $(PURIFY) -cache-dir="$(BUILD_OBJ_ROOT)/../purifycache" -chain-length="30" -messages=all
188191
189192 ifdef ENABLE_PROFILING
190193 ENABLE_OPTIMIZED = 1
264267 #
265268 # Libtool is found in the current directory.
266269 #
267 ifdef VERBOSE
268 LIBTOOL=$(LLVM_SRC_ROOT)/mklib
269 else
270 LIBTOOL=$(LLVM_SRC_ROOT)/mklib --silent
271 endif
270 LIBTOOL := $(LLVM_SRC_ROOT)/mklib
272271
273272 #
274273 # If we're not building a shared library, use the disable-shared tag with
282281 # versions of libtool.
283282 #
284283 ifndef SHARED_LIBRARY
285 LIBTOOL := $(LIBTOOL) --tag=disable-shared
284 LIBTOOL += --tag=disable-shared
286285 endif
287286
288287 #
290289 #
291290 ifndef VERBOSE
292291 VERB := @
292 LIBTOOL += --silent
293293 endif
294294
295295 ###########################################################################
327327 # Allow gnu extensions...
328328 CPPFLAGS += -D_GNU_SOURCE
329329
330 # -Wno-unused-parameter
331330 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
332331 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
333332
355354 # Link final executable
356355 # (Note that we always link with the C++ compiler).
357356 #
358 ifdef ENABLE_PURIFY # To enable purify, build with 'gmake ENABLE_PURIFY=1'
359 Link := $(PURIFY) $(LIBTOOL) --mode=link $(CXX) -static
360 else
361357 Link := $(LIBTOOL) --mode=link $(CXX)
362 endif
363358
364359 # link both projlib and llvmlib libraries
365360 LinkG := $(Link) -g -L$(PROJLIBDEBUGSOURCE) -L$(LLVMLIBDEBUGSOURCE) $(STRIP)
367362 LinkP := $(Link) -O3 -L$(PROJLIBPROFILESOURCE) -L$(LLVMLIBPROFILESOURCE) $(PROFILE)
368363
369364 # Create one .o file from a bunch of .o files...
370 #ifdef SHARED_LIBRARY
371 Relink = ${LIBTOOL} --mode=link $(CXX)
372 #else
373 Relink = ${LIBTOOL} --mode=link $(CXX) -only-static
374 #endif
375
376 # MakeSO - Create a .so file from a .o files...
377 #MakeSO := $(LIBTOOL) --mode=link $(CXX) $(MakeSharedObjectOption)
378 #MakeSOO := $(MakeSO) -O3
379 #MakeSOP := $(MakeSOO) $(PROFILE)
365 Relink := ${LIBTOOL} --mode=link $(CXX)
366 ifndef SHARED_LIBRARY
367 Relink += -only-static
368 endif
380369
381370 #
382371 # Configure where the item being compiled should go.
383372 #
384373 ifdef SHARED_LIBRARY
385 Link := $(Link) -rpath $(DESTLIBCURRENT)
374 Link += -rpath $(DESTLIBCURRENT)
386375 endif
387376
388377 ifdef TOOLNAME
389 Link := $(Link) -rpath $(DESTTOOLCURRENT)
378 Link += -rpath $(DESTTOOLCURRENT)
390379 endif
391380
392381 # Create dependancy file from CPP file, send to stdout.
137137 ifdef SHARED_LIBRARY
138138 # if SHARED_LIBRARY is specified, the default is to build the dynamic lib
139139 all:: dynamic
140 endif
141
142 ifdef BYTECODE_LIBRARY
143 # if BYTECODE_LIBRARY is specified, the default is to build the bytecode lib
144 all:: bytecodelib
140145 endif
141146
142147 # Default Rule: Make sure it's also a :: rule
166171 # slightly since GNU Make will not try to find implicit rules for targets
167172 # which are marked as Phony.
168173 #
169 .PHONY: all dynamic clean distclean install test bytecode prdirs
174 .PHONY: all dynamic bytecodelib clean distclean install test bytecode prdirs
170175
171176 ###########################################################################
172177 # Miscellaneous paths and commands:
183188 #DocInstDir=/usr/doc/xxx
184189
185190 BURG_OPTS = -I
186
187 PURIFY := $(PURIFY) -cache-dir="$(BUILD_OBJ_ROOT)/../purifycache" -chain-length="30" -messages=all
188191
189192 ifdef ENABLE_PROFILING
190193 ENABLE_OPTIMIZED = 1
264267 #
265268 # Libtool is found in the current directory.
266269 #
267 ifdef VERBOSE
268 LIBTOOL=$(LLVM_SRC_ROOT)/mklib
269 else
270 LIBTOOL=$(LLVM_SRC_ROOT)/mklib --silent
271 endif
270 LIBTOOL := $(LLVM_SRC_ROOT)/mklib
272271
273272 #
274273 # If we're not building a shared library, use the disable-shared tag with
282281 # versions of libtool.
283282 #
284283 ifndef SHARED_LIBRARY
285 LIBTOOL := $(LIBTOOL) --tag=disable-shared
284 LIBTOOL += --tag=disable-shared
286285 endif
287286
288287 #
290289 #
291290 ifndef VERBOSE
292291 VERB := @
292 LIBTOOL += --silent
293293 endif
294294
295295 ###########################################################################
327327 # Allow gnu extensions...
328328 CPPFLAGS += -D_GNU_SOURCE
329329
330 # -Wno-unused-parameter
331330 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
332331 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
333332
355354 # Link final executable
356355 # (Note that we always link with the C++ compiler).
357356 #
358 ifdef ENABLE_PURIFY # To enable purify, build with 'gmake ENABLE_PURIFY=1'
359 Link := $(PURIFY) $(LIBTOOL) --mode=link $(CXX) -static
360 else
361357 Link := $(LIBTOOL) --mode=link $(CXX)
362 endif
363358
364359 # link both projlib and llvmlib libraries
365360 LinkG := $(Link) -g -L$(PROJLIBDEBUGSOURCE) -L$(LLVMLIBDEBUGSOURCE) $(STRIP)
367362 LinkP := $(Link) -O3 -L$(PROJLIBPROFILESOURCE) -L$(LLVMLIBPROFILESOURCE) $(PROFILE)
368363
369364 # Create one .o file from a bunch of .o files...
370 #ifdef SHARED_LIBRARY
371 Relink = ${LIBTOOL} --mode=link $(CXX)
372 #else
373 Relink = ${LIBTOOL} --mode=link $(CXX) -only-static
374 #endif
375
376 # MakeSO - Create a .so file from a .o files...
377 #MakeSO := $(LIBTOOL) --mode=link $(CXX) $(MakeSharedObjectOption)
378 #MakeSOO := $(MakeSO) -O3
379 #MakeSOP := $(MakeSOO) $(PROFILE)
365 Relink := ${LIBTOOL} --mode=link $(CXX)
366 ifndef SHARED_LIBRARY
367 Relink += -only-static
368 endif
380369
381370 #
382371 # Configure where the item being compiled should go.
383372 #
384373 ifdef SHARED_LIBRARY
385 Link := $(Link) -rpath $(DESTLIBCURRENT)
374 Link += -rpath $(DESTLIBCURRENT)
386375 endif
387376
388377 ifdef TOOLNAME
389 Link := $(Link) -rpath $(DESTTOOLCURRENT)
378 Link += -rpath $(DESTTOOLCURRENT)
390379 endif
391380
392381 # Create dependancy file from CPP file, send to stdout.