1 #===-- Makefile.rules - Common make rules for LLVM ---------*- Makefile -*--===#
3 # The LLVM Compiler Infrastructure
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
8 #===------------------------------------------------------------------------===#
10 # This file is included by all of the LLVM makefiles. For details on how to use
11 # it properly, please see the document MakefileGuide.html in the docs directory.
13 #===-----------------------------------------------------------------------====
16 # Set the VPATH so that we can find source files.
18 VPATH=$(BUILD_SRC_DIR)
20 ###############################################################################
21 # TARGETS: Define standard targets that can be invoked
22 ###############################################################################
24 #--------------------------------------------------------------------
25 # Define the various target sets
26 #--------------------------------------------------------------------
27 RECURSIVE_TARGETS := all clean check install uninstall
28 LOCAL_TARGETS := all-local clean-local check-local install-local \
29 printvars uninstall-local
30 TOPLEV_TARGETS := dist dist-check dist-clean tags
31 USER_TARGETS := $(RECURSIVE_TARGETS) $(LOCAL_TARGETS) $(TOPLEV_TARGETS)
32 INTERNAL_TARGETS := preconditions \
33 install-config-dir install-shared-library install-bytecode-library \
34 install-archive-library install-relinked-library install-tool \
35 uninstall-config-dir uninstall-shared-library uninstall-bytecode-library \
36 uninstall-archive-library uninstall-relinked-library uninstall-tool
38 ###############################################################################
39 # INITIALIZATION: Basic things the makefile needs
40 ###############################################################################
42 #--------------------------------------------------------------------
43 # Reset the list of suffixes we know how to build
44 #--------------------------------------------------------------------
46 .SUFFIXES: .c .cpp .h .hpp .y .l .lo .o .a $(SHLIBEXT) .bc .td .ps .dot $(SUFFIXES)
48 #--------------------------------------------------------------------
49 # Mark all of these targets as phony to avoid implicit rule search
50 #--------------------------------------------------------------------
51 .PHONY: $(USER_TARGETS) $(INTERNAL_TARGETS)
53 #--------------------------------------------------------------------
54 # Make sure all the user-target rules are double colon rules and
55 # they are defined first.
56 #--------------------------------------------------------------------
60 ################################################################################
61 # PRECONDITIONS: that which must be built/checked first
62 ################################################################################
64 SRCMKFILES := $(BUILD_SRC_DIR)/Makefile $(filter-out Makefile.rules %.in,\
65 $(wildcard $(BUILD_SRC_DIR)/Makefile.*))
66 OBJMKFILES := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SRCMKFILES))
67 CONFIGURE := $(LLVM_SRC_ROOT)/configure
68 CONFIG_STATUS := $(LLVM_OBJ_ROOT)/config.status
69 MAKE_CONFIG_IN:= $(LLVM_SRC_ROOT)/Makefile.config.in
70 MAKE_CONFIG := $(LLVM_OBJ_ROOT)/Makefile.config
71 PRECONDITIONS := $(CONFIG_STATUS) $(MAKE_CONFIG) $(OBJMKFILES)
73 preconditions : $(PRECONDITIONS)
75 #------------------------------------------------------------------------
76 # Make sure the BUILT_SOURCES are built first
77 #------------------------------------------------------------------------
78 $(filter-out clean clean-local,USER_TARGETS):: $(BUILT_SOURCES)
81 ifneq ($(strip $(BUILT_SOURCES)),)
82 $(VERB) $(RM) -f $(BUILT_SOURCES)
85 $(BUILT_SOURCES) : $(BUILD_OBJ_ROOT)/Makefile
87 #------------------------------------------------------------------------
88 # Make sure we're not using a stale configuration
89 #------------------------------------------------------------------------
90 .PRECIOUS: $(CONFIG_STATUS)
91 $(CONFIG_STATUS): $(CONFIGURE)
92 @$(ECHO) Reconfiguring with $<
93 $(VERB) $(CONFIG_STATUS) --recheck $(CONFIGUREFLAGS)
94 $(VERB) $(CONFIG_STATUS)
96 #------------------------------------------------------------------------
97 # Make sure the configuration makefile is up to date
98 #------------------------------------------------------------------------
99 $(MAKE_CONFIG): $(MAKE_CONFIG_IN) $(CONFIG_STATUS)
100 @$(ECHO) Regenerating $@
101 $(VERB) cd $(LLVM_OBJ_ROOT) ; $(CONFIG_STATUS) Makefile.config
103 #------------------------------------------------------------------------
104 # If the Makefile in the source tree has been updated, copy it over into the
105 # build tree. But, only do this if the source and object makefiles differ
106 #------------------------------------------------------------------------
107 ifneq ($(BUILD_OBJ_DIR),$(BUILD_SRC_DIR))
109 $(BUILD_OBJ_DIR)/Makefile : $(BUILD_SRC_DIR)/Makefile
110 @$(ECHO) "Updating Makefile"
111 $(VERB) $(MKDIR) $(@D)
114 # Copy the Makefile.* files unless we're in the root directory which avoids
115 # the copying of Makefile.config.in or other things that should be explicitly
117 $(BUILD_OBJ_DIR)/Makefile% : $(BUILD_SRC_DIR)/Makefile%
119 *Makefile.rules) ;; \
121 *) $(ECHO) "Updating $(@F)" ; \
128 #------------------------------------------------------------------------
129 # Set up the basic dependencies
130 #------------------------------------------------------------------------
131 $(USER_TARGETS):: $(PRECONDITIONS)
136 install:: install-local
137 uninstall:: uninstall-local
138 check-local:: all-local
139 install-local:: all-local
141 ###############################################################################
142 # VARIABLES: Set up various variables based on configuration data
143 ###############################################################################
145 #--------------------------------------------------------------------
146 # Variables derived from configuration we are building
147 #--------------------------------------------------------------------
149 ifdef ENABLE_PROFILING
150 CONFIGURATION := Profile
151 CXXFLAGS += -O3 -DNDEBUG -felide-constructors -finline-functions -pg
152 CFLAGS += -O3 -DNDEBUG -pg
153 LDFLAGS += -O3 -DNDEBUG -pg
155 ifdef ENABLE_OPTIMIZED
156 CONFIGURATION := Release
157 CXXFLAGS += -O3 -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer
158 CFLAGS += -O3 -DNDEBUG -fomit-frame-pointer
159 LDFLAGS += -O3 -DNDEBUG
161 CONFIGURATION := Debug
162 CXXFLAGS += -g -D_DEBUG
163 CFLAGS += -g -D_DEBUG
164 LDFLAGS += -g -D_DEBUG
171 #--------------------------------------------------------------------
172 # Directory locations
173 #--------------------------------------------------------------------
174 OBJDIR := $(BUILD_OBJ_DIR)/$(CONFIGURATION)
175 LIBDIR := $(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION)
176 TOOLDIR := $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)
177 LLVMLIBDIR := $(LLVM_OBJ_ROOT)/lib/$(CONFIGURATION)
178 LLVMTOOLDIR := $(LLVM_OBJ_ROOT)/tools/$(CONFIGURATION)
180 #--------------------------------------------------------------------
181 # Full Paths To Compiled Tools and Utilities
182 #--------------------------------------------------------------------
183 LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
184 LLVMAS := $(LLVMTOOLDIR)/llvm-as$(EXEEXT)
185 BURG := $(LLVMTOOLDIR)/burg$(EXEEXT)
186 TBLGEN := $(LLVMTOOLDIR)/tblgen$(EXEEXT)
187 GCCLD := $(LLVMTOOLDIR)/gccld$(EXEEXT)
188 LLVMGCC := PATH=$(LLVMTOOLDIR):$(PATH) $(LLVMGCCDIR)/bin/gcc
189 LLVMGXX := PATH=$(LLVMTOOLDIR):$(PATH) $(LLVMGCCDIR)/bin/g++
191 # Need a better way to compute this.
192 LLVMGCCLIBDIR := $(dir $(shell $(LLVMGCC) -print-file-name=libgcc.a))/
194 #--------------------------------------------------------------------
195 # Adjust to user's request
196 #--------------------------------------------------------------------
198 # Adjust LIBTOOL options for shared libraries, or not.
199 ifndef SHARED_LIBRARY
200 LIBTOOL += --tag=disable-shared
202 LDFLAGS += -rpath $(LIBDIR)
205 # Adjust settings for verbose mode
209 AR += >/dev/null 2>/dev/null
210 CONFIGUREFLAGS += >$(BUILD_OBJ_DIR)/configure.out 2>&1
215 # By default, strip symbol information from executable
217 STRIP = $(PLATFORMSTRIPOPTS)
218 STRIP_WARN_MSG = "(without symbols)"
221 # Adjust linker flags for building an executable
223 LDFLAGS += -rpath $(TOOLDIR) -export-dynamic $(TOOLLINKOPTS)
226 # Use TOOLLINKOPTSB to pass options to the linker like library search
228 # Note that this is different from TOOLLINKOPTS, these options
229 # are passed to the linker *before* the USEDLIBS options are passed.
230 # e.g. usage TOOLLINKOPTSB = -L/home/xxx/lib
232 LDFLAGS += $(TOOLLINKOPTSB)
235 #----------------------------------------------------------
236 # Options To Invoke Tools
237 #----------------------------------------------------------
239 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused
241 LDFLAGS += -L$(LIBDIR) -L$(LLVMLIBDIR)
242 CPPFLAGS += -I$(BUILD_OBJ_DIR) \
244 -I$(BUILD_SRC_ROOT)/include \
245 -I$(BUILD_OBJ_ROOT)/include \
246 -I$(LLVM_OBJ_ROOT)/include \
247 -I$(LLVM_SRC_ROOT)/include \
248 -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
250 Compile.C = $(CC) $(CPPFLAGS) $(CompileCommonOpts) -c $(CFLAGS)
251 Compile.CXX = $(CXX) $(CPPFLAGS) $(CompileCommonOpts) $(CXXFLAGS) -c
252 LTCompile.C = $(LIBTOOL) --mode=compile $(Compile.C)
253 LTCompile.CXX = $(LIBTOOL) --tag=CXX --mode=compile $(Compile.CXX)
254 BCCompile.CXX = $(LLVMGXX) $(CPPFLAGS) $(CompileCommonOpts) $(CXXFLAGS) -c
255 BCCompile.C = $(LLVMGCC) $(CPPFLAGS) $(CompileCommonOpts) $(CFLAGS) -c
256 Link = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(CPPFLAGS) \
257 $(CompileCommonOpts) $(LDFLAGS) $(STRIP)
258 Relink = $(LIBTOOL) --tag=CXX --mode=link $(CXX)
259 BCLinkLib = $(LLVMGCC) -shared -nostdlib
260 Burg = $(BURG) -I $(BUILD_SRC_DIR)
261 TableGen = $(TBLGEN) -I $(BUILD_SRC_DIR)
262 Archive = $(AR) $(ARFLAGS)
269 #----------------------------------------------------------
270 # Get the list of source files
271 #----------------------------------------------------------
273 SOURCES := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.cpp \
274 $(BUILD_SRC_DIR)/*.cc $(BUILD_SRC_DIR)/*.c $(BUILD_SRC_DIR)/*.y \
275 $(BUILD_SRC_DIR)/*.l))
279 SOURCES += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES))
282 #----------------------------------------------------------
283 # Types of objects that can be built from sources
284 #----------------------------------------------------------
285 BASENAME_SOURCES := $(sort $(basename $(SOURCES)))
286 ObjectsO := $(BASENAME_SOURCES:%=$(OBJDIR)/%.o)
287 ObjectsLO := $(BASENAME_SOURCES:%=$(OBJDIR)/%.lo)
288 ObjectsBC := $(BASENAME_SOURCES:%=$(OBJDIR)/%.bc)
291 ###############################################################################
292 # DIRECTORIES: Handle recursive descent of directory structure
293 ###############################################################################
295 #---------------------------------------------------------
296 # Handle the DIRS options for sequential construction
297 #---------------------------------------------------------
302 $(RECURSIVE_TARGETS)::
303 $(VERB) for dir in $(DIRS); do \
304 if [ ! -f $$dir/Makefile ]; then \
306 cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
308 ($(MAKE) -C $$dir $@ ) || exit 1; \
312 #---------------------------------------------------------
313 # Handle the EXPERIMENTAL_DIRS options ensuring success
314 # after each directory is built.
315 #---------------------------------------------------------
316 ifdef EXPERIMENTAL_DIRS
317 $(RECURSIVE_TARGETS)::
318 $(VERB) for dir in $(EXPERIMENTAL_DIRS); do \
319 if [ ! -f $$dir/Makefile ]; then \
321 cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
323 ($(MAKE) -C $$dir $@ ) || exit 0; \
327 #---------------------------------------------------------
328 # Handle the PARALLEL_DIRS options for parallel construction
329 #---------------------------------------------------------
332 SUBDIRS += $(PARALLEL_DIRS)
333 # Unfortunately, this list must be maintained if new
334 # recursive targets are added.
335 all :: $(addsuffix /.makeall , $(PARALLEL_DIRS))
336 clean :: $(addsuffix /.makeclean , $(PARALLEL_DIRS))
337 check :: $(addsuffix /.makecheck , $(PARALLEL_DIRS))
338 install :: $(addsuffix /.makeinstall , $(PARALLEL_DIRS))
339 uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
341 Parallel_Targets := $(foreach T,$(RECURSIVE_TARGETS),%/.make$(T))
343 $(Parallel_Targets) :
344 $(VERB) if [ ! -f $(@D)/Makefile ]; then \
346 cp $(BUILD_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
348 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@)
351 #---------------------------------------------------------
352 # Handle the OPTIONAL_DIRS options for directores that may
354 #---------------------------------------------------------
357 SUBDIRS += $(OPTIONAL_DIRS)
359 $(RECURSIVE_TARGETS)::
360 $(VERB) for dir in $(OPTIONAL_DIRS); do \
361 if [ -d $(BUILD_SRC_DIR)/$$dir ]; then\
362 if [ ! -f $$dir/Makefile ]; then \
364 cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
366 ($(MAKE) -C$$dir $@ ) || exit 1; \
371 #---------------------------------------------------------
372 # Handle the CONFIG_FILES options
373 #---------------------------------------------------------
376 install-local:: install-config-dir
378 install-config-dir: $(sysconfdir) $(CONFIG_FILES)
379 $(VERB)$(ECHO) Installing Configuration Files To $(sysconfdir)
380 $(VERB)for file in $(CONFIG_FILES); do \
381 $(INSTALL) $(BUILD_SRC_DIR)/$${file} $(sysconfdir) ; \
384 uninstall-local:: uninstall-config-dir
386 uninstall-config-dir:
387 $(VERB)$(ECHO) Uninstalling Configuration Files From $(sysconfdir)
388 $(VERB)for file in $(CONFIG_FILES); do \
389 $(RM) -f $(sysconfdir)/$${file} ; \
393 $(VERB) $(MKDIR) $(sysconfdir)
397 ###############################################################################
398 # Library Build Rules: Four ways to build a library
399 ###############################################################################
402 $(VERB) $(MKDIR) $(libdir)
405 $(VERB) $(MKDIR) $(bytecode_libdir)
409 # if we're building a library ...
412 # Make sure there isn't any extranous whitespace on the LIBRARYNAME option
413 LIBRARYNAME := $(strip $(LIBRARYNAME))
414 LIBNAME_LA := $(LIBDIR)/lib$(LIBRARYNAME).la
415 LIBNAME_A := $(LIBDIR)/lib$(LIBRARYNAME).a
416 LIBNAME_O := $(LIBDIR)/$(LIBRARYNAME).o
417 LIBNAME_BC := $(LIBDIR)/lib$(LIBRARYNAME).bc
419 #---------------------------------------------------------
420 # Shared Library Targets:
421 # If the user asked for a shared library to be built
422 # with the SHARED_LIBRARY variable, then we provide
423 # targets for building them.
424 #---------------------------------------------------------
427 all-local:: $(LIBNAME_LA)
429 $(LIBNAME_LA): $(BUILT_SOURCES) $(ObjectsLO) $(LIBDIR)/.dir
430 @$(ECHO) Linking $(CONFIGURATION) Shared Library $(notdir $@)
431 $(VERB) $(Link) -o $@ $(ObjectsLO)
432 $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $@ $(LIBDIR)
435 ifneq ($(strip $(LIBNAME_LA)),)
436 $(VERB) $(RM) -f $(LIBNAME_LA)
439 DestSharedLib = $(libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
440 install-local:: install-shared-library
442 install-shared-library: $(libdir) $(DestSharedLib)
444 $(DestSharedLib): $(LIBNAME_LA)
445 @$(ECHO) Installing $(CONFIGURATION) Shared Library $(DestSharedLib)
446 $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_LA) $(DestSharedLib)
447 $(VERB) $(LIBTOOL) --finish $(libdir)
449 uninstall-local:: uninstall-shared-library
451 uninstall-shared-library:
452 @$(ECHO) Uninstalling $(CONFIGURATION) Shared Library $(DestSharedLib)
453 $(VERB) $(RM) -f $(DestSharedLib)
457 #---------------------------------------------------------
458 # Bytecode Library Targets:
459 # If the user asked for a bytecode library to be built
460 # with the BYTECODE_LIBRARY variable, then we provide
461 # targets for building them.
462 #---------------------------------------------------------
463 ifdef BYTECODE_LIBRARY
465 ifdef EXPORTED_SYMBOL_LIST
466 BCLinkLib += -Xlinker -internalize-public-api-list=$(EXPORTED_SYMBOL_LIST)
468 ifdef EXPORTED_SYMBOL_FILE
469 BCLinkLib += -Xlinker -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
471 BCLinkLib += -Xlinker -disable-internalize
475 all-local:: $(LIBNAME_BC)
477 $(LIBNAME_BC): $(BUILT_SOURCES) $(ObjectsBC) $(LIBDIR)/.dir
478 @$(ECHO) Linking $(CONFIGURATION) Bytecode Library $(notdir $@)
479 $(VERB) $(BCLinkLib) -o $@ $(ObjectsBC)
482 ifneq ($(strip $(LIBNAME_BC)),)
483 $(VERB) $(RM) -f $(LIBNAME_BC)
486 DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).bc
488 install-local:: install-bytecode-library
490 install-bytecode-library: $(bytecode_libdir) $(DestBytecodeLib)
492 $(DestBytecodeLib): $(LIBNAME_BC) $(bytecode_libdir)
493 @$(ECHO) Installing $(CONFIGURATION) Bytecode Library $(DestBytecodeLib)
494 $(VERB) $(INSTALL) $< $@
496 uninstall-local:: uninstall-bytecode-library
498 uninstall-bytecode-library:
499 @$(ECHO) Uninstalling $(CONFIGURATION) Bytecode Library $(DestBytecodeLib)
500 $(VERB) $(RM) -f $(DestBytecodeLib)
504 # Does the library want a .o version built?
505 ifndef DONT_BUILD_RELINKED
506 all-local:: $(LIBNAME_O)
508 $(LIBNAME_O): $(BUILT_SOURCES) $(ObjectsO) $(LIBDIR)/.dir
509 @$(ECHO) Linking $(CONFIGURATION) Object Library $(notdir $@)
510 $(VERB) $(Relink) -o $@ $(ObjectsO)
513 ifneq ($(strip $(LIBNAME_O)),)
514 $(VERB) $(RM) -f $(LIBNAME_O)
517 DestRelinkedLib = $(libdir)/$(LIBRARYNAME).o
519 install-local:: install-relinked-library
521 install-relinked-library: $(libdir) $(DestRelinkedLib)
523 $(DestRelinkedLib): $(LIBNAME_O)
524 @$(ECHO) Installing $(CONFIGURATION) Object Library $(DestRelinkedLib)
525 $(VERB) $(MKDIR) $(libdir)
526 $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_O) $(DestRelinkedLib)
528 uninstall-local:: uninstall-relinked-library
530 uninstall-relinked-library:
531 @$(ECHO) Uninstalling $(CONFIGURATION) Object Library $(DestRelinkedLib)
532 $(VERB) $(RM) -f $(DestRelinkedLib)
536 # Does the library want an archive version built?
538 all-local:: $(LIBNAME_A)
540 $(LIBNAME_A): $(BUILT_SOURCES) $(ObjectsO) $(LIBDIR)/.dir
541 @$(ECHO) Building $(CONFIGURATION) Archive Library $(notdir $@)
543 $(VERB) $(Archive) $@ $(ObjectsO)
547 ifneq ($(strip $(LIBNAME_A)),)
548 $(VERB) $(RM) -f $(LIBNAME_A)
551 DestArchiveLib := $(libdir)/lib$(LIBRARYNAME).a
553 install-local:: install-archive-library
555 install-archive-library: $(libdir) $(DestArchiveLib)
557 $(DestArchiveLib): $(LIBNAME_A)
558 @$(ECHO) Installing $(CONFIGURATION) Archive Library $(DestArchiveLib)
559 $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_A) $(DestArchiveLib)
561 uninstall-local:: uninstall-archive-library
563 uninstall-archive-library:
564 @$(ECHO) Uninstalling $(CONFIGURATION) Archive Library $(DestArchiveLib)
565 $(VERB) $(RM) -f $(DestArchiveLib)
572 ###############################################################################
573 # Tool Build Rules: Build executable tool based on TOOLNAME option
574 ###############################################################################
578 #---------------------------------------------------------
579 # TOOLLINKOPTSB to pass options to the linker like library search path etc
580 # Note that this is different from TOOLLINKOPTS, these options
581 # are passed to the linker *before* the USEDLIBS options are passed.
582 # e.g. usage TOOLLINKOPTSB = -L/home/xxx/lib
583 #---------------------------------------------------------
585 Link += $(TOOLLINKOPTSB)
588 # TOOLEXENAME - This is the output filenames to generate
589 TOOLEXENAME := $(TOOLDIR)/$(TOOLNAME)
591 # LIBS_OPTIONS - Compute the options lines that add -llib1 -llib2, etc.
592 PROJ_LIBS_OPTIONS := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
593 PROJ_LIBS_OPTIONS := $(patsubst %.o, $(LIBDIR)/%.o, $(PROJ_LIBS_OPTIONS))
594 LLVM_LIBS_OPTIONS := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
595 LLVM_LIBS_OPTIONS := $(patsubst %.o, $(LLVMLIBDIR)/%.o, $(LLVM_LIBS_OPTIONS))
597 # USED_LIBS/LIBS_PATHS - Compute dependent library file paths
598 PROJ_USED_LIBS := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
599 LLVM_USED_LIBS := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS)))
600 PROJ_LIBS_PATHS := $(addprefix $(LIBDIR)/,$(PROJ_USED_LIBS))
601 LLVM_LIBS_PATHS := $(addprefix $(LLVMLIBDIR)/,$(LLVM_USED_LIBS))
603 # Concatenate all the optoins
604 LINK_OPTS := $(TOOLLINKOPTS) $(PROJ_LIBS_OPTIONS) $(LLVM_LIBS_OPTIONS)
606 # Handle compression libraries automatically
607 ifeq ($(HAVE_BZIP2),1)
610 ifeq ($(HAVE_ZLIB),1)
614 # Tell make that we need to rebuild subdirectories before we can link the tool.
615 # This affects things like LLI which has library subdirectories.
616 $(TOOLEXENAME): $(addsuffix /.makeall, $(PARALLEL_DIRS))
618 all-local:: $(TOOLEXENAME)
621 ifneq ($(strip $(TOOLEXENAME)),)
622 $(VERB) $(RM) -f $(TOOLEXENAME)
625 $(TOOLEXENAME): $(BUILT_SOURCES) $(ObjectsO) $(PROJ_LIBS_PATHS) $(LLVM_LIBS_PATHS) $(TOOLDIR)/.dir
626 @$(ECHO) Linking $(CONFIGURATION) executable $(TOOLNAME) $(STRIP_WARN_MSG)
627 $(VERB) $(Link) -o $@ $(ObjectsO) $(PROJ_LIBS_OPTIONS) $(LLVM_LIBS_OPTIONS) $(LIBS)
628 @$(ECHO) ======= Finished Linking $(CONFIGURATION) Executable $(TOOLNAME) $(STRIP_WARN_MSG)
630 DestTool = $(bindir)/$(TOOLNAME)
632 install-local:: install-tool
634 install-tool: $(bindir) $(DestTool)
636 $(DestTool): $(TOOLEXENAME)
637 @$(ECHO) Installing $(CONFIGURATION) $(DestTool)
638 $(VERB) $(INSTALL) $(TOOLEXENAME) $(DestTool)
641 $(VERB) $(MKDIR) $(bindir)
643 uninstall-local:: uninstall-tool
646 @$(ECHO) Uninstalling $(CONFIGURATION) $(DestTool)
647 $(VERB) $(RM) -f $(DestTool)
651 ifndef DISABLE_AUTO_DEPENDENCIES
653 # Create .lo files in the OBJDIR directory from the .cpp and .c files...
656 $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir
657 @$(ECHO) "Compiling $*.cpp (PIC)"
658 $(VERB) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(OBJDIR)/$*.LACXXd $< -o $@ ; \
659 then $(MV) -f "$(OBJDIR)/$*.LACXXd" "$(OBJDIR)/$*.d"; \
660 else $(RM) -f "$(OBJDIR)/$*.LACXXd"; exit 1; fi
662 $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir
663 @$(ECHO) "Compiling $*.c (PIC)"
664 $(VERB) if $(LTCompile.C) -MD -MT $@ -MP -MF $(OBJDIR)/$*.LACd $< -o $@ ; \
665 then $(MV) -f "$(OBJDIR)/$*.LACd" "$(OBJDIR)/$*.d"; \
666 else $(RM) -f "$(OBJDIR)/$*.LACd"; exit 1; fi
670 $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir
671 @$(ECHO) "Compiling $*.cpp"
672 $(VERB) if $(Compile.CXX) -MD -MT $@ -MP -MF $(OBJDIR)/$*.CXXd $< -o $@ ; \
673 then $(MV) -f "$(OBJDIR)/$*.CXXd" "$(OBJDIR)/$*.d"; \
674 else $(RM) -f "$(OBJDIR)/$*.CXXd"; exit 1; fi
676 $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir
677 @$(ECHO) "Compiling $*.c"
678 $(VERB) if $(Compile.C) -MD -MT $@ -MP -MF $(OBJDIR)/$*.Cd $< -o $@ ; \
679 then $(MV) -f "$(OBJDIR)/$*.Cd" "$(OBJDIR)/$*.d"; \
680 else $(RM) -f "$(OBJDIR)/$*.Cd"; exit 1; fi
684 # Create .bc files in the OBJDIR directory from .cpp and .c files...
685 $(OBJDIR)/%.bc: %.cpp $(OBJDIR)/.dir
686 @$(ECHO) "Compiling $*.cpp (bytecode)"
687 $(VERB) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(OBJDIR)/$*.BCCXXd" $< -o $@ ; \
688 then $(MV) -f "$(OBJDIR)/$*.BCCXXd" "$(OBJDIR)/$*.d"; \
689 else $(RM) -f "$(OBJDIR)/$*.BCCXXd"; exit 1; fi
691 $(OBJDIR)/%.bc: %.c $(OBJDIR)/.dir
692 @$(ECHO) "Compiling $*.c (bytecode)"
693 $(VERB) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(OBJDIR)/$*.BCCd" $< -o $@ ; \
694 then $(MV) -f "$(OBJDIR)/$*.BCCd" "$(OBJDIR)/$*.d"; \
695 else $(RM) -f "$(OBJDIR)/$*.BCCd"; exit 1; fi
701 $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir
702 @$(ECHO) "Compiling $*.cpp (PIC)"
703 $(LTCompile.CXX) $< -o $@
705 $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir
706 @$(ECHO) "Compiling $*.cpp (PIC)"
707 $(LTCompile.C) $< -o $@
711 $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir
712 @$(ECHO) "Compiling $*.cpp"
713 $(Compile.CXX) $< -o $@
715 $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir
716 @$(ECHO) "Compiling $*.cpp"
717 $(Compile.C) $< -o $@
720 # Create .bc files in the OBJDIR directory from .cpp and .c files...
721 $(OBJDIR)/%.bc: %.cpp $(OBJDIR)/.dir
722 @$(ECHO) "Compiling $*.cpp (bytecode)"
723 $(BCCompileCPP) $< -o $@
725 $(OBJDIR)/%.bc: %.c $(OBJDIR)/.dir
726 @$(ECHO) "Compiling $*.c (bytecode)"
727 $(BCCompileC) $< -o $@
731 $(OBJDIR)/%.bc: %.ll $(OBJDIR)/.dir $(LLVMAS)
732 @$(ECHO) "Compiling $*.ll"
733 $(VERB) $(LLVMAS) $< -f -o $@
737 TDFILES := $(strip $(wildcard $(BUILD_SRC_DIR)/*.td) $(LLVM_SRC_ROOT)/lib/Target/Target.td)
738 INCFILES := $(filter %.inc,$(BUILT_SOURCES))
740 $(INCFILES) : $(TBLGEN) $(TDFILES)
742 %GenRegisterNames.inc : %.td
743 @echo "Building $(<F) register names with tblgen"
744 $(VERB) $(TableGen) -gen-register-enums -o $@ $<
746 %GenRegisterInfo.h.inc : %.td
747 @echo "Building $(<F) register information header with tblgen"
748 $(VERB) $(TableGen) -gen-register-desc-header -o $@ $<
750 %GenRegisterInfo.inc : %.td
751 @echo "Building $(<F) register info implementation with tblgen"
752 $(VERB) $(TableGen) -gen-register-desc -o $@ $<
754 %GenInstrNames.inc : %.td
755 @echo "Building $(<F) instruction names with tblgen"
756 $(VERB) $(TableGen) -gen-instr-enums -o $@ $<
758 %GenInstrInfo.inc : %.td
759 @echo "Building $(<F) instruction information with tblgen"
760 $(VERB) $(TableGen) -gen-instr-desc -o $@ $<
762 %GenAsmWriter.inc : %.td
763 @echo "Building $(<F) assembly writer with tblgen"
764 $(VERB) $(TableGen) -gen-asm-writer -o $@ $<
766 %GenATTAsmWriter.inc : %.td
767 @echo "Building $(<F) AT&T assembly writer with tblgen"
768 $(VERB) $(TableGen) -gen-asm-writer -o $@ $<
770 %GenIntelAsmWriter.inc : %.td
771 @echo "Building $(<F) Intel assembly writer with tblgen"
772 $(VERB) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
774 %GenInstrSelector.inc: %.td
775 @echo "Building $(<F) instruction selector with tblgen"
776 $(VERB) $(TableGen) -gen-instr-selector -o $@ $<
778 %GenCodeEmitter.inc:: %.td
779 @echo "Building $(<F) code emitter with tblgen"
780 $(VERB) $(TableGen) -gen-emitter -o $@ $<
788 # Rules for building lex/yacc files
790 LEX_FILES = $(filter %.l, $(SOURCES))
791 LEX_OUTPUT = $(LEX_FILES:%.l=%.cpp)
792 YACC_FILES = $(filter %.y, $(SOURCES))
793 YACC_OUTPUT = $(addprefix $(YACC_FILES:%.y=%), .h .cpp .output)
794 .PRECIOUS: $(LEX_OUTPUT) $(YACC_OUTPUT)
796 # Create a .cpp source file from a flex input file... this uses sed to cut down
797 # on the warnings emited by GCC...
799 # The last line is a gross hack to work around flex aparently not being able to
800 # resize the buffer on a large token input. Currently, for uninitialized string
801 # buffers in LLVM we can generate very long tokens, so this is a hack around it.
802 # FIXME. (f.e. char Buffer[10000] )
806 $(VERB) $(FLEX) -t $< | \
807 $(SED) '/^find_rule/d' | \
808 $(SED) 's/void yyunput/inline void yyunput/' | \
809 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
810 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
813 # Rule for building the bison parsers...
814 %.c: %.y # Cancel built-in rules for yacc
815 %.cpp: %.y # Cancel built-in rules for yacc
816 %.h: %.y # Cancel built-in rules for yacc
818 @$(ECHO) "Bisoning $*.y"
819 $(VERB) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
820 $(VERB) $(MV) -f $*.tab.c $*.cpp
821 $(VERB) $(MV) -f $*.tab.h $*.h
823 # To create the directories...
825 $(VERB) $(MKDIR) $* > /dev/null
828 .PRECIOUS: $(OBJDIR)/.dir $(LIBDIR)/.dir $(TOOLDIR)/.dir $(LLVMLIBDIR)/.dir
829 .PRECIOUS: $(LLVMTOOLDIR)/.dir
831 # To create postscript files from dot files...
834 $(DOT) -Tps < $< > $@
837 $(ECHO) "Cannot build $@: The program dot is not installed"
841 # This rules ensures that header files that are removed still have a rule for
842 # which they can be "generated." This allows make to ignore them and
843 # reproduce the dependency lists.
847 # 'make clean' nukes the tree
849 ifneq ($(strip $(OBJDIR)),)
850 $(VERB) $(RM) -rf $(OBJDIR)
852 $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
853 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
854 $(VERB) $(RM) -f *$(SHLIBEXT)
856 ifneq ($(strip $(LEX_OUTPUT)),)
857 $(VERB) $(RM) -f $(LEX_OUTPUT)
859 ifneq ($(strip $(YACC_OUTPUT)),)
860 $(VERB) $(RM) -f $(YACC_OUTPUT)
863 ###############################################################################
864 # DEPENDENCIES: Include the dependency files if we should
865 ###############################################################################
866 ifndef DISABLE_AUTO_DEPENDENCIES
868 # If its not one of the cleaning targets
869 ifneq ($strip($(filter-out clean clean-local dist-clean, $(MAKECMDGOALS))),)
871 # Get the list of dependency files
872 DependFiles := $(basename $(filter %.cpp %.c %.cc, $(SOURCES)))
873 DependFiles := $(patsubst %,$(BUILD_OBJ_DIR)/$(CONFIGURATION)/%.d,$(DependFiles))
875 -include /dev/null $(DependFiles)
879 endif # ifndef DISABLE_AUTO_DEPENDENCIES
881 ###############################################################################
882 # Handle construction of a distribution tarball
883 ###############################################################################
885 .PHONY: dist dist-chck dist-clean distdir dist-gzip dist-bzip2 dist-zip
887 #------------------------------------------------------------------------
888 # Define distribution related variables
889 #------------------------------------------------------------------------
890 DistName := $(LLVM_TARBALL_NAME)
891 DistDir := $(BUILD_OBJ_ROOT)/$(DistName)
892 TopDistDir := $(BUILD_OBJ_ROOT)/$(DistName)
893 DistTarGZip := $(BUILD_OBJ_ROOT)/$(DistName).tar.gz
894 DistZip := $(BUILD_OBJ_ROOT)/$(DistName).zip
895 DistTarBZ2 := $(BUILD_OBJ_ROOT)/$(DistName).tar.bz2
896 DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \
897 ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
898 Makefile.config.in configure autoconf
899 DistOther := $(notdir $(wildcard \
900 $(BUILD_SRC_DIR)/*.h \
901 $(BUILD_SRC_DIR)/*.td \
902 $(BUILD_SRC_DIR)/*.def \
903 $(BUILD_SRC_DIR)/*.ll \
904 $(BUILD_SRC_DIR)/*.in))
905 DistSources := $(SOURCES) $(EXTRA_DIST)
906 DistSubDirs := $(SUBDIRS)
907 DistFiles := $(DistAlways) $(DistSources) $(DistOther)
910 #------------------------------------------------------------------------
911 # We MUST build distribution with OBJ_DIR != SRC_DIR
912 #------------------------------------------------------------------------
913 ifeq ($(BUILD_SRC_DIR),$(BUILD_OBJ_DIR))
914 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
915 @$(ECHO) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
920 DistCheckTop := check
921 #------------------------------------------------------------------------
922 # Prevent catastrophic remove
923 #------------------------------------------------------------------------
924 ifeq ($(LLVM_TARBALL_NAME),)
925 $(error LLVM_TARBALL_NAME is empty. Please rerun configure)
928 #------------------------------------------------------------------------
929 # Prevent attempt to run dist targets from anywhere but the top level
930 #------------------------------------------------------------------------
933 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
934 @$(ECHO) ERROR: You must run $@ from $(BUILD_OBJ_ROOT)
938 #------------------------------------------------------------------------
939 # Provide the top level targets
940 #------------------------------------------------------------------------
942 dist-gzip: $(DistTarGZip)
944 $(DistTarGZip) : distdir
945 @$(ECHO) Packing gzipped distribution tar file.
946 $(VERB) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | gzip -c > "$(DistTarGZip)"
948 dist-bzip2: $(DistTarBZ2)
950 $(DistTarBZ2) : distdir
951 @$(ECHO) Packing bzipped distribution tar file.
952 $(VERB) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - $(DistName) | $(BZIP2) -c >$(DistTarBZ2)
957 @$(ECHO) Packing zipped distribution file.
958 $(VERB) rm -f $(DistZip)
959 $(VERB) cd $(BUILD_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
961 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
962 @$(ECHO) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
964 DistCheckDir := $(LLVM_OBJ_ROOT)/_distcheckdir
966 dist-check:: $(DistCheckTop) $(DistTarGZip)
967 @$(ECHO) Checking distribution tar file.
968 $(VERB) if test -d $(DistCheckDir) ; then \
969 $(RM) -rf $(DistCheckDir) ; \
971 $(VERB) $(MKDIR) $(DistCheckDir)
972 $(VERB) cd $(DistCheckDir) && \
973 $(MKDIR) $(DistCheckDir)/build && \
974 $(MKDIR) $(DistCheckDir)/install && \
975 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
977 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
978 --srcdir=../$(DistName) --with-llvmgccdir="$(LLVMGCCDIR)" && \
981 $(MAKE) uninstall && \
984 $(MAKE) dist-clean && \
985 $(ECHO) ===== $(DistTarGZip) Ready For Distribution =====
988 @$(ECHO) Cleaning distribution files
989 $(VERB) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) $(DistCheckDir)
993 #------------------------------------------------------------------------
994 # Provide the recursive distdir target for building the distribution directory
995 #------------------------------------------------------------------------
996 distdir : $(DistSources)
997 @$(ECHO) Building Distribution Directory $(DistDir)
998 $(VERB) if test "$(DistDir)" = "$(TopDistDir)" ; then \
999 if test -d "$(DistDir)" ; then \
1000 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
1003 echo Removing $(DistDir) ; \
1004 $(RM) -rf $(DistDir); \
1006 $(VERB) $(MKDIR) $(DistDir)
1007 $(VERB) srcdirstrip=`echo "$(BUILD_SRC_DIR)" | sed 's|.|.|g'`; \
1008 srcrootstrip=`echo "$(BUILD_SRC_ROOT)" | sed 's|.|.|g'`; \
1009 for file in $(DistFiles) ; do \
1011 $(BUILD_SRC_DIR)/*) file=`echo "$$file" | sed "s#^$$srcdirstrip/##"`;; \
1012 $(BUILD_SRC_ROOT)/*) file=`echo "$$file" | sed "s#^$$srcrootstrip/#$(BUILD_OBJ_ROOT)/#"`;; \
1014 if test -f "$$file" || test -d "$$file" ; then \
1017 from_dir=$(BUILD_SRC_DIR); \
1019 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'`; \
1020 if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \
1021 to_dir="$(DistDir)/$$dir"; \
1022 $(MKDIR) "$$to_dir" ; \
1024 to_dir="$(DistDir)"; \
1026 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
1027 if test -n "$$mid_dir" ; then \
1028 $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
1030 if test -d "$$from_dir/$$file"; then \
1031 if test -d "$(BUILD_SRC_DIR)/$$file" && \
1032 test "$$from_dir" != "$(BUILD_SRC_DIR)" ; then \
1033 cp -pR "$(BUILD_SRC_DIR)/$$file" "$$to_dir" || exit 1; \
1035 cp -pR $$from_dir/$$file $$to_dir || exit 1; \
1036 elif test -f "$$from_dir/$$file" ; then \
1037 cp -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
1038 elif test -L "$$from_dir/$$file" ; then \
1039 cp -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
1040 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
1041 $(ECHO) "===== WARNING: Distribution Source $$from_dir/$$file Not Found!" ; \
1042 elif test "$(VERB)" != '@' ; then \
1043 $(ECHO) "Skipping non-existent $$from_dir/$$file" ; \
1046 $(VERB) for subdir in $(DistSubDirs) ; do \
1047 if test "$$subdir" \!= "." ; then \
1048 new_distdir="$(DistDir)/$$subdir" ; \
1049 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
1050 ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || exit 1; \
1053 $(VERB) $(MAKE) DistDir="$(DistDir)" dist-hook || exit 1
1054 -$(VERB) find $(DistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
1055 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
1056 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
1057 ! -type d ! -perm -444 -exec $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
1058 || chmod -R a+r $(DistDir)
1065 ###############################################################################
1066 # TOP LEVEL - targets only to apply at the top level directory
1067 ###############################################################################
1071 #------------------------------------------------------------------------
1072 # Install support for project's include files:
1073 #------------------------------------------------------------------------
1075 @$(ECHO) Installing include files
1076 $(VERB) $(MKDIR) $(includedir)
1077 $(VERB) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \
1078 cd $(BUILD_SRC_ROOT)/include && \
1079 find . -path '*/Internal' -prune -o '(' -type f \
1080 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \
1081 -print ')' | grep -v CVS | pax -rwdvpe $(includedir) ; \
1085 @$(ECHO) Uninstalling include files
1086 $(VERB) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \
1087 cd $(BUILD_SRC_ROOT)/include && \
1088 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
1089 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \
1090 -print ')' | grep -v CVS | sed 's#^#$(includedir)/#'` ; \
1093 #------------------------------------------------------------------------
1094 # Build tags database for Emacs/Xemacs:
1095 #------------------------------------------------------------------------
1099 find include lib tools examples -name '*.cpp' -o -name '*.h' | $(ETAGS) $(ETAGSFLAGS) -
1103 ###############################################################################
1104 # MISCELLANEOUS - utility targets
1105 ###############################################################################
1107 #------------------------------------------------------------------------
1108 # Print out the directories used for building
1110 @$(ECHO) "CONFIGURATION : " $(CONFIGURATION)
1111 @$(ECHO) "BUILD_SRC_ROOT: " $(BUILD_SRC_ROOT)
1112 @$(ECHO) "BUILD_SRC_DIR : " $(BUILD_SRC_DIR)
1113 @$(ECHO) "BUILD_OBJ_ROOT: " $(BUILD_OBJ_ROOT)
1114 @$(ECHO) "BUILD_OBJ_DIR : " $(BUILD_OBJ_DIR)
1115 @$(ECHO) "LLVM_SRC_ROOT : " $(LLVM_SRC_ROOT)
1116 @$(ECHO) "LLVM_OBJ_ROOT : " $(LLVM_OBJ_ROOT)
1117 @$(ECHO) "libdir : " $(libdir)
1118 @$(ECHO) "bindir : " $(bindir)
1119 @$(ECHO) "sysconfdir : " $(sysconfdir)
1120 @$(ECHO) "bytecode_libdir : " $(bytecode_libdir)
1121 @$(ECHO) "USER_TARGETS : " $(USER_TARGETS)
1122 @$(ECHO) "OBJMKFILES: $(OBJMKFILES)"
1123 @$(ECHO) "SRCMKFILES: $(SRCMKFILES)"
1124 @$(ECHO) "OBJDIR: " $(OBJDIR)
1125 @$(ECHO) "LIBDIR: " $(LIBDIR)
1126 @$(ECHO) "TOOLDIR: " $(TOOLDIR)
1127 @$(ECHO) "TDFILES:" '$(TDFILES)'
1128 @$(ECHO) "Compile.CXX: " '$(Compile.CXX)'
1129 @$(ECHO) "Compile.C: " '$(Compile.C)'