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 -g
212 C.Flags := $(OPTIMIZE_OPTION) -pg -g
213 LD.Flags := $(OPTIMIZE_OPTION) -pg -g
215 ifdef ENABLE_OPTIMIZED
217 # Don't use -fomit-frame-pointer on Darwin or FreeBSD.
218 ifneq ($(OS),FreeBSD)
220 OmitFramePointer := -fomit-frame-pointer
224 # Darwin requires -fstrict-aliasing to be explicitly enabled.
226 EXTRA_OPTIONS += -fstrict-aliasing
229 CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
230 C.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
231 LD.Flags := $(OPTIMIZE_OPTION)
241 # If DISABLE_ASSERTIONS=1 is specified (make command line or configured),
242 # then disable assertions by defining the appropriate preprocessor symbols.
243 ifdef DISABLE_ASSERTIONS
244 BuildMode := $(BuildMode)-Asserts
245 CXX.Flags += -DNDEBUG
248 CXX.Flags += -D_DEBUG
252 CXX.Flags += $(CXXFLAGS)
254 CPP.BaseFlags += $(CPPFLAGS)
255 LD.Flags += $(LDFLAGS)
257 LibTool.Flags := --tag=CXX
259 # Make Floating point IEEE compliant on Alpha.
261 CXX.Flags += -mieee -fPIC
262 CPP.BaseFlags += -mieee -fPIC
265 #--------------------------------------------------------------------
266 # Directory locations
267 #--------------------------------------------------------------------
268 ObjDir := $(PROJ_OBJ_DIR)/$(BuildMode)
269 LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
270 ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
271 ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
272 LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
273 LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
274 LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
275 CFERuntimeLibDir := $(LLVMGCCDIR)/lib
277 #--------------------------------------------------------------------
278 # Full Paths To Compiled Tools and Utilities
279 #--------------------------------------------------------------------
280 EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]:
283 LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
286 LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
289 ifeq ($(LLVM_CROSS_COMPILING),1)
290 TBLGEN := $(LLVMToolDir)/tblgen$(BUILD_EXEEXT)
292 TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
296 GCCAS := $(LLVMToolDir)/gccas$(EXEEXT)
299 GCCLD := $(LLVMToolDir)/gccld$(EXEEXT)
302 LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
305 LLI := $(LLVMToolDir)/lli$(EXEEXT)
308 LLC := $(LLVMToolDir)/llc$(EXEEXT)
311 LOPT := $(LLVMToolDir)/opt$(EXEEXT)
314 LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT)
317 LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC)
318 LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX)
320 #--------------------------------------------------------------------
321 # Adjust to user's request
322 #--------------------------------------------------------------------
324 # Adjust LD.Flags and Libtool.Flags depending on the kind of library that is
325 # to be built. Note that if LOADABLE_MODULE is specified then the resulting
326 # shared library can be opened with dlopen. Also, LOADABLE_MODULE implies
327 # several other things so we force them to be defined/on.
328 ifdef LOADABLE_MODULE
330 DONT_BUILD_RELINKED := 1
331 LINK_LIBS_IN_SHARED := 1
336 LD.Flags += -rpath $(LibDir)
338 LibTool.Flags += --tag=disable-shared
348 # Adjust settings for verbose mode
351 LibTool.Flags += --silent
352 AR.Flags += >/dev/null 2>/dev/null
353 ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1
355 ConfigureScriptFLAGS :=
358 # By default, strip symbol information from executable
360 Strip := $(PLATFORMSTRIPOPTS)
361 StripWarnMsg := "(without symbols)"
362 Install.StripFlag += -s
365 # Adjust linker flags for building an executable
368 LD.Flags += -rpath $(ExmplDir) -export-dynamic
370 LD.Flags += -rpath $(ToolDir) -export-dynamic
374 #----------------------------------------------------------
375 # Options To Invoke Tools
376 #----------------------------------------------------------
378 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -Wno-long-long \
379 -pedantic $(EXTRA_OPTIONS)
382 CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
385 # If we are building a universal binary on Mac OS/X, pass extra options. This
386 # is useful to people that want to link the LLVM libraries into their universal
389 # The following can be optionally specified:
390 # UNIVERSAL_SDK_PATH variable can be specified as a path to the SDK to use.
391 # For Mac OS/X 10.4 Intel machines, the traditional one is:
392 # UNIVERSAL_SDK_PATH=/Developer/SDKs/MacOSX10.4u.sdk/
393 # UNIVERSAL_ARCH can be optionally specified to be a list of architectures
394 # to build for, e.g. UNIVERSAL_ARCH="i386 ppc ppc64". This defaults to
397 ifndef UNIVERSAL_ARCH
398 UNIVERSAL_ARCH := i386 ppc
400 UNIVERSAL_ARCH_OPTIONS := $(UNIVERSAL_ARCH:%=-arch %)
401 CompileCommonOpts += $(UNIVERSAL_ARCH_OPTIONS)
402 Relink.Flags := $(UNIVERSAL_ARCH_OPTIONS:%=-XCClinker %)
403 ifdef UNIVERSAL_SDK_PATH
404 CompileCommonOpts += -isysroot $(UNIVERSAL_SDK_PATH)
405 Relink.Flags += -XCClinker -isysroot -XCClinker $(UNIVERSAL_SDK_PATH)
408 # Building universal cannot compute dependencies automatically.
409 DISABLE_AUTO_DEPENDENCIES=1
412 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
413 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
414 # All -I flags should go here, so that they don't confuse llvm-config.
415 CPP.Flags += -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
416 -I$(PROJ_OBJ_ROOT)/include \
417 -I$(PROJ_SRC_ROOT)/include \
418 -I$(LLVM_OBJ_ROOT)/include \
419 -I$(LLVM_SRC_ROOT)/include \
422 Compile.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -c $(C.Flags)
423 LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C)
424 BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
426 Preprocess.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -E $(C.Flags)
428 Compile.CXX = $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c
429 LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX)
430 BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
432 Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -E
433 Link = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) \
435 LTLink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(Link)
436 Relink = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) \
438 LTRelink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(Relink)
439 LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
441 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
442 ScriptInstall = $(INSTALL) -m 0755
443 DataInstall = $(INSTALL) -m 0644
444 TableGen = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include \
445 -I $(PROJ_SRC_ROOT)/lib/Target
446 Archive = $(AR) $(AR.Flags)
447 LArchive = $(LLVMToolDir)/llvm-ar rcsf
454 #----------------------------------------------------------
455 # Get the list of source files and compute object file
457 #----------------------------------------------------------
460 Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \
461 $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c $(PROJ_SRC_DIR)/*.y \
462 $(PROJ_SRC_DIR)/*.l))
464 Sources := $(SOURCES)
468 Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES))
471 BaseNameSources := $(sort $(basename $(Sources)))
473 ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
474 ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo)
475 ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
477 ###############################################################################
478 # DIRECTORIES: Handle recursive descent of directory structure
479 ###############################################################################
481 #---------------------------------------------------------
482 # Provide rules to make install dirs. This must be early
483 # in the file so they get built before dependencies
484 #---------------------------------------------------------
486 $(PROJ_bindir): $(PROJ_bindir)/.dir
487 $(PROJ_libdir): $(PROJ_libdir)/.dir
488 $(PROJ_includedir): $(PROJ_includedir)/.dir
489 $(PROJ_etcdir): $(PROJ_etcdir)/.dir
491 # To create other directories, as needed, and timestamp their creation
493 $(Verb) $(MKDIR) $* > /dev/null
496 .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
497 .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
499 #---------------------------------------------------------
500 # Handle the DIRS options for sequential construction
501 #---------------------------------------------------------
507 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
508 $(RecursiveTargets)::
509 $(Verb) for dir in $(DIRS); do \
510 if [ ! -f $$dir/Makefile ]; then \
512 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
514 ($(MAKE) -C $$dir $@ ) || exit 1; \
517 $(RecursiveTargets)::
518 $(Verb) for dir in $(DIRS); do \
519 ($(MAKE) -C $$dir $@ ) || exit 1; \
525 #---------------------------------------------------------
526 # Handle the EXPERIMENTAL_DIRS options ensuring success
527 # after each directory is built.
528 #---------------------------------------------------------
529 ifdef EXPERIMENTAL_DIRS
530 $(RecursiveTargets)::
531 $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
532 if [ ! -f $$dir/Makefile ]; then \
534 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
536 ($(MAKE) -C $$dir $@ ) || exit 0; \
540 #-----------------------------------------------------------
541 # Handle the PARALLEL_DIRS options for parallel construction
542 #-----------------------------------------------------------
545 SubDirs += $(PARALLEL_DIRS)
547 # Unfortunately, this list must be maintained if new recursive targets are added
548 all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS))
549 clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS))
550 clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
551 install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS))
552 uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
553 install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS))
555 ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
558 $(Verb) if [ ! -f $(@D)/Makefile ]; then \
560 $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
562 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) ;
565 #---------------------------------------------------------
566 # Handle the OPTIONAL_DIRS options for directores that may
568 #---------------------------------------------------------
571 SubDirs += $(OPTIONAL_DIRS)
573 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
574 $(RecursiveTargets)::
575 $(Verb) for dir in $(OPTIONAL_DIRS); do \
576 if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
577 if [ ! -f $$dir/Makefile ]; then \
579 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
581 ($(MAKE) -C$$dir $@ ) || exit 1; \
585 $(RecursiveTargets)::
586 $(Verb) for dir in $(OPTIONAL_DIRS); do \
587 ($(MAKE) -C$$dir $@ ) || exit 1; \
592 #---------------------------------------------------------
593 # Handle the CONFIG_FILES options
594 #---------------------------------------------------------
597 install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
598 $(Echo) Installing Configuration Files To $(PROJ_etcdir)
599 $(Verb)for file in $(CONFIG_FILES); do \
600 if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
601 $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
602 elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
603 $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
605 $(ECHO) Error: cannot find config file $${file}. ; \
610 $(Echo) Uninstalling Configuration Files From $(PROJ_etcdir)
611 $(Verb)for file in $(CONFIG_FILES); do \
612 $(RM) -f $(PROJ_etcdir)/$${file} ; \
617 ###############################################################################
618 # Set up variables for building libararies
619 ###############################################################################
621 #---------------------------------------------------------
622 # Handle the special "JIT" value for LLVM_LIBS which is a
623 # shorthand for a bunch of libraries that get the correct
624 # JIT support for a library or a tool that runs JIT.
625 #---------------------------------------------------------
626 ifeq ($(firstword $(LLVMLIBS)),config)
627 LLVM_CONFIG := $(LLVM_SRC_ROOT)/utils/llvm-config/llvm-config
628 LLVMLIBS := $(shell $(LLVM_CONFIG) --libnames $(wordlist 2,9999,$(LLVMLIBS)))
629 LLVMLIBS := $(patsubst lib%.a,%.a,$(LLVMLIBS))
630 LLVMLIBS := $(patsubst %.o,%,$(LLVMLIBS))
633 ifeq ($(LLVMLIBS),JIT)
635 # Make sure we can get our own symbols in the tool
638 # Generic JIT libraries
639 JIT_LIBS := LLVMInterpreter LLVMJIT LLVMSelectionDAG.a LLVMCodeGen.a \
642 # You can enable the X86 JIT on a non-X86 host by setting the flag
643 # ENABLE_X86_JIT on the make command line. If not, it will still be
644 # enabled automagically on an X86 host.
649 # What the X86 JIT requires
654 # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
655 # ENABLE_PPC_JIT on the make command line. If not, it will still be
656 # enabled automagically on an PowerPC host.
657 ifeq ($(ARCH), PowerPC)
661 # What the PowerPC JIT requires
663 JIT_LIBS += LLVMPowerPC
666 # You can enable the Alpha JIT on a non-Alpha host by setting the flag
667 # ENABLE_ALPHA_JIT on the make command line. If not, it will still be
668 # enabled automagically on an Alpha host.
669 ifeq ($(ARCH), Alpha)
673 # What the Alpha JIT requires
674 ifdef ENABLE_ALPHA_JIT
675 JIT_LIBS += LLVMAlpha
678 LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \
679 LLVMBCReader.a LLVMTarget.a LLVMCore.a LLVMSupport.a LLVMbzip2.a \
680 LLVMSystem.a $(PLATFORMLIBDL)
683 #---------------------------------------------------------
684 # Define various command line options pertaining to the
685 # libraries needed when linking. There are "Proj" libs
686 # (defined by the user's project) and "LLVM" libs (defined
687 # by the # LLVM project).
688 #---------------------------------------------------------
690 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
691 ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions))
692 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
693 LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions))
694 ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
695 LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS)))
696 ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs))
697 LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs))
699 ###############################################################################
700 # Library Build Rules: Four ways to build a library
701 ###############################################################################
703 #---------------------------------------------------------
704 # Bytecode Module Targets:
705 # If the user set MODULE_NAME then they want to build a
706 # bytecode module from the sources. We compile all the
707 # sources and link it together into a single bytecode
709 #---------------------------------------------------------
712 ifeq ($(strip $(LLVMGCC)),)
713 $(warning Modules require llvm-gcc but no llvm-gcc is available ****)
716 Module := $(LibDir)/$(MODULE_NAME).bc
717 LinkModule := $(GCCLD) -L$(CFERuntimeLibDir)
720 ifdef EXPORTED_SYMBOL_FILE
721 LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
724 $(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD)
725 $(Echo) Building $(BuildMode) Bytecode Module $(notdir $@)
726 $(Verb) $(LinkModule) -o $@ $(ObjectsBC)
728 all-local:: $(Module)
731 ifneq ($(strip $(Module)),)
732 -$(Verb) $(RM) -f $(Module)
735 ifdef BYTECODE_DESTINATION
736 ModuleDestDir := $(BYTECODE_DESTINATION)
738 ModuleDestDir := $(PROJ_libdir)
741 DestModule := $(ModuleDestDir)/$(MODULE_NAME).bc
743 install-module:: $(DestModule)
744 install-local:: $(DestModule)
746 $(DestModule): $(ModuleDestDir) $(Module)
747 $(Echo) Installing $(BuildMode) Bytecode Module $(DestModule)
748 $(Verb) $(DataInstall) $(Module) $(DestModule)
751 $(Echo) Uninstalling $(BuildMode) Bytecode Module $(DestModule)
752 -$(Verb) $(RM) -f $(DestModule)
757 # if we're building a library ...
760 # Make sure there isn't any extranous whitespace on the LIBRARYNAME option
761 LIBRARYNAME := $(strip $(LIBRARYNAME))
762 ifdef LOADABLE_MODULE
763 LibName.LA := $(LibDir)/$(LIBRARYNAME).la
765 LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la
767 LibName.A := $(LibDir)/lib$(LIBRARYNAME).a
768 LibName.O := $(LibDir)/$(LIBRARYNAME).o
769 LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca
771 #---------------------------------------------------------
772 # Shared Library Targets:
773 # If the user asked for a shared library to be built
774 # with the SHARED_LIBRARY variable, then we provide
775 # targets for building them.
776 #---------------------------------------------------------
779 all-local:: $(LibName.LA)
781 ifdef LINK_LIBS_IN_SHARED
782 ifdef LOADABLE_MODULE
783 SharedLibKindMessage := "Lodable Module"
785 SharedLibKindMessage := "Shared Library"
787 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
788 $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \
789 $(LIBRARYNAME)$(SHLIBEXT)
790 $(Verb) $(LTLink) -o $@ $(ObjectsLO) $(ProjLibsOptions) \
792 $(Verb) $(LTInstall) $@ $(LibDir)
794 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
795 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
796 $(Verb) $(LTLink) -o $@ $(ObjectsLO)
797 $(Verb) $(LTInstall) $@ $(LibDir)
801 ifneq ($(strip $(LibName.LA)),)
802 -$(Verb) $(RM) -f $(LibName.LA)
805 DestSharedLib = $(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
807 install-local:: $(DestSharedLib)
809 $(DestSharedLib): $(PROJ_libdir) $(LibName.LA)
810 $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
811 $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
812 $(Verb) $(LIBTOOL) --finish $(PROJ_libdir)
815 $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
816 -$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
820 #---------------------------------------------------------
821 # Bytecode Library Targets:
822 # If the user asked for a bytecode library to be built
823 # with the BYTECODE_LIBRARY variable, then we provide
824 # targets for building them.
825 #---------------------------------------------------------
826 ifdef BYTECODE_LIBRARY
827 ifeq ($(strip $(LLVMGCC)),)
828 $(warning Bytecode libraries require llvm-gcc which could not be found ****)
831 all-local:: $(LibName.BCA)
833 ifdef EXPORTED_SYMBOL_FILE
834 BCLinkLib = $(GCCLD) -L$(CFERuntimeLibDir) \
835 -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
837 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \
838 $(LLVMToolDir)/llvm-ar
839 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \
841 $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC)
843 $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o
845 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir \
846 $(LLVMToolDir)/llvm-ar
847 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@)
849 $(Verb) $(LArchive) $@ $(ObjectsBC)
854 ifneq ($(strip $(LibName.BCA)),)
855 -$(Verb) $(RM) -f $(LibName.BCA)
858 ifdef BYTECODE_DESTINATION
859 BytecodeDestDir := $(BYTECODE_DESTINATION)
861 BytecodeDestDir := $(PROJ_libdir)
864 DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).a
866 install-bytecode-local:: $(DestBytecodeLib)
868 install-local:: $(DestBytecodeLib)
870 $(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
871 $(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib)
872 $(Verb) $(DataInstall) $(LibName.BCA) $(DestBytecodeLib)
875 $(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib)
876 -$(Verb) $(RM) -f $(DestBytecodeLib)
881 #---------------------------------------------------------
882 # ReLinked Library Targets:
883 # If the user explicitly requests a relinked library with
884 # BUILD_RELINKED, provide it. Otherwise, if they specify
885 # neither of BUILD_ARCHIVE or DONT_BUILD_RELINKED, give
887 #---------------------------------------------------------
889 ifndef DONT_BUILD_RELINKED
896 all-local:: $(LibName.O)
898 $(LibName.O): $(ObjectsO) $(LibDir)/.dir
899 $(Echo) Linking $(BuildMode) Object Library $(notdir $@)
900 $(Verb) $(LTRelink) -o $@ $(ObjectsO)
903 ifneq ($(strip $(LibName.O)),)
904 -$(Verb) $(RM) -f $(LibName.O)
907 DestRelinkedLib = $(PROJ_libdir)/$(LIBRARYNAME).o
909 install-local:: $(DestRelinkedLib)
911 $(DestRelinkedLib): $(PROJ_libdir) $(LibName.O)
912 $(Echo) Installing $(BuildMode) Object Library $(DestRelinkedLib)
913 $(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib)
916 $(Echo) Uninstalling $(BuildMode) Object Library $(DestRelinkedLib)
917 -$(Verb) $(RM) -f $(DestRelinkedLib)
921 #---------------------------------------------------------
922 # Archive Library Targets:
923 # If the user wanted a regular archive library built,
924 # then we provide targets for building them.
925 #---------------------------------------------------------
928 all-local:: $(LibName.A)
930 $(LibName.A): $(ObjectsO) $(LibDir)/.dir
931 $(Echo) Building $(BuildMode) Archive Library $(notdir $@)
933 $(Verb) $(Archive) $@ $(ObjectsO)
937 ifneq ($(strip $(LibName.A)),)
938 -$(Verb) $(RM) -f $(LibName.A)
941 DestArchiveLib := $(PROJ_libdir)/lib$(LIBRARYNAME).a
943 install-local:: $(DestArchiveLib)
945 $(DestArchiveLib): $(PROJ_libdir) $(LibName.A)
946 $(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
947 $(Verb) $(MKDIR) $(PROJ_libdir)
948 $(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib)
951 $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
952 -$(Verb) $(RM) -f $(DestArchiveLib)
959 ###############################################################################
960 # Tool Build Rules: Build executable tool based on TOOLNAME option
961 ###############################################################################
965 #---------------------------------------------------------
966 # Set up variables for building a tool.
967 #---------------------------------------------------------
969 ToolBuildPath := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT)
971 ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
974 #---------------------------------------------------------
975 # Tell make that we need to rebuild subdirectories before
976 # we can link the tool. This affects things like LLI which
977 # has library subdirectories.
978 #---------------------------------------------------------
979 $(ToolBuildPath): $(addsuffix /.makeall, $(PARALLEL_DIRS))
981 #---------------------------------------------------------
982 # Provide targets for building the tools
983 #---------------------------------------------------------
984 all-local:: $(ToolBuildPath)
987 ifneq ($(strip $(ToolBuildPath)),)
988 -$(Verb) $(RM) -f $(ToolBuildPath)
992 $(ToolBuildPath): $(ExmplDir)/.dir
994 $(ToolBuildPath): $(ToolDir)/.dir
997 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
998 $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
999 $(Verb) $(LTLink) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
1000 $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
1001 $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
1004 DestTool = $(PROJ_bindir)/$(TOOLNAME)
1006 install-local:: $(DestTool)
1008 $(DestTool): $(PROJ_bindir) $(ToolBuildPath)
1009 $(Echo) Installing $(BuildMode) $(DestTool)
1010 $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
1013 $(Echo) Uninstalling $(BuildMode) $(DestTool)
1014 -$(Verb) $(RM) -f $(DestTool)
1018 ###############################################################################
1019 # Object Build Rules: Build object files based on sources
1020 ###############################################################################
1022 # FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
1024 DISABLE_AUTO_DEPENDENCIES=1
1027 ifdef SHARED_LIBRARY
1029 MAYBE_PIC_Compile.CXX = $(LTCompile.CXX)
1030 MAYBE_PIC_Compile.C = $(LTCompile.C)
1032 MAYBE_PIC_Compile.CXX = $(Compile.CXX)
1033 MAYBE_PIC_Compile.C = $(Compile.C)
1036 # Provide rule sets for when dependency generation is enabled
1037 ifndef DISABLE_AUTO_DEPENDENCIES
1039 #---------------------------------------------------------
1040 # Create .lo files in the ObjDir directory from the .cpp and .c files...
1041 #---------------------------------------------------------
1043 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1044 $(Echo) "Compiling $*.cpp for $(BuildMode) build " $(PIC_FLAG)
1045 $(Verb) if $(MAYBE_PIC_Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
1046 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
1047 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
1049 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1050 $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG)
1051 $(Verb) if $(MAYBE_PIC_Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
1052 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
1053 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
1055 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1056 $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG)
1057 $(Verb) if $(MAYBE_PIC_Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
1058 then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \
1059 else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi
1061 #---------------------------------------------------------
1062 # Create .bc files in the ObjDir directory from .cpp .cc and .c files...
1063 #---------------------------------------------------------
1065 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1066 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1067 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1068 $< -o $@ -S -emit-llvm ; \
1069 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1070 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1072 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1073 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1074 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1075 $< -o $@ -S -emit-llvm ; \
1076 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1077 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1079 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1080 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1081 $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" \
1082 $< -o $@ -S -emit-llvm ; \
1083 then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
1084 else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
1086 # Provide alternate rule sets if dependencies are disabled
1089 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1090 $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG)
1091 $(MAYBE_PIC_Compile.CXX) $< -o $@
1093 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1094 $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG)
1095 $(MAYBE_PIC_Compile.CXX) $< -o $@
1097 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1098 $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG)
1099 $(MAYBE_PIC_Compile.C) $< -o $@
1101 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1102 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1103 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1105 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1106 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1107 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1109 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1110 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1111 $(BCCompile.C) $< -o $@ -S -emit-llvm
1116 ## Rules for building preprocessed (.i/.ii) outputs.
1117 $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1118 $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file"
1119 $(Verb) $(Preprocess.CXX) $< -o $@
1121 $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1122 $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file"
1123 $(Verb) $(Preprocess.CXX) $< -o $@
1125 $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1126 $(Echo) "Compiling $*.c for $(BuildMode) build to .i file"
1127 $(Verb) $(Preprocess.C) $< -o $@
1130 $(ObjDir)/%.s: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1131 $(Echo) "Compiling $*.cpp to asm for $(BuildMode) build" $(PIC_FLAG)
1132 $(MAYBE_PIC_Compile.CXX) $< -o $@ -S
1134 $(ObjDir)/%.s: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1135 $(Echo) "Compiling $*.cc to asm for $(BuildMode) build" $(PIC_FLAG)
1136 $(MAYBE_PIC_Compile.CXX) $< -o $@ -S
1138 $(ObjDir)/%.s: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1139 $(Echo) "Compiling $*.c to asm for $(BuildMode) build" $(PIC_FLAG)
1140 $(MAYBE_PIC_Compile.C) $< -o $@ -S
1143 # make the C and C++ compilers strip debug info out of bytecode libraries.
1145 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1146 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1147 $(Verb) $(GCCAS) $< -o $@
1149 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1150 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1151 $(Verb) $(GCCAS) -strip-debug $< -o $@
1155 #---------------------------------------------------------
1156 # Provide rule to build .bc files from .ll sources,
1157 # regardless of dependencies
1158 #---------------------------------------------------------
1159 $(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS)
1160 $(Echo) "Compiling $*.ll for $(BuildMode) build"
1161 $(Verb) $(LLVMAS) $< -f -o $@
1163 ###############################################################################
1164 # TABLEGEN: Provide rules for running tblgen to produce *.inc files
1165 ###############################################################################
1169 TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \
1170 $(LLVM_SRC_ROOT)/lib/Target/Target.td \
1171 $(LLVM_SRC_ROOT)/lib/Target/TargetSelectionDAG.td \
1172 $(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td)
1173 INCFiles := $(filter %.inc,$(BUILT_SOURCES))
1174 INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
1175 .PRECIOUS: $(INCTMPFiles) $(INCFiles)
1177 # All of these files depend on tblgen and the .td files.
1178 $(INCTMPFiles) : $(TBLGEN) $(TDFiles)
1180 # INCFiles rule: All of the tblgen generated files are emitted to
1181 # $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows
1182 # us to only "touch" the real file if the contents of it change. IOW, if
1183 # tblgen is modified, all of the .inc.tmp files are regereated, but no
1184 # dependencies of the .inc files are, unless the contents of the .inc file
1186 $(INCFiles) : %.inc : $(ObjDir)/%.inc.tmp
1187 $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
1189 $(TARGET:%=$(ObjDir)/%GenRegisterNames.inc.tmp): \
1190 $(ObjDir)/%GenRegisterNames.inc.tmp : %.td $(ObjDir)/.dir
1191 $(Echo) "Building $(<F) register names with tblgen"
1192 $(Verb) $(TableGen) -gen-register-enums -o $@ $<
1194 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.h.inc.tmp): \
1195 $(ObjDir)/%GenRegisterInfo.h.inc.tmp : %.td $(ObjDir)/.dir
1196 $(Echo) "Building $(<F) register information header with tblgen"
1197 $(Verb) $(TableGen) -gen-register-desc-header -o $@ $<
1199 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.inc.tmp): \
1200 $(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir
1201 $(Echo) "Building $(<F) register info implementation with tblgen"
1202 $(Verb) $(TableGen) -gen-register-desc -o $@ $<
1204 $(TARGET:%=$(ObjDir)/%GenInstrNames.inc.tmp): \
1205 $(ObjDir)/%GenInstrNames.inc.tmp : %.td $(ObjDir)/.dir
1206 $(Echo) "Building $(<F) instruction names with tblgen"
1207 $(Verb) $(TableGen) -gen-instr-enums -o $@ $<
1209 $(TARGET:%=$(ObjDir)/%GenInstrInfo.inc.tmp): \
1210 $(ObjDir)/%GenInstrInfo.inc.tmp : %.td $(ObjDir)/.dir
1211 $(Echo) "Building $(<F) instruction information with tblgen"
1212 $(Verb) $(TableGen) -gen-instr-desc -o $@ $<
1214 $(TARGET:%=$(ObjDir)/%GenAsmWriter.inc.tmp): \
1215 $(ObjDir)/%GenAsmWriter.inc.tmp : %.td $(ObjDir)/.dir
1216 $(Echo) "Building $(<F) assembly writer with tblgen"
1217 $(Verb) $(TableGen) -gen-asm-writer -o $@ $<
1219 $(TARGET:%=$(ObjDir)/%GenAsmWriter1.inc.tmp): \
1220 $(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir
1221 $(Echo) "Building $(<F) assembly writer #1 with tblgen"
1222 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
1224 $(TARGET:%=$(ObjDir)/%GenCodeEmitter.inc.tmp): \
1225 $(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir
1226 $(Echo) "Building $(<F) code emitter with tblgen"
1227 $(Verb) $(TableGen) -gen-emitter -o $@ $<
1229 $(TARGET:%=$(ObjDir)/%GenDAGISel.inc.tmp): \
1230 $(ObjDir)/%GenDAGISel.inc.tmp : %.td $(ObjDir)/.dir
1231 $(Echo) "Building $(<F) instruction selector implementation with tblgen"
1232 $(Verb) $(TableGen) -gen-dag-isel -o $@ $<
1234 $(TARGET:%=$(ObjDir)/%GenSubtarget.inc.tmp): \
1235 $(ObjDir)/%GenSubtarget.inc.tmp : %.td $(ObjDir)/.dir
1236 $(Echo) "Building $(<F) subtarget information with tblgen"
1237 $(Verb) $(TableGen) -gen-subtarget -o $@ $<
1240 -$(Verb) $(RM) -f $(INCFiles)
1244 ###############################################################################
1245 # LEX AND YACC: Provide rules for generating sources with lex and yacc
1246 ###############################################################################
1248 #---------------------------------------------------------
1249 # Provide rules for generating a .cpp source file from
1250 # (f)lex input sources.
1251 #---------------------------------------------------------
1253 LexFiles := $(filter %.l,$(Sources))
1255 ifneq ($(LexFiles),)
1257 # Cancel built-in rules for lex
1261 all:: $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs)
1263 # Note the extra sed filtering here, used to cut down on the warnings emited
1264 # by GCC. The last line is a gross hack to work around flex aparently not
1265 # being able to resize the buffer on a large token input. Currently, for
1266 # uninitialized string buffers in LLVM we can generate very long tokens, so
1267 # this is a hack around it.
1268 # FIXME. (f.e. char Buffer[10000] )
1269 $(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
1270 $(Echo) Flexing $*.l
1271 $(Verb) $(FLEX) -t $(PROJ_SRC_DIR)/$*.l | \
1272 $(SED) 's/void yyunput/inline void yyunput/' | \
1273 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
1274 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
1275 > $(PROJ_SRC_DIR)/$*.cpp
1277 # IFF the .l file has changed since it was last checked into CVS, copy the .l
1278 # file to .l.cvs and the generated .cpp file to .cpp.cvs. We use this mechanism
1279 # so that people without flex can build LLVM by copying the .cvs files to the
1280 # source location and building them.
1281 $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1282 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1283 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
1284 ($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)
1286 $(LexFiles:%.l=$(ObjDir)/%.o) : \
1287 $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1290 -$(Verb) $(RM) -f $(LexOutput)
1294 #---------------------------------------------------------
1295 # Provide rules for generating a .cpp and .h source files
1296 # from yacc (bison) input sources.
1297 #---------------------------------------------------------
1299 YaccFiles := $(filter %.y,$(Sources))
1300 ifneq ($(YaccFiles),)
1302 .PRECIOUS: $(YaccOutput)
1304 all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
1306 # Cancel built-in rules for yacc
1311 # Rule for building the bison based parsers...
1312 $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
1313 $(Echo) "Bisoning $*.y"
1314 $(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
1315 $(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
1316 $(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
1318 # IFF the .y file has changed since it was last checked into CVS, copy the .y
1319 # file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs. We use this
1320 # mechanism so that people without flex can build LLVM by copying the .cvs files
1321 # to the source location and building them.
1322 $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1323 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1324 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs || \
1326 $(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
1327 $(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
1330 $(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1332 YaccOutput := $(YaccFiles:%.y=%.output)
1335 -$(Verb) $(RM) -f $(YaccOutput)
1338 ###############################################################################
1339 # OTHER RULES: Other rules needed
1340 ###############################################################################
1342 # To create postscript files from dot files...
1343 ifneq ($(DOT),false)
1345 $(DOT) -Tps < $< > $@
1348 $(Echo) "Cannot build $@: The program dot is not installed"
1351 # This rules ensures that header files that are removed still have a rule for
1352 # which they can be "generated." This allows make to ignore them and
1353 # reproduce the dependency lists.
1357 # Define clean-local to clean the current directory. Note that this uses a
1358 # very conservative approach ensuring that empty variables do not cause
1359 # errors or disastrous removal.
1361 ifneq ($(strip $(ObjDir)),)
1362 -$(Verb) $(RM) -rf $(ObjDir)
1364 -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
1365 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
1366 -$(Verb) $(RM) -f *$(SHLIBEXT)
1370 -$(Verb) $(RM) -rf Debug Release Profile
1372 # Build tags database for Emacs/Xemacs:
1376 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1377 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1378 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1379 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1380 -name '*.cpp' -o -name '*.h' | \
1381 $(ETAGS) $(ETAGSFLAGS) -
1384 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1385 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1386 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1387 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1388 \( -name '*.cpp' -o -name '*.h' \) -print | \
1389 ctags -ImtT -o $(PROJ_OBJ_ROOT)/CTAGS -L -
1392 ###############################################################################
1393 # DEPENDENCIES: Include the dependency files if we should
1394 ###############################################################################
1395 ifndef DISABLE_AUTO_DEPENDENCIES
1397 # If its not one of the cleaning targets
1398 ifneq ($strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),)
1400 # Get the list of dependency files
1401 DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources)))
1402 DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d)
1404 -include /dev/null $(DependFiles)
1410 ###############################################################################
1411 # CHECK: Running the test suite
1412 ###############################################################################
1415 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1416 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1417 $(EchoCmd) Running test suite ; \
1418 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local \
1419 TESTSUITE=$(TESTSUITE) ; \
1421 $(EchoCmd) No Makefile in test directory ; \
1424 $(EchoCmd) No test directory ; \
1427 ###############################################################################
1428 # DISTRIBUTION: Handle construction of a distribution tarball
1429 ###############################################################################
1431 #------------------------------------------------------------------------
1432 # Define distribution related variables
1433 #------------------------------------------------------------------------
1434 DistName := $(PROJECT_NAME)-$(PROJ_VERSION)
1435 DistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1436 TopDistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1437 DistTarGZip := $(PROJ_OBJ_ROOT)/$(DistName).tar.gz
1438 DistZip := $(PROJ_OBJ_ROOT)/$(DistName).zip
1439 DistTarBZ2 := $(PROJ_OBJ_ROOT)/$(DistName).tar.bz2
1440 DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \
1441 ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
1442 Makefile.config.in configure autoconf
1443 DistOther := $(notdir $(wildcard \
1444 $(PROJ_SRC_DIR)/*.h \
1445 $(PROJ_SRC_DIR)/*.td \
1446 $(PROJ_SRC_DIR)/*.def \
1447 $(PROJ_SRC_DIR)/*.ll \
1448 $(PROJ_SRC_DIR)/*.in))
1449 DistSubDirs := $(SubDirs)
1450 DistSources = $(Sources) $(EXTRA_DIST)
1451 DistFiles = $(DistAlways) $(DistSources) $(DistOther)
1453 #------------------------------------------------------------------------
1454 # We MUST build distribution with OBJ_DIR != SRC_DIR
1455 #------------------------------------------------------------------------
1456 ifeq ($(PROJ_SRC_DIR),$(PROJ_OBJ_DIR))
1457 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1458 $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
1462 #------------------------------------------------------------------------
1463 # Prevent attempt to run dist targets from anywhere but the top level
1464 #------------------------------------------------------------------------
1466 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1467 $(Echo) ERROR: You must run $@ from $(PROJ_OBJ_ROOT)
1470 #------------------------------------------------------------------------
1471 # Provide the top level targets
1472 #------------------------------------------------------------------------
1474 dist-gzip:: $(DistTarGZip)
1476 $(DistTarGZip) : $(TopDistDir)/.makedistdir
1477 $(Echo) Packing gzipped distribution tar file.
1478 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \
1479 $(GZIP) -c > "$(DistTarGZip)"
1481 dist-bzip2:: $(DistTarBZ2)
1483 $(DistTarBZ2) : $(TopDistDir)/.makedistdir
1484 $(Echo) Packing bzipped distribution tar file.
1485 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \
1486 $(BZIP2) -c >$(DistTarBZ2)
1488 dist-zip:: $(DistZip)
1490 $(DistZip) : $(TopDistDir)/.makedistdir
1491 $(Echo) Packing zipped distribution file.
1492 $(Verb) rm -f $(DistZip)
1493 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
1495 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
1496 $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
1498 DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir
1500 dist-check:: $(DistTarGZip)
1501 $(Echo) Checking distribution tar file.
1502 $(Verb) if test -d $(DistCheckDir) ; then \
1503 $(RM) -rf $(DistCheckDir) ; \
1505 $(Verb) $(MKDIR) $(DistCheckDir)
1506 $(Verb) cd $(DistCheckDir) && \
1507 $(MKDIR) $(DistCheckDir)/build && \
1508 $(MKDIR) $(DistCheckDir)/install && \
1509 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
1511 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
1512 --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
1515 $(MAKE) install && \
1516 $(MAKE) uninstall && \
1517 $(MAKE) dist-clean && \
1518 $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution =====
1521 $(Echo) Cleaning distribution files
1522 -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \
1527 #------------------------------------------------------------------------
1528 # Provide the recursive distdir target for building the distribution directory
1529 #------------------------------------------------------------------------
1530 distdir: $(DistDir)/.makedistdir
1531 $(DistDir)/.makedistdir: $(DistSources)
1532 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1533 if test -d "$(DistDir)" ; then \
1534 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
1537 $(EchoCmd) Removing old $(DistDir) ; \
1538 $(RM) -rf $(DistDir); \
1539 $(EchoCmd) Making 'all' to verify build ; \
1540 $(MAKE) ENABLE_OPTIMIZED=1 all ; \
1542 $(Echo) Building Distribution Directory $(DistDir)
1543 $(Verb) $(MKDIR) $(DistDir)
1544 $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \
1545 srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \
1546 for file in $(DistFiles) ; do \
1548 $(PROJ_SRC_DIR)/*) \
1549 file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \
1551 $(PROJ_SRC_ROOT)/*) \
1552 file=`echo "$$file" | \
1553 sed "s#^$$srcrootstrip/##"` \
1556 if test -f "$(PROJ_SRC_DIR)/$$file" || \
1557 test -d "$(PROJ_SRC_DIR)/$$file" ; then \
1558 from_dir="$(PROJ_SRC_DIR)" ; \
1559 elif test -f "$$file" || test -d "$$file" ; then \
1562 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \
1563 if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \
1564 to_dir="$(DistDir)/$$dir"; \
1565 $(MKDIR) "$$to_dir" ; \
1567 to_dir="$(DistDir)"; \
1569 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
1570 if test -n "$$mid_dir" ; then \
1571 $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
1573 if test -d "$$from_dir/$$file"; then \
1574 if test -d "$(PROJ_SRC_DIR)/$$file" && \
1575 test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \
1576 cd $(PROJ_SRC_DIR) ; \
1577 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1578 ( cd $$to_dir ; $(TAR) xf - ) ; \
1579 cd $(PROJ_OBJ_DIR) ; \
1582 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1583 ( cd $$to_dir ; $(TAR) xf - ) ; \
1584 cd $(PROJ_OBJ_DIR) ; \
1586 elif test -f "$$from_dir/$$file" ; then \
1587 $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
1588 elif test -L "$$from_dir/$$file" ; then \
1589 $(CP) -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
1590 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
1591 $(EchoCmd) "===== WARNING: Distribution Source " \
1592 "$$from_dir/$$file Not Found!" ; \
1593 elif test "$(Verb)" != '@' ; then \
1594 $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \
1597 $(Verb) for subdir in $(DistSubDirs) ; do \
1598 if test "$$subdir" \!= "." ; then \
1599 new_distdir="$(DistDir)/$$subdir" ; \
1600 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
1601 ( cd $$subdir && $(MAKE) ENABLE_OPTIMIZED=1 \
1602 DistDir="$$new_distdir" distdir ) || exit 1; \
1605 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1606 $(EchoCmd) Eliminating CVS/.svn directories from distribution ; \
1607 $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o \
1608 -name .svn \) -print` ;\
1609 $(MAKE) dist-hook ; \
1610 $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \
1611 -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \
1612 -o ! -type d ! -perm -400 -exec chmod a+r {} \; \
1613 -o ! -type d ! -perm -444 -exec \
1614 $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
1615 || chmod -R a+r $(DistDir) ; \
1618 # This is invoked by distdir target, define it as a no-op to avoid errors if not
1624 ###############################################################################
1625 # TOP LEVEL - targets only to apply at the top level directory
1626 ###############################################################################
1630 #------------------------------------------------------------------------
1631 # Install support for the project's include files:
1632 #------------------------------------------------------------------------
1634 $(Echo) Installing include files
1635 $(Verb) $(MKDIR) $(PROJ_includedir)
1636 $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
1637 cd $(PROJ_SRC_ROOT)/include && \
1638 for hdr in `find . -type f '!' '(' -name '*~' -o -name '.cvsignore' \
1639 -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS ` ; do \
1640 instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
1641 if test \! -d "$$instdir" ; then \
1642 $(EchoCmd) Making install directory $$instdir ; \
1643 $(MKDIR) $$instdir ;\
1645 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1648 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
1649 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
1650 cd $(PROJ_OBJ_ROOT)/include && \
1651 for hdr in `find . -type f -print | grep -v CVS` ; do \
1652 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1658 $(Echo) Uninstalling include files
1659 $(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
1660 cd $(PROJ_SRC_ROOT)/include && \
1661 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
1662 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' \
1663 -o -name '*.in' ')' -print ')' | \
1664 grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
1665 cd $(PROJ_SRC_ROOT)/include && \
1666 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
1667 -print ')' | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
1672 #------------------------------------------------------------------------
1673 # Print out the directories used for building
1674 #------------------------------------------------------------------------
1676 $(Echo) "BuildMode : " '$(BuildMode)'
1677 $(Echo) "PROJ_SRC_ROOT: " '$(PROJ_SRC_ROOT)'
1678 $(Echo) "PROJ_SRC_DIR : " '$(PROJ_SRC_DIR)'
1679 $(Echo) "PROJ_OBJ_ROOT: " '$(PROJ_OBJ_ROOT)'
1680 $(Echo) "PROJ_OBJ_DIR : " '$(PROJ_OBJ_DIR)'
1681 $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
1682 $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
1683 $(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
1684 $(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
1685 $(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
1686 $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
1687 $(Echo) "PROJ_includedir : " '$(PROJ_includedir)'
1688 $(Echo) "UserTargets : " '$(UserTargets)'
1689 $(Echo) "ObjMakefiles : " '$(ObjMakefiles)'
1690 $(Echo) "SrcMakefiles : " '$(SrcMakefiles)'
1691 $(Echo) "ObjDir : " '$(ObjDir)'
1692 $(Echo) "LibDir : " '$(LibDir)'
1693 $(Echo) "ToolDir : " '$(ToolDir)'
1694 $(Echo) "ExmplDir : " '$(ExmplDir)'
1695 $(Echo) "Sources : " '$(Sources)'
1696 $(Echo) "TDFiles : " '$(TDFiles)'
1697 $(Echo) "INCFiles : " '$(INCFiles)'
1698 $(Echo) "INCTMPFiles : " '$(INCTMPFiles)'
1699 $(Echo) "PreConditions: " '$(PreConditions)'
1700 $(Echo) "Compile.CXX : " '$(Compile.CXX)'
1701 $(Echo) "Compile.C : " '$(Compile.C)'
1702 $(Echo) "Archive : " '$(Archive)'
1703 $(Echo) "YaccFiles : " '$(YaccFiles)'
1704 $(Echo) "LexFiles : " '$(LexFiles)'
1705 $(Echo) "Module : " '$(Module)'
1706 $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'
1707 $(Echo) "SubDirs : " '$(SubDirs)'