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 #===-----------------------------------------------------------------------====#
15 ################################################################################
16 # TARGETS: Define standard targets that can be invoked
17 ################################################################################
19 #--------------------------------------------------------------------
20 # Define the various target sets
21 #--------------------------------------------------------------------
22 RecursiveTargets := all clean clean-all install uninstall install-bytecode
23 LocalTargets := all-local clean-local clean-all-local check-local \
24 install-local printvars uninstall-local \
25 install-bytecode-local
26 TopLevelTargets := check dist dist-check dist-clean tags dist-gzip dist-bzip2 \
28 UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
29 InternalTargets := preconditions distdir dist-hook
31 ################################################################################
32 # INITIALIZATION: Basic things the makefile needs
33 ################################################################################
35 #--------------------------------------------------------------------
36 # Set the VPATH so that we can find source files.
37 #--------------------------------------------------------------------
40 #--------------------------------------------------------------------
41 # Reset the list of suffixes we know how to build
42 #--------------------------------------------------------------------
44 .SUFFIXES: .c .cpp .cc .h .hpp .y .l .lo .o .a .bc .td .ps .dot .ll
45 .SUFFIXES: $(SHLIBEXT) $(SUFFIXES)
47 #--------------------------------------------------------------------
48 # Mark all of these targets as phony to avoid implicit rule search
49 #--------------------------------------------------------------------
50 .PHONY: $(UserTargets) $(InternalTargets)
52 #--------------------------------------------------------------------
53 # Make sure all the user-target rules are double colon rules and
54 # they are defined first.
55 #--------------------------------------------------------------------
59 ################################################################################
60 # PRECONDITIONS: that which must be built/checked first
61 ################################################################################
63 SrcMakefiles := $(filter %Makefile %Makefile.tests,\
64 $(wildcard $(PROJ_SRC_DIR)/Makefile*))
65 ObjMakefiles := $(subst $(PROJ_SRC_DIR),$(PROJ_OBJ_DIR),$(SrcMakefiles))
66 ConfigureScript := $(PROJ_SRC_ROOT)/configure
67 ConfigStatusScript := $(PROJ_OBJ_ROOT)/config.status
68 MakefileConfigIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.config.in))
69 MakefileCommonIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.common.in))
70 MakefileConfig := $(PROJ_OBJ_ROOT)/Makefile.config
71 MakefileCommon := $(PROJ_OBJ_ROOT)/Makefile.common
72 PreConditions := $(ConfigStatusScript) $(ObjMakefiles)
73 ifneq ($(MakefileCommonIn),)
74 PreConditions += $(MakefileCommon)
76 ifneq ($(MakefileConfigIn),)
77 PreConditions += $(MakefileConfig)
80 preconditions: $(PreConditions)
82 #------------------------------------------------------------------------
83 # Make sure the BUILT_SOURCES are built first
84 #------------------------------------------------------------------------
85 $(filter-out clean clean-local,$(UserTargets)):: $(BUILT_SOURCES)
88 ifneq ($(strip $(BUILT_SOURCES)),)
89 -$(Verb) $(RM) -f $(BUILT_SOURCES)
92 ifneq ($(PROJ_OBJ_ROOT),$(PROJ_SRC_ROOT))
94 $(Verb) if test -x config.status ; then \
95 $(EchoCmd) Wiping out $(PROJ_OBJ_ROOT) ; \
96 $(MKDIR) .spotless.save ; \
97 $(MV) config.status .spotless.save ; \
98 $(MV) mklib .spotless.save ; \
99 $(MV) projects .spotless.save ; \
101 $(MV) .spotless.save/config.status . ; \
102 $(MV) .spotless.save/mklib . ; \
103 $(MV) .spotless.save/projects . ; \
104 $(RM) -rf .spotless.save ; \
105 $(EchoCmd) Rebuilding configuration of $(PROJ_OBJ_ROOT) ; \
106 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
107 $(ConfigStatusScript) ; \
109 $(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
113 $(EchoCmd) "spotless target not supported for objdir == srcdir"
116 $(BUILT_SOURCES) : $(ObjMakefiles)
118 #------------------------------------------------------------------------
119 # Make sure we're not using a stale configuration
120 #------------------------------------------------------------------------
122 $(Echo) Reconfiguring $(PROJ_OBJ_ROOT)
123 $(Verb) cd $(PROJ_OBJ_ROOT) && \
124 if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
125 $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
127 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
128 $(ConfigStatusScript)
130 .PRECIOUS: $(ConfigStatusScript)
131 $(ConfigStatusScript): $(ConfigureScript)
132 $(Echo) Reconfiguring with $<
133 $(Verb) cd $(PROJ_OBJ_ROOT) && \
134 if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
135 $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
137 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
138 $(ConfigStatusScript)
140 #------------------------------------------------------------------------
141 # Make sure the configuration makefile is up to date
142 #------------------------------------------------------------------------
143 ifneq ($(MakefileConfigIn),)
144 $(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript)
145 $(Echo) Regenerating $@
146 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config
149 ifneq ($(MakefileCommonIn),)
150 $(MakefileCommon): $(MakefileCommonIn) $(ConfigStatusScript)
151 $(Echo) Regenerating $@
152 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.common
155 #------------------------------------------------------------------------
156 # If the Makefile in the source tree has been updated, copy it over into the
157 # build tree. But, only do this if the source and object makefiles differ
158 #------------------------------------------------------------------------
159 ifneq ($(PROJ_OBJ_DIR),$(PROJ_SRC_DIR))
161 Makefile: $(PROJ_SRC_DIR)/Makefile
162 $(Echo) "Updating Makefile"
163 $(Verb) $(MKDIR) $(@D)
164 $(Verb) $(CP) -f $< $@
166 # Copy the Makefile.* files unless we're in the root directory which avoids
167 # the copying of Makefile.config.in or other things that should be explicitly
169 $(PROJ_OBJ_DIR)/Makefile% : $(PROJ_SRC_DIR)/Makefile%
171 *Makefile.rules) ;; \
173 *) $(Echo) "Updating $(@F)" ; \
180 #------------------------------------------------------------------------
181 # Set up the basic dependencies
182 #------------------------------------------------------------------------
183 $(UserTargets):: $(PreConditions)
187 clean-all:: clean-local clean-all-local
188 install:: install-local
189 uninstall:: uninstall-local
190 install-local:: all-local
191 install-bytecode:: install-bytecode-local
193 ###############################################################################
194 # VARIABLES: Set up various variables based on configuration data
195 ###############################################################################
197 #--------------------------------------------------------------------
198 # Variables derived from configuration we are building
199 #--------------------------------------------------------------------
201 # OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
202 # this can be overridden on the make command line.
204 OPTIMIZE_OPTION := -O3
206 OPTIMIZE_OPTION := -O2
209 ifdef ENABLE_PROFILING
211 CXX.Flags := $(OPTIMIZE_OPTION) -pg
212 C.Flags := $(OPTIMIZE_OPTION) -pg
213 LD.Flags := $(OPTIMIZE_OPTION) -pg
215 ifdef ENABLE_OPTIMIZED
217 # Don't use -fomit-frame-pointer on FreeBSD
218 ifneq ($(OS),FreeBSD)
219 # Don't use -fomit-frame-pointer on Darwin, it breaks backtraces.
221 OmitFramePointer := -fomit-frame-pointer
224 CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
225 C.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
226 LD.Flags := $(OPTIMIZE_OPTION)
236 # If DISABLE_ASSERTIONS=1 is specified (make command line or configured),
237 # then disable assertions by defining the appropriate preprocessor symbols.
238 ifdef DISABLE_ASSERTIONS
239 BuildMode := $(BuildMode)-Asserts
240 CXX.Flags += -DNDEBUG
243 CXX.Flags += -D_DEBUG
247 CXX.Flags += $(CXXFLAGS)
249 CPP.BaseFlags += $(CPPFLAGS)
250 LD.Flags += $(LDFLAGS)
252 LibTool.Flags := --tag=CXX
254 #Make Floating point ieee complient on alpha
257 CPP.BaseFlags += -mieee
260 #--------------------------------------------------------------------
261 # Directory locations
262 #--------------------------------------------------------------------
263 ObjDir := $(PROJ_OBJ_DIR)/$(BuildMode)
264 LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
265 ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
266 ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
267 LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
268 LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
269 LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
270 CFERuntimeLibDir := $(LLVMGCCDIR)/lib
272 #--------------------------------------------------------------------
273 # Full Paths To Compiled Tools and Utilities
274 #--------------------------------------------------------------------
275 EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]:
278 LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
281 LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
284 TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
287 GCCAS := $(LLVMToolDir)/gccas$(EXEEXT)
290 GCCLD := $(LLVMToolDir)/gccld$(EXEEXT)
293 LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
296 LLI := $(LLVMToolDir)/lli$(EXEEXT)
299 LLC := $(LLVMToolDir)/llc$(EXEEXT)
302 LOPT := $(LLVMToolDir)/opt$(EXEEXT)
305 LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT)
308 LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC)
309 LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX)
311 #--------------------------------------------------------------------
312 # Adjust to user's request
313 #--------------------------------------------------------------------
315 # Adjust LD.Flags and Libtool.Flags depending on the kind of library that is
316 # to be built. Note that if LOADABLE_MODULE is specified then the resulting
317 # shared library can be opened with dlopen
319 LD.Flags += -rpath $(LibDir)
320 ifdef LOADABLE_MODULE
324 LibTool.Flags += --tag=disable-shared
334 # Adjust settings for verbose mode
337 LibTool.Flags += --silent
338 AR.Flags += >/dev/null 2>/dev/null
339 ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1
341 ConfigureScriptFLAGS :=
344 # By default, strip symbol information from executable
346 Strip := $(PLATFORMSTRIPOPTS)
347 StripWarnMsg := "(without symbols)"
348 Install.StripFlag += -s
351 # Adjust linker flags for building an executable
354 LD.Flags += -rpath $(ExmplDir) -export-dynamic
356 LD.Flags += -rpath $(ToolDir) -export-dynamic
360 #----------------------------------------------------------
361 # Options To Invoke Tools
362 #----------------------------------------------------------
364 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -Wno-long-long \
368 CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
371 # If we are building a universal binary on Mac OS/X, pass extra options. This
372 # is useful to people that want to link the LLVM libraries into their universal
375 CompileCommonOpts += \
376 -arch i386 -arch ppc -isysroot /Developer/SDKs/MACOSX10.4u.sdk/
377 Relink.Flags := -XCClinker -arch -XCClinker i386 -XCClinker -arch \
378 -XCClinker ppc -XCClinker \
379 -isysroot -XCClinker /Developer/SDKs/MACOSX10.4u.sdk/
380 DISABLE_AUTO_DEPENDENCIES=1
383 # Temporary workaround for a Mac OSX compatibility issue.
385 CXX.Flags += -fno-use-cxa-atexit
388 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
389 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
390 # All -I flags should go here, so that they don't confuse llvm-config.
391 CPP.Flags += -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
392 -I$(PROJ_OBJ_ROOT)/include \
393 -I$(PROJ_SRC_ROOT)/include \
394 -I$(LLVM_OBJ_ROOT)/include \
395 -I$(LLVM_SRC_ROOT)/include \
398 Compile.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -c $(C.Flags)
399 LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C)
400 BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
402 Preprocess.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -E $(C.Flags)
404 Compile.CXX = $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c
405 LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX)
406 BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
408 Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -E
409 Link = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
410 $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags) $(Strip)
411 Relink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
412 $(CXX.Flags) $(CompileCommonOpts) $(Relink.Flags)
413 LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
415 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
416 ScriptInstall = $(INSTALL) -m 0755
417 DataInstall = $(INSTALL) -m 0644
418 TableGen = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include \
419 -I $(PROJ_SRC_ROOT)/lib/Target
420 Archive = $(AR) $(AR.Flags)
421 LArchive = $(LLVMToolDir)/llvm-ar rcsf
428 #----------------------------------------------------------
429 # Get the list of source files and compute object file
431 #----------------------------------------------------------
434 Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \
435 $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c $(PROJ_SRC_DIR)/*.y \
436 $(PROJ_SRC_DIR)/*.l))
438 Sources := $(SOURCES)
442 Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES))
445 BaseNameSources := $(sort $(basename $(Sources)))
447 ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
448 ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo)
449 ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
451 ###############################################################################
452 # DIRECTORIES: Handle recursive descent of directory structure
453 ###############################################################################
455 #---------------------------------------------------------
456 # Provide rules to make install dirs. This must be early
457 # in the file so they get built before dependencies
458 #---------------------------------------------------------
460 $(PROJ_bindir): $(PROJ_bindir)/.dir
461 $(PROJ_libdir): $(PROJ_libdir)/.dir
462 $(PROJ_includedir): $(PROJ_includedir)/.dir
463 $(PROJ_etcdir): $(PROJ_etcdir)/.dir
465 # To create other directories, as needed, and timestamp their creation
467 $(Verb) $(MKDIR) $* > /dev/null
470 .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
471 .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
473 #---------------------------------------------------------
474 # Handle the DIRS options for sequential construction
475 #---------------------------------------------------------
480 $(RecursiveTargets)::
481 $(Verb) for dir in $(DIRS); do \
482 if [ ! -f $$dir/Makefile ]; then \
484 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
486 ($(MAKE) -C $$dir $@ ) || exit 1; \
490 #---------------------------------------------------------
491 # Handle the EXPERIMENTAL_DIRS options ensuring success
492 # after each directory is built.
493 #---------------------------------------------------------
494 ifdef EXPERIMENTAL_DIRS
495 $(RecursiveTargets)::
496 $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
497 if [ ! -f $$dir/Makefile ]; then \
499 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
501 ($(MAKE) -C $$dir $@ ) || exit 0; \
505 #-----------------------------------------------------------
506 # Handle the PARALLEL_DIRS options for parallel construction
507 #-----------------------------------------------------------
510 SubDirs += $(PARALLEL_DIRS)
512 # Unfortunately, this list must be maintained if new recursive targets are added
513 all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS))
514 clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS))
515 clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
516 install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS))
517 uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
518 install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS))
520 ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
523 $(Verb) if [ ! -f $(@D)/Makefile ]; then \
525 $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
527 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) ;
530 #---------------------------------------------------------
531 # Handle the OPTIONAL_DIRS options for directores that may
533 #---------------------------------------------------------
536 SubDirs += $(OPTIONAL_DIRS)
538 $(RecursiveTargets)::
539 $(Verb) for dir in $(OPTIONAL_DIRS); do \
540 if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
541 if [ ! -f $$dir/Makefile ]; then \
543 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
545 ($(MAKE) -C$$dir $@ ) || exit 1; \
550 #---------------------------------------------------------
551 # Handle the CONFIG_FILES options
552 #---------------------------------------------------------
555 install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
556 $(Echo) Installing Configuration Files To $(PROJ_etcdir)
557 $(Verb)for file in $(CONFIG_FILES); do \
558 if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
559 $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
560 elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
561 $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
563 $(ECHO) Error: cannot find config file $${file}. ; \
568 $(Echo) Uninstalling Configuration Files From $(PROJ_etcdir)
569 $(Verb)for file in $(CONFIG_FILES); do \
570 $(RM) -f $(PROJ_etcdir)/$${file} ; \
575 ###############################################################################
576 # Set up variables for building libararies
577 ###############################################################################
579 #---------------------------------------------------------
580 # Handle the special "JIT" value for LLVM_LIBS which is a
581 # shorthand for a bunch of libraries that get the correct
582 # JIT support for a library or a tool that runs JIT.
583 #---------------------------------------------------------
584 ifeq ($(firstword $(LLVMLIBS)),config)
585 LLVM_CONFIG := $(LLVM_SRC_ROOT)/utils/llvm-config/llvm-config
586 LLVMLIBS := $(shell $(LLVM_CONFIG) --libnames $(wordlist 2,9999,$(LLVMLIBS)))
587 LLVMLIBS := $(patsubst lib%.a,%.a,$(LLVMLIBS))
588 LLVMLIBS := $(patsubst %.o,%,$(LLVMLIBS))
591 ifeq ($(LLVMLIBS),JIT)
593 # Make sure we can get our own symbols in the tool
596 # Generic JIT libraries
597 JIT_LIBS := LLVMInterpreter LLVMJIT LLVMCodeGen LLVMExecutionEngine
599 # You can enable the X86 JIT on a non-X86 host by setting the flag
600 # ENABLE_X86_JIT on the make command line. If not, it will still be
601 # enabled automagically on an X86 host.
606 # What the X86 JIT requires
608 JIT_LIBS += LLVMX86 LLVMSelectionDAG
611 # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
612 # ENABLE_PPC_JIT on the make command line. If not, it will still be
613 # enabled automagically on an PowerPC host.
614 ifeq ($(ARCH), PowerPC)
618 # What the PowerPC JIT requires
620 JIT_LIBS += LLVMPowerPC LLVMSelectionDAG
623 # You can enable the Alpha JIT on a non-Alpha host by setting the flag
624 # ENABLE_ALPHA_JIT on the make command line. If not, it will still be
625 # enabled automagically on an Alpha host.
626 ifeq ($(ARCH), Alpha)
630 # What the Alpha JIT requires
631 ifdef ENABLE_ALPHA_JIT
632 JIT_LIBS += LLVMAlpha LLVMSelectionDAG
635 LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \
636 LLVMBCReader.a LLVMTarget.a LLVMCore.a LLVMSupport.a LLVMbzip2.a \
637 LLVMSystem.a $(PLATFORMLIBDL)
640 #---------------------------------------------------------
641 # Define various command line options pertaining to the
642 # libraries needed when linking. There are "Proj" libs
643 # (defined by the user's project) and "LLVM" libs (defined
644 # by the # LLVM project).
645 #---------------------------------------------------------
647 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
648 ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions))
649 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
650 LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions))
651 ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
652 LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS)))
653 ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs))
654 LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs))
656 ###############################################################################
657 # Library Build Rules: Four ways to build a library
658 ###############################################################################
660 #---------------------------------------------------------
661 # Bytecode Module Targets:
662 # If the user set MODULE_NAME then they want to build a
663 # bytecode module from the sources. We compile all the
664 # sources and link it together into a single bytecode
666 #---------------------------------------------------------
669 ifeq ($(strip $(LLVMGCC)),)
670 $(warning Modules require llvm-gcc but no llvm-gcc is available ****)
673 Module := $(LibDir)/$(MODULE_NAME).bc
674 LinkModule := $(GCCLD) -L$(CFERuntimeLibDir)
677 ifdef EXPORTED_SYMBOL_FILE
678 LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
681 $(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD)
682 $(Echo) Building $(BuildMode) Bytecode Module $(notdir $@)
683 $(Verb) $(LinkModule) -o $@ $(ObjectsBC)
685 all-local:: $(Module)
688 ifneq ($(strip $(Module)),)
689 -$(Verb) $(RM) -f $(Module)
692 ifdef BYTECODE_DESTINATION
693 ModuleDestDir := $(BYTECODE_DESTINATION)
695 ModuleDestDir := $(PROJ_libdir)
698 DestModule := $(ModuleDestDir)/$(MODULE_NAME).bc
700 install-module:: $(DestModule)
701 install-local:: $(DestModule)
703 $(DestModule): $(ModuleDestDir) $(Module)
704 $(Echo) Installing $(BuildMode) Bytecode Module $(DestModule)
705 $(Verb) $(DataInstall) $(Module) $(DestModule)
708 $(Echo) Uninstalling $(BuildMode) Bytecode Module $(DestModule)
709 -$(Verb) $(RM) -f $(DestModule)
714 # if we're building a library ...
717 # Make sure there isn't any extranous whitespace on the LIBRARYNAME option
718 LIBRARYNAME := $(strip $(LIBRARYNAME))
719 ifdef LOADABLE_MODULE
720 LibName.LA := $(LibDir)/$(LIBRARYNAME).la
722 LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la
724 LibName.A := $(LibDir)/lib$(LIBRARYNAME).a
725 LibName.O := $(LibDir)/$(LIBRARYNAME).o
726 LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca
728 #---------------------------------------------------------
729 # Shared Library Targets:
730 # If the user asked for a shared library to be built
731 # with the SHARED_LIBRARY variable, then we provide
732 # targets for building them.
733 #---------------------------------------------------------
736 all-local:: $(LibName.LA)
738 ifdef LINK_LIBS_IN_SHARED
739 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
740 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
741 $(Verb) $(Link) -o $@ $(ObjectsLO) \
742 $(ProjLibsOptions) $(LLVMLibsOptions)
743 $(Verb) $(LTInstall) $@ $(LibDir)
745 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
746 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
747 $(Verb) $(Link) -o $@ $(ObjectsLO)
748 $(Verb) $(LTInstall) $@ $(LibDir)
752 ifneq ($(strip $(LibName.LA)),)
753 -$(Verb) $(RM) -f $(LibName.LA)
756 DestSharedLib = $(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
758 install-local:: $(DestSharedLib)
760 $(DestSharedLib): $(PROJ_libdir) $(LibName.LA)
761 $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
762 $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
763 $(Verb) $(LIBTOOL) --finish $(PROJ_libdir)
766 $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
767 -$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
771 #---------------------------------------------------------
772 # Bytecode Library Targets:
773 # If the user asked for a bytecode library to be built
774 # with the BYTECODE_LIBRARY variable, then we provide
775 # targets for building them.
776 #---------------------------------------------------------
777 ifdef BYTECODE_LIBRARY
778 ifeq ($(strip $(LLVMGCC)),)
779 $(warning Bytecode libraries require llvm-gcc which could not be found ****)
782 all-local:: $(LibName.BCA)
784 ifdef EXPORTED_SYMBOL_FILE
785 BCLinkLib = $(GCCLD) -L$(CFERuntimeLibDir) \
786 -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
788 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \
789 $(LLVMToolDir)/llvm-ar
790 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \
792 $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC)
794 $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o
796 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir \
797 $(LLVMToolDir)/llvm-ar
798 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@)
800 $(Verb) $(LArchive) $@ $(ObjectsBC)
805 ifneq ($(strip $(LibName.BCA)),)
806 -$(Verb) $(RM) -f $(LibName.BCA)
809 ifdef BYTECODE_DESTINATION
810 BytecodeDestDir := $(BYTECODE_DESTINATION)
812 BytecodeDestDir := $(PROJ_libdir)
815 DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).a
817 install-bytecode-local:: $(DestBytecodeLib)
819 install-local:: $(DestBytecodeLib)
821 $(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
822 $(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib)
823 $(Verb) $(DataInstall) $(LibName.BCA) $(DestBytecodeLib)
826 $(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib)
827 -$(Verb) $(RM) -f $(DestBytecodeLib)
832 #---------------------------------------------------------
833 # ReLinked Library Targets:
834 # If the user explicitly requests a relinked library with
835 # BUILD_RELINKED, provide it. Otherwise, if they specify
836 # neither of BUILD_ARCHIVE or DONT_BUILD_RELINKED, give
838 #---------------------------------------------------------
840 ifndef DONT_BUILD_RELINKED
847 all-local:: $(LibName.O)
849 $(LibName.O): $(ObjectsO) $(LibDir)/.dir
850 $(Echo) Linking $(BuildMode) Object Library $(notdir $@)
851 $(Verb) $(Relink) -o $@ $(ObjectsO)
854 ifneq ($(strip $(LibName.O)),)
855 -$(Verb) $(RM) -f $(LibName.O)
858 DestRelinkedLib = $(PROJ_libdir)/$(LIBRARYNAME).o
860 install-local:: $(DestRelinkedLib)
862 $(DestRelinkedLib): $(PROJ_libdir) $(LibName.O)
863 $(Echo) Installing $(BuildMode) Object Library $(DestRelinkedLib)
864 $(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib)
867 $(Echo) Uninstalling $(BuildMode) Object Library $(DestRelinkedLib)
868 -$(Verb) $(RM) -f $(DestRelinkedLib)
872 #---------------------------------------------------------
873 # Archive Library Targets:
874 # If the user wanted a regular archive library built,
875 # then we provide targets for building them.
876 #---------------------------------------------------------
879 all-local:: $(LibName.A)
881 $(LibName.A): $(ObjectsO) $(LibDir)/.dir
882 $(Echo) Building $(BuildMode) Archive Library $(notdir $@)
884 $(Verb) $(Archive) $@ $(ObjectsO)
888 ifneq ($(strip $(LibName.A)),)
889 -$(Verb) $(RM) -f $(LibName.A)
892 DestArchiveLib := $(PROJ_libdir)/lib$(LIBRARYNAME).a
894 install-local:: $(DestArchiveLib)
896 $(DestArchiveLib): $(PROJ_libdir) $(LibName.A)
897 $(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
898 $(Verb) $(MKDIR) $(PROJ_libdir)
899 $(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib)
902 $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
903 -$(Verb) $(RM) -f $(DestArchiveLib)
910 ###############################################################################
911 # Tool Build Rules: Build executable tool based on TOOLNAME option
912 ###############################################################################
916 #---------------------------------------------------------
917 # Set up variables for building a tool.
918 #---------------------------------------------------------
920 ToolBuildPath := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT)
922 ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
925 #---------------------------------------------------------
926 # Tell make that we need to rebuild subdirectories before
927 # we can link the tool. This affects things like LLI which
928 # has library subdirectories.
929 #---------------------------------------------------------
930 $(ToolBuildPath): $(addsuffix /.makeall, $(PARALLEL_DIRS))
932 #---------------------------------------------------------
933 # Provide targets for building the tools
934 #---------------------------------------------------------
935 all-local:: $(ToolBuildPath)
938 ifneq ($(strip $(ToolBuildPath)),)
939 -$(Verb) $(RM) -f $(ToolBuildPath)
943 $(ToolBuildPath): $(ExmplDir)/.dir
945 $(ToolBuildPath): $(ToolDir)/.dir
948 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
949 $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
950 $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
951 $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
952 $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
955 DestTool = $(PROJ_bindir)/$(TOOLNAME)
957 install-local:: $(DestTool)
959 $(DestTool): $(PROJ_bindir) $(ToolBuildPath)
960 $(Echo) Installing $(BuildMode) $(DestTool)
961 $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
964 $(Echo) Uninstalling $(BuildMode) $(DestTool)
965 -$(Verb) $(RM) -f $(DestTool)
969 ###############################################################################
970 # Object Build Rules: Build object files based on sources
971 ###############################################################################
973 # FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
975 DISABLE_AUTO_DEPENDENCIES=1
978 # Provide rule sets for when dependency generation is enabled
979 ifndef DISABLE_AUTO_DEPENDENCIES
981 #---------------------------------------------------------
982 # Create .lo files in the ObjDir directory from the .cpp and .c files...
983 #---------------------------------------------------------
986 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
987 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
988 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
989 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
990 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
992 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
993 $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
994 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
995 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
996 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
998 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
999 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
1000 $(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
1001 then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \
1002 else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi
1004 #---------------------------------------------------------
1005 # Create .o files in the ObjDir directory from the .cpp and .c files...
1006 #---------------------------------------------------------
1009 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1010 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
1011 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
1012 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
1013 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
1015 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1016 $(Echo) "Compiling $*.cc for $(BuildMode) build"
1017 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
1018 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
1019 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
1021 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1022 $(Echo) "Compiling $*.c for $(BuildMode) build"
1023 $(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \
1024 then $(MV) -f "$(ObjDir)/$*.Cd" "$(ObjDir)/$*.d"; \
1025 else $(RM) -f "$(ObjDir)/$*.Cd"; exit 1; fi
1029 ## Rules for building preprocessed (.i/.ii) outputs.
1030 $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1031 $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file"
1032 $(Verb) $(Preprocess.CXX) $< -o $@
1034 $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1035 $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file"
1036 $(Verb) $(Preprocess.CXX) $< -o $@
1038 $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1039 $(Echo) "Compiling $*.c for $(BuildMode) build to .i file"
1040 $(Verb) $(Preprocess.C) $< -o $@
1043 #---------------------------------------------------------
1044 # Create .bc files in the ObjDir directory from .cpp .cc and .c files...
1045 #---------------------------------------------------------
1047 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1048 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1049 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1050 $< -o $@ -S -emit-llvm ; \
1051 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1052 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1054 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1055 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1056 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1057 $< -o $@ -S -emit-llvm ; \
1058 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1059 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1061 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1062 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1063 $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" \
1064 $< -o $@ -S -emit-llvm ; \
1065 then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
1066 else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
1068 # Provide alternate rule sets if dependencies are disabled
1071 ifdef SHARED_LIBRARY
1073 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1074 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
1075 $(LTCompile.CXX) $< -o $@
1077 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1078 $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
1079 $(LTCompile.CXX) $< -o $@
1081 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1082 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
1083 $(LTCompile.C) $< -o $@
1087 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1088 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
1089 $(Compile.CXX) $< -o $@
1091 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1092 $(Echo) "Compiling $*.cc for $(BuildMode) build"
1093 $(Compile.CXX) $< -o $@
1095 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1096 $(Echo) "Compiling $*.c for $(BuildMode) build"
1097 $(Compile.C) $< -o $@
1100 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1101 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1102 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1104 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1105 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1106 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1108 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1109 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1110 $(BCCompile.C) $< -o $@ -S -emit-llvm
1114 # make the C and C++ compilers strip debug info out of bytecode libraries.
1116 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1117 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1118 $(Verb) $(GCCAS) $< -o $@
1120 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1121 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1122 $(Verb) $(GCCAS) -strip-debug $< -o $@
1126 #---------------------------------------------------------
1127 # Provide rule to build .bc files from .ll sources,
1128 # regardless of dependencies
1129 #---------------------------------------------------------
1130 $(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS)
1131 $(Echo) "Compiling $*.ll for $(BuildMode) build"
1132 $(Verb) $(LLVMAS) $< -f -o $@
1134 ###############################################################################
1135 # TABLEGEN: Provide rules for running tblgen to produce *.inc files
1136 ###############################################################################
1140 TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \
1141 $(LLVM_SRC_ROOT)/lib/Target/Target.td \
1142 $(LLVM_SRC_ROOT)/lib/Target/TargetSelectionDAG.td \
1143 $(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td)
1144 INCFiles := $(filter %.inc,$(BUILT_SOURCES))
1145 INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
1146 .PRECIOUS: $(INCTMPFiles) $(INCFiles)
1148 # All of these files depend on tblgen and the .td files.
1149 $(INCTMPFiles) : $(TBLGEN) $(TDFiles)
1151 # INCFiles rule: All of the tblgen generated files are emitted to
1152 # $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows
1153 # us to only "touch" the real file if the contents of it change. IOW, if
1154 # tblgen is modified, all of the .inc.tmp files are regereated, but no
1155 # dependencies of the .inc files are, unless the contents of the .inc file
1157 $(INCFiles) : %.inc : $(ObjDir)/%.inc.tmp
1158 $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
1160 $(TARGET:%=$(ObjDir)/%GenRegisterNames.inc.tmp): \
1161 $(ObjDir)/%GenRegisterNames.inc.tmp : %.td $(ObjDir)/.dir
1162 $(Echo) "Building $(<F) register names with tblgen"
1163 $(Verb) $(TableGen) -gen-register-enums -o $@ $<
1165 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.h.inc.tmp): \
1166 $(ObjDir)/%GenRegisterInfo.h.inc.tmp : %.td $(ObjDir)/.dir
1167 $(Echo) "Building $(<F) register information header with tblgen"
1168 $(Verb) $(TableGen) -gen-register-desc-header -o $@ $<
1170 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.inc.tmp): \
1171 $(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir
1172 $(Echo) "Building $(<F) register info implementation with tblgen"
1173 $(Verb) $(TableGen) -gen-register-desc -o $@ $<
1175 $(TARGET:%=$(ObjDir)/%GenInstrNames.inc.tmp): \
1176 $(ObjDir)/%GenInstrNames.inc.tmp : %.td $(ObjDir)/.dir
1177 $(Echo) "Building $(<F) instruction names with tblgen"
1178 $(Verb) $(TableGen) -gen-instr-enums -o $@ $<
1180 $(TARGET:%=$(ObjDir)/%GenInstrInfo.inc.tmp): \
1181 $(ObjDir)/%GenInstrInfo.inc.tmp : %.td $(ObjDir)/.dir
1182 $(Echo) "Building $(<F) instruction information with tblgen"
1183 $(Verb) $(TableGen) -gen-instr-desc -o $@ $<
1185 $(TARGET:%=$(ObjDir)/%GenAsmWriter.inc.tmp): \
1186 $(ObjDir)/%GenAsmWriter.inc.tmp : %.td $(ObjDir)/.dir
1187 $(Echo) "Building $(<F) assembly writer with tblgen"
1188 $(Verb) $(TableGen) -gen-asm-writer -o $@ $<
1190 $(TARGET:%=$(ObjDir)/%GenAsmWriter1.inc.tmp): \
1191 $(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir
1192 $(Echo) "Building $(<F) assembly writer #1 with tblgen"
1193 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
1195 $(TARGET:%=$(ObjDir)/%GenCodeEmitter.inc.tmp): \
1196 $(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir
1197 $(Echo) "Building $(<F) code emitter with tblgen"
1198 $(Verb) $(TableGen) -gen-emitter -o $@ $<
1200 $(TARGET:%=$(ObjDir)/%GenDAGISel.inc.tmp): \
1201 $(ObjDir)/%GenDAGISel.inc.tmp : %.td $(ObjDir)/.dir
1202 $(Echo) "Building $(<F) instruction selector implementation with tblgen"
1203 $(Verb) $(TableGen) -gen-dag-isel -o $@ $<
1205 $(TARGET:%=$(ObjDir)/%GenSubtarget.inc.tmp): \
1206 $(ObjDir)/%GenSubtarget.inc.tmp : %.td $(ObjDir)/.dir
1207 $(Echo) "Building $(<F) subtarget information with tblgen"
1208 $(Verb) $(TableGen) -gen-subtarget -o $@ $<
1211 -$(Verb) $(RM) -f $(INCFiles)
1215 ###############################################################################
1216 # LEX AND YACC: Provide rules for generating sources with lex and yacc
1217 ###############################################################################
1219 #---------------------------------------------------------
1220 # Provide rules for generating a .cpp source file from
1221 # (f)lex input sources.
1222 #---------------------------------------------------------
1224 LexFiles := $(filter %.l,$(Sources))
1226 ifneq ($(LexFiles),)
1228 # Cancel built-in rules for lex
1232 all:: $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs)
1234 # Note the extra sed filtering here, used to cut down on the warnings emited
1235 # by GCC. The last line is a gross hack to work around flex aparently not
1236 # being able to resize the buffer on a large token input. Currently, for
1237 # uninitialized string buffers in LLVM we can generate very long tokens, so
1238 # this is a hack around it.
1239 # FIXME. (f.e. char Buffer[10000] )
1240 $(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
1241 $(Echo) Flexing $*.l
1242 $(Verb) $(FLEX) -t $(PROJ_SRC_DIR)/$*.l | \
1243 $(SED) 's/void yyunput/inline void yyunput/' | \
1244 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
1245 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
1246 > $(PROJ_SRC_DIR)/$*.cpp
1248 # IFF the .l file has changed since it was last checked into CVS, copy the .l
1249 # file to .l.cvs and the generated .cpp file to .cpp.cvs. We use this mechanism
1250 # so that people without flex can build LLVM by copying the .cvs files to the
1251 # source location and building them.
1252 $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1253 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1254 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
1255 ($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)
1257 $(LexFiles:%.l=$(ObjDir)/%.o) : \
1258 $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1261 -$(Verb) $(RM) -f $(LexOutput)
1265 #---------------------------------------------------------
1266 # Provide rules for generating a .cpp and .h source files
1267 # from yacc (bison) input sources.
1268 #---------------------------------------------------------
1270 YaccFiles := $(filter %.y,$(Sources))
1271 ifneq ($(YaccFiles),)
1273 .PRECIOUS: $(YaccOutput)
1275 all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
1277 # Cancel built-in rules for yacc
1282 # Rule for building the bison based parsers...
1283 $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
1284 $(Echo) "Bisoning $*.y"
1285 $(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
1286 $(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
1287 $(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
1289 # IFF the .y file has changed since it was last checked into CVS, copy the .y
1290 # file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs. We use this
1291 # mechanism so that people without flex can build LLVM by copying the .cvs files
1292 # to the source location and building them.
1293 $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1294 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1295 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs || \
1297 $(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
1298 $(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
1301 $(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1303 YaccOutput := $(YaccFiles:%.y=%.output)
1306 -$(Verb) $(RM) -f $(YaccOutput)
1309 ###############################################################################
1310 # OTHER RULES: Other rules needed
1311 ###############################################################################
1313 # To create postscript files from dot files...
1314 ifneq ($(DOT),false)
1316 $(DOT) -Tps < $< > $@
1319 $(Echo) "Cannot build $@: The program dot is not installed"
1322 # This rules ensures that header files that are removed still have a rule for
1323 # which they can be "generated." This allows make to ignore them and
1324 # reproduce the dependency lists.
1328 # Define clean-local to clean the current directory. Note that this uses a
1329 # very conservative approach ensuring that empty variables do not cause
1330 # errors or disastrous removal.
1332 ifneq ($(strip $(ObjDir)),)
1333 -$(Verb) $(RM) -rf $(ObjDir)
1335 -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
1336 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
1337 -$(Verb) $(RM) -f *$(SHLIBEXT)
1341 -$(Verb) $(RM) -rf Debug Release Profile
1343 # Build tags database for Emacs/Xemacs:
1347 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1348 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1349 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1350 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1351 -name '*.cpp' -o -name '*.h' | \
1352 $(ETAGS) $(ETAGSFLAGS) -
1355 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1356 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1357 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1358 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1359 \( -name '*.cpp' -o -name '*.h' \) -print | \
1360 ctags -ImtT -o $(PROJ_OBJ_ROOT)/CTAGS -L -
1363 ###############################################################################
1364 # DEPENDENCIES: Include the dependency files if we should
1365 ###############################################################################
1366 ifndef DISABLE_AUTO_DEPENDENCIES
1368 # If its not one of the cleaning targets
1369 ifneq ($strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),)
1371 # Get the list of dependency files
1372 DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources)))
1373 DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d)
1375 -include /dev/null $(DependFiles)
1381 ###############################################################################
1382 # CHECK: Running the test suite
1383 ###############################################################################
1386 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1387 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1388 $(EchoCmd) Running test suite ; \
1389 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local \
1390 TESTSUITE=$(TESTSUITE) ; \
1392 $(EchoCmd) No Makefile in test directory ; \
1395 $(EchoCmd) No test directory ; \
1398 ###############################################################################
1399 # DISTRIBUTION: Handle construction of a distribution tarball
1400 ###############################################################################
1402 #------------------------------------------------------------------------
1403 # Define distribution related variables
1404 #------------------------------------------------------------------------
1405 DistName := $(PROJECT_NAME)-$(PROJ_VERSION)
1406 DistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1407 TopDistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1408 DistTarGZip := $(PROJ_OBJ_ROOT)/$(DistName).tar.gz
1409 DistZip := $(PROJ_OBJ_ROOT)/$(DistName).zip
1410 DistTarBZ2 := $(PROJ_OBJ_ROOT)/$(DistName).tar.bz2
1411 DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \
1412 ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
1413 Makefile.config.in configure autoconf
1414 DistOther := $(notdir $(wildcard \
1415 $(PROJ_SRC_DIR)/*.h \
1416 $(PROJ_SRC_DIR)/*.td \
1417 $(PROJ_SRC_DIR)/*.def \
1418 $(PROJ_SRC_DIR)/*.ll \
1419 $(PROJ_SRC_DIR)/*.in))
1420 DistSubDirs := $(SubDirs)
1421 DistSources = $(Sources) $(EXTRA_DIST)
1422 DistFiles = $(DistAlways) $(DistSources) $(DistOther)
1424 #------------------------------------------------------------------------
1425 # We MUST build distribution with OBJ_DIR != SRC_DIR
1426 #------------------------------------------------------------------------
1427 ifeq ($(PROJ_SRC_DIR),$(PROJ_OBJ_DIR))
1428 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1429 $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
1433 #------------------------------------------------------------------------
1434 # Prevent attempt to run dist targets from anywhere but the top level
1435 #------------------------------------------------------------------------
1437 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1438 $(Echo) ERROR: You must run $@ from $(PROJ_OBJ_ROOT)
1441 #------------------------------------------------------------------------
1442 # Provide the top level targets
1443 #------------------------------------------------------------------------
1445 dist-gzip:: $(DistTarGZip)
1447 $(DistTarGZip) : $(TopDistDir)/.makedistdir
1448 $(Echo) Packing gzipped distribution tar file.
1449 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \
1450 $(GZIP) -c > "$(DistTarGZip)"
1452 dist-bzip2:: $(DistTarBZ2)
1454 $(DistTarBZ2) : $(TopDistDir)/.makedistdir
1455 $(Echo) Packing bzipped distribution tar file.
1456 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \
1457 $(BZIP2) -c >$(DistTarBZ2)
1459 dist-zip:: $(DistZip)
1461 $(DistZip) : $(TopDistDir)/.makedistdir
1462 $(Echo) Packing zipped distribution file.
1463 $(Verb) rm -f $(DistZip)
1464 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
1466 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
1467 $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
1469 DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir
1471 dist-check:: $(DistTarGZip)
1472 $(Echo) Checking distribution tar file.
1473 $(Verb) if test -d $(DistCheckDir) ; then \
1474 $(RM) -rf $(DistCheckDir) ; \
1476 $(Verb) $(MKDIR) $(DistCheckDir)
1477 $(Verb) cd $(DistCheckDir) && \
1478 $(MKDIR) $(DistCheckDir)/build && \
1479 $(MKDIR) $(DistCheckDir)/install && \
1480 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
1482 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
1483 --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
1486 $(MAKE) install && \
1487 $(MAKE) uninstall && \
1488 $(MAKE) dist-clean && \
1489 $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution =====
1492 $(Echo) Cleaning distribution files
1493 -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \
1498 #------------------------------------------------------------------------
1499 # Provide the recursive distdir target for building the distribution directory
1500 #------------------------------------------------------------------------
1501 distdir: $(DistDir)/.makedistdir
1502 $(DistDir)/.makedistdir: $(DistSources)
1503 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1504 if test -d "$(DistDir)" ; then \
1505 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
1508 $(EchoCmd) Removing old $(DistDir) ; \
1509 $(RM) -rf $(DistDir); \
1510 $(EchoCmd) Making 'all' to verify build ; \
1511 $(MAKE) ENABLE_OPTIMIZED=1 all ; \
1513 $(Echo) Building Distribution Directory $(DistDir)
1514 $(Verb) $(MKDIR) $(DistDir)
1515 $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \
1516 srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \
1517 for file in $(DistFiles) ; do \
1519 $(PROJ_SRC_DIR)/*) \
1520 file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \
1522 $(PROJ_SRC_ROOT)/*) \
1523 file=`echo "$$file" | \
1524 sed "s#^$$srcrootstrip/##"` \
1527 if test -f "$(PROJ_SRC_DIR)/$$file" || \
1528 test -d "$(PROJ_SRC_DIR)/$$file" ; then \
1529 from_dir="$(PROJ_SRC_DIR)" ; \
1530 elif test -f "$$file" || test -d "$$file" ; then \
1533 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \
1534 if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \
1535 to_dir="$(DistDir)/$$dir"; \
1536 $(MKDIR) "$$to_dir" ; \
1538 to_dir="$(DistDir)"; \
1540 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
1541 if test -n "$$mid_dir" ; then \
1542 $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
1544 if test -d "$$from_dir/$$file"; then \
1545 if test -d "$(PROJ_SRC_DIR)/$$file" && \
1546 test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \
1547 cd $(PROJ_SRC_DIR) ; \
1548 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1549 ( cd $$to_dir ; $(TAR) xf - ) ; \
1550 cd $(PROJ_OBJ_DIR) ; \
1553 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1554 ( cd $$to_dir ; $(TAR) xf - ) ; \
1555 cd $(PROJ_OBJ_DIR) ; \
1557 elif test -f "$$from_dir/$$file" ; then \
1558 $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
1559 elif test -L "$$from_dir/$$file" ; then \
1560 $(CP) -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
1561 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
1562 $(EchoCmd) "===== WARNING: Distribution Source " \
1563 "$$from_dir/$$file Not Found!" ; \
1564 elif test "$(Verb)" != '@' ; then \
1565 $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \
1568 $(Verb) for subdir in $(DistSubDirs) ; do \
1569 if test "$$subdir" \!= "." ; then \
1570 new_distdir="$(DistDir)/$$subdir" ; \
1571 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
1572 ( cd $$subdir && $(MAKE) ENABLE_OPTIMIZED=1 \
1573 DistDir="$$new_distdir" distdir ) || exit 1; \
1576 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1577 $(EchoCmd) Eliminating CVS/.svn directories from distribution ; \
1578 $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o \
1579 -name .svn \) -print` ;\
1580 $(MAKE) dist-hook ; \
1581 $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \
1582 -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \
1583 -o ! -type d ! -perm -400 -exec chmod a+r {} \; \
1584 -o ! -type d ! -perm -444 -exec \
1585 $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
1586 || chmod -R a+r $(DistDir) ; \
1589 # This is invoked by distdir target, define it as a no-op to avoid errors if not
1595 ###############################################################################
1596 # TOP LEVEL - targets only to apply at the top level directory
1597 ###############################################################################
1601 #------------------------------------------------------------------------
1602 # Install support for the project's include files:
1603 #------------------------------------------------------------------------
1605 $(Echo) Installing include files
1606 $(Verb) $(MKDIR) $(PROJ_includedir)
1607 $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
1608 cd $(PROJ_SRC_ROOT)/include && \
1609 for hdr in `find . -type f '!' '(' -name '*~' -o -name '.cvsignore' \
1610 -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS ` ; do \
1611 instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
1612 if test \! -d "$$instdir" ; then \
1613 $(EchoCmd) Making install directory $$instdir ; \
1614 $(MKDIR) $$instdir ;\
1616 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1619 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
1620 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
1621 cd $(PROJ_OBJ_ROOT)/include && \
1622 for hdr in `find . -type f -print | grep -v CVS` ; do \
1623 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1629 $(Echo) Uninstalling include files
1630 $(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
1631 cd $(PROJ_SRC_ROOT)/include && \
1632 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
1633 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' \
1634 -o -name '*.in' ')' -print ')' | \
1635 grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
1636 cd $(PROJ_SRC_ROOT)/include && \
1637 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
1638 -print ')' | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
1643 #------------------------------------------------------------------------
1644 # Print out the directories used for building
1645 #------------------------------------------------------------------------
1647 $(Echo) "BuildMode : " '$(BuildMode)'
1648 $(Echo) "PROJ_SRC_ROOT: " '$(PROJ_SRC_ROOT)'
1649 $(Echo) "PROJ_SRC_DIR : " '$(PROJ_SRC_DIR)'
1650 $(Echo) "PROJ_OBJ_ROOT: " '$(PROJ_OBJ_ROOT)'
1651 $(Echo) "PROJ_OBJ_DIR : " '$(PROJ_OBJ_DIR)'
1652 $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
1653 $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
1654 $(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
1655 $(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
1656 $(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
1657 $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
1658 $(Echo) "PROJ_includedir : " '$(PROJ_includedir)'
1659 $(Echo) "UserTargets : " '$(UserTargets)'
1660 $(Echo) "ObjMakefiles : " '$(ObjMakefiles)'
1661 $(Echo) "SrcMakefiles : " '$(SrcMakefiles)'
1662 $(Echo) "ObjDir : " '$(ObjDir)'
1663 $(Echo) "LibDir : " '$(LibDir)'
1664 $(Echo) "ToolDir : " '$(ToolDir)'
1665 $(Echo) "ExmplDir : " '$(ExmplDir)'
1666 $(Echo) "Sources : " '$(Sources)'
1667 $(Echo) "TDFiles : " '$(TDFiles)'
1668 $(Echo) "INCFiles : " '$(INCFiles)'
1669 $(Echo) "INCTMPFiles : " '$(INCTMPFiles)'
1670 $(Echo) "PreConditions: " '$(PreConditions)'
1671 $(Echo) "Compile.CXX : " '$(Compile.CXX)'
1672 $(Echo) "Compile.C : " '$(Compile.C)'
1673 $(Echo) "Archive : " '$(Archive)'
1674 $(Echo) "YaccFiles : " '$(YaccFiles)'
1675 $(Echo) "LexFiles : " '$(LexFiles)'
1676 $(Echo) "Module : " '$(Module)'
1677 $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'
1678 $(Echo) "SubDirs : " '$(SubDirs)'