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)
77 ifneq ($(MakefileConfigIn),)
78 PreConditions += $(MakefileConfig)
81 preconditions: $(PreConditions)
83 #------------------------------------------------------------------------
84 # Make sure the BUILT_SOURCES are built first
85 #------------------------------------------------------------------------
86 $(filter-out clean clean-local,$(UserTargets)):: $(BUILT_SOURCES)
89 ifneq ($(strip $(BUILT_SOURCES)),)
90 -$(Verb) $(RM) -f $(BUILT_SOURCES)
93 ifneq ($(PROJ_OBJ_ROOT),$(PROJ_SRC_ROOT))
95 $(Verb) if test -x config.status ; then \
96 $(EchoCmd) Wiping out $(PROJ_OBJ_ROOT) ; \
97 $(MKDIR) .spotless.save ; \
98 $(MV) config.status .spotless.save ; \
99 $(MV) mklib .spotless.save ; \
100 $(MV) projects .spotless.save ; \
102 $(MV) .spotless.save/config.status . ; \
103 $(MV) .spotless.save/mklib . ; \
104 $(MV) .spotless.save/projects . ; \
105 $(RM) -rf .spotless.save ; \
106 $(EchoCmd) Rebuilding configuration of $(PROJ_OBJ_ROOT) ; \
107 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
108 $(ConfigStatusScript) ; \
110 $(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
114 $(EchoCmd) "spotless target not supported for objdir == srcdir"
117 $(BUILT_SOURCES) : $(ObjMakefiles)
119 #------------------------------------------------------------------------
120 # Make sure we're not using a stale configuration
121 #------------------------------------------------------------------------
123 $(Echo) Reconfiguring $(PROJ_OBJ_ROOT)
124 $(Verb) cd $(PROJ_OBJ_ROOT) && \
125 if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
126 $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
128 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
129 $(ConfigStatusScript)
131 .PRECIOUS: $(ConfigStatusScript)
132 $(ConfigStatusScript): $(ConfigureScript)
133 $(Echo) Reconfiguring with $<
134 $(Verb) cd $(PROJ_OBJ_ROOT) && \
135 if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
136 $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
138 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
139 $(ConfigStatusScript)
141 #------------------------------------------------------------------------
142 # Make sure the configuration makefile is up to date
143 #------------------------------------------------------------------------
144 ifneq ($(MakefileConfigIn),)
145 $(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript)
146 $(Echo) Regenerating $@
147 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config
150 ifneq ($(MakefileCommonIn),)
151 $(MakefileCommon): $(MakefileCommonIn) $(ConfigStatusScript)
152 $(Echo) Regenerating $@
153 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.common
156 #------------------------------------------------------------------------
157 # If the Makefile in the source tree has been updated, copy it over into the
158 # build tree. But, only do this if the source and object makefiles differ
159 #------------------------------------------------------------------------
160 ifneq ($(PROJ_OBJ_DIR),$(PROJ_SRC_DIR))
162 Makefile: $(PROJ_SRC_DIR)/Makefile
163 $(Echo) "Updating Makefile"
164 $(Verb) $(MKDIR) $(@D)
165 $(Verb) $(CP) -f $< $@
167 # Copy the Makefile.* files unless we're in the root directory which avoids
168 # the copying of Makefile.config.in or other things that should be explicitly
170 $(PROJ_OBJ_DIR)/Makefile% : $(PROJ_SRC_DIR)/Makefile%
172 *Makefile.rules) ;; \
174 *) $(Echo) "Updating $(@F)" ; \
181 #------------------------------------------------------------------------
182 # Set up the basic dependencies
183 #------------------------------------------------------------------------
184 $(UserTargets):: $(PreConditions)
188 clean-all:: clean-local clean-all-local
189 install:: install-local
190 uninstall:: uninstall-local
191 install-local:: all-local
192 install-bytecode:: install-bytecode-local
194 ###############################################################################
195 # VARIABLES: Set up various variables based on configuration data
196 ###############################################################################
198 #--------------------------------------------------------------------
199 # Variables derived from configuration we are building
200 #--------------------------------------------------------------------
202 # OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
203 # this can be overridden on the make command line.
205 OPTIMIZE_OPTION := -O3
207 OPTIMIZE_OPTION := -O2
210 ifdef ENABLE_PROFILING
212 CXX.Flags := $(OPTIMIZE_OPTION) -pg -g
213 C.Flags := $(OPTIMIZE_OPTION) -pg -g
214 LD.Flags := $(OPTIMIZE_OPTION) -pg -g
216 ifeq ($(ENABLE_OPTIMIZED),1)
218 # Don't use -fomit-frame-pointer on Darwin or FreeBSD.
219 ifneq ($(OS),FreeBSD)
221 OmitFramePointer := -fomit-frame-pointer
225 # Darwin requires -fstrict-aliasing to be explicitly enabled.
227 EXTRA_OPTIONS += -fstrict-aliasing
230 CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
231 C.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
232 LD.Flags := $(OPTIMIZE_OPTION)
242 # IF REQUIRES_EH=1 is specified then don't disable exceptions
244 CXX.Flags += -fno-exceptions
247 # If DISABLE_ASSERTIONS=1 is specified (make command line or configured),
248 # then disable assertions by defining the appropriate preprocessor symbols.
249 ifdef DISABLE_ASSERTIONS
250 BuildMode := $(BuildMode)-Asserts
251 CXX.Flags += -DNDEBUG
254 CXX.Flags += -D_DEBUG
258 CXX.Flags += $(CXXFLAGS) -Woverloaded-virtual
260 CPP.BaseFlags += $(CPPFLAGS)
261 LD.Flags += $(LDFLAGS)
263 LibTool.Flags := --tag=CXX
265 # Make Floating point IEEE compliant on Alpha.
267 CXX.Flags += -mieee -fPIC
268 CPP.BaseFlags += -mieee -fPIC
271 #--------------------------------------------------------------------
272 # Directory locations
273 #--------------------------------------------------------------------
274 ObjDir := $(PROJ_OBJ_DIR)/$(BuildMode)
275 LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
276 ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
277 ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
278 LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
279 LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
280 LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
281 CFERuntimeLibDir := $(LLVMGCCDIR)/lib
283 #--------------------------------------------------------------------
284 # Full Paths To Compiled Tools and Utilities
285 #--------------------------------------------------------------------
286 EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]:
289 LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
292 LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
295 ifeq ($(LLVM_CROSS_COMPILING),1)
296 TBLGEN := $(LLVMToolDir)/tblgen$(BUILD_EXEEXT)
298 TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
301 LLVM_CONFIG := $(LLVMToolDir)/llvm-config
303 GCCAS := $(LLVMToolDir)/gccas$(EXEEXT)
306 GCCLD := $(LLVMToolDir)/gccld$(EXEEXT)
309 LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
312 LLI := $(LLVMToolDir)/lli$(EXEEXT)
315 LLC := $(LLVMToolDir)/llc$(EXEEXT)
318 LOPT := $(LLVMToolDir)/opt$(EXEEXT)
321 LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT)
324 LUPGRADE := $(LLVMToolDir)/llvm-upgrade$(EXEEXT)
326 ifeq ($(LLVMGCC_MAJVERS),3)
327 UPGRADE_MSG = $(Echo) "Upgrading $(1) assembly to latest."
328 UPGRADE_LL = $(Verb)$(LUPGRADE) $(1) -o $(1).up.tmp -f ; $(MV) $(1).up.tmp $(1)
334 LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC)
335 LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX)
337 #--------------------------------------------------------------------
338 # Adjust to user's request
339 #--------------------------------------------------------------------
341 # Adjust LD.Flags and Libtool.Flags depending on the kind of library that is
342 # to be built. Note that if LOADABLE_MODULE is specified then the resulting
343 # shared library can be opened with dlopen. Also, LOADABLE_MODULE implies
344 # several other things so we force them to be defined/on.
345 ifdef LOADABLE_MODULE
347 DONT_BUILD_RELINKED := 1
348 LINK_LIBS_IN_SHARED := 1
353 LD.Flags += -rpath $(LibDir)
355 LibTool.Flags += --tag=disable-shared
365 # Adjust settings for verbose mode
368 LibTool.Flags += --silent
369 AR.Flags += >/dev/null 2>/dev/null
370 ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1
372 ConfigureScriptFLAGS :=
375 # By default, strip symbol information from executable
377 Strip := $(PLATFORMSTRIPOPTS)
378 StripWarnMsg := "(without symbols)"
379 Install.StripFlag += -s
382 # Adjust linker flags for building an executable
385 LD.Flags += -rpath $(ExmplDir) -export-dynamic
387 LD.Flags += -rpath $(ToolDir) -export-dynamic
391 #----------------------------------------------------------
392 # Options To Invoke Tools
393 #----------------------------------------------------------
395 CompileCommonOpts := -pedantic -Wall -W -Wwrite-strings -Wno-long-long \
396 -Wunused -Wno-unused-parameter $(EXTRA_OPTIONS)
399 CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
402 # If we are building a universal binary on Mac OS/X, pass extra options. This
403 # is useful to people that want to link the LLVM libraries into their universal
406 # The following can be optionally specified:
407 # UNIVERSAL_SDK_PATH variable can be specified as a path to the SDK to use.
408 # For Mac OS/X 10.4 Intel machines, the traditional one is:
409 # UNIVERSAL_SDK_PATH=/Developer/SDKs/MacOSX10.4u.sdk/
410 # UNIVERSAL_ARCH can be optionally specified to be a list of architectures
411 # to build for, e.g. UNIVERSAL_ARCH="i386 ppc ppc64". This defaults to
414 ifndef UNIVERSAL_ARCH
415 UNIVERSAL_ARCH := i386 ppc
417 UNIVERSAL_ARCH_OPTIONS := $(UNIVERSAL_ARCH:%=-arch %)
418 CompileCommonOpts += $(UNIVERSAL_ARCH_OPTIONS)
419 Relink.Flags := $(UNIVERSAL_ARCH_OPTIONS:%=-XCClinker %)
420 ifdef UNIVERSAL_SDK_PATH
421 CompileCommonOpts += -isysroot $(UNIVERSAL_SDK_PATH)
422 Relink.Flags += -XCClinker -isysroot -XCClinker $(UNIVERSAL_SDK_PATH)
425 # Building universal cannot compute dependencies automatically.
426 DISABLE_AUTO_DEPENDENCIES=1
429 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
430 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
431 # All -I flags should go here, so that they don't confuse llvm-config.
432 CPP.Flags += -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
433 -I$(PROJ_OBJ_ROOT)/include \
434 -I$(PROJ_SRC_ROOT)/include \
435 -I$(LLVM_OBJ_ROOT)/include \
436 -I$(LLVM_SRC_ROOT)/include \
439 Compile.C = $(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c
440 LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C)
441 BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts)
442 Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -E
444 Compile.CXX = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) -c
445 LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX)
446 BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CXX.Flags) \
449 Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -E
450 Link = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) \
452 LTLink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(Link)
453 Relink = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) \
455 LTRelink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(Relink)
456 LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
458 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
459 ScriptInstall = $(INSTALL) -m 0755
460 DataInstall = $(INSTALL) -m 0644
461 TableGen = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include \
462 -I $(PROJ_SRC_ROOT)/lib/Target
463 Archive = $(AR) $(AR.Flags)
464 LArchive = $(LLVMToolDir)/llvm-ar rcsf
471 #----------------------------------------------------------
472 # Get the list of source files and compute object file
474 #----------------------------------------------------------
477 Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \
478 $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c $(PROJ_SRC_DIR)/*.y \
479 $(PROJ_SRC_DIR)/*.l))
481 Sources := $(SOURCES)
485 Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES))
488 BaseNameSources := $(sort $(basename $(Sources)))
490 ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
491 ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo)
492 ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
494 ###############################################################################
495 # DIRECTORIES: Handle recursive descent of directory structure
496 ###############################################################################
498 #---------------------------------------------------------
499 # Provide rules to make install dirs. This must be early
500 # in the file so they get built before dependencies
501 #---------------------------------------------------------
503 $(PROJ_bindir): $(PROJ_bindir)/.dir
504 $(PROJ_libdir): $(PROJ_libdir)/.dir
505 $(PROJ_includedir): $(PROJ_includedir)/.dir
506 $(PROJ_etcdir): $(PROJ_etcdir)/.dir
508 # To create other directories, as needed, and timestamp their creation
510 $(Verb) $(MKDIR) $* > /dev/null
513 .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
514 .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
516 #---------------------------------------------------------
517 # Handle the DIRS options for sequential construction
518 #---------------------------------------------------------
524 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
525 $(RecursiveTargets)::
526 $(Verb) for dir in $(DIRS); do \
527 if [ ! -f $$dir/Makefile ]; then \
529 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
531 ($(MAKE) -C $$dir $@ ) || exit 1; \
534 $(RecursiveTargets)::
535 $(Verb) for dir in $(DIRS); do \
536 ($(MAKE) -C $$dir $@ ) || exit 1; \
542 #---------------------------------------------------------
543 # Handle the EXPERIMENTAL_DIRS options ensuring success
544 # after each directory is built.
545 #---------------------------------------------------------
546 ifdef EXPERIMENTAL_DIRS
547 $(RecursiveTargets)::
548 $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
549 if [ ! -f $$dir/Makefile ]; then \
551 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
553 ($(MAKE) -C $$dir $@ ) || exit 0; \
557 #-----------------------------------------------------------
558 # Handle the PARALLEL_DIRS options for parallel construction
559 #-----------------------------------------------------------
562 SubDirs += $(PARALLEL_DIRS)
564 # Unfortunately, this list must be maintained if new recursive targets are added
565 all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS))
566 clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS))
567 clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
568 install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS))
569 uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
570 install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS))
572 ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
575 $(Verb) if [ ! -f $(@D)/Makefile ]; then \
577 $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
579 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) ;
582 #---------------------------------------------------------
583 # Handle the OPTIONAL_DIRS options for directores that may
585 #---------------------------------------------------------
588 SubDirs += $(OPTIONAL_DIRS)
590 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
591 $(RecursiveTargets)::
592 $(Verb) for dir in $(OPTIONAL_DIRS); do \
593 if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
594 if [ ! -f $$dir/Makefile ]; then \
596 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
598 ($(MAKE) -C$$dir $@ ) || exit 1; \
602 $(RecursiveTargets)::
603 $(Verb) for dir in $(OPTIONAL_DIRS); do \
604 ($(MAKE) -C$$dir $@ ) || exit 1; \
609 #---------------------------------------------------------
610 # Handle the CONFIG_FILES options
611 #---------------------------------------------------------
614 install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
615 $(Echo) Installing Configuration Files To $(PROJ_etcdir)
616 $(Verb)for file in $(CONFIG_FILES); do \
617 if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
618 $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
619 elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
620 $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
622 $(ECHO) Error: cannot find config file $${file}. ; \
627 $(Echo) Uninstalling Configuration Files From $(PROJ_etcdir)
628 $(Verb)for file in $(CONFIG_FILES); do \
629 $(RM) -f $(PROJ_etcdir)/$${file} ; \
634 ###############################################################################
635 # Set up variables for building libararies
636 ###############################################################################
638 #---------------------------------------------------------
639 # Define various command line options pertaining to the
640 # libraries needed when linking. There are "Proj" libs
641 # (defined by the user's project) and "LLVM" libs (defined
642 # by the LLVM project).
643 #---------------------------------------------------------
646 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
647 ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions))
648 ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
649 ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs))
653 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
654 LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions))
655 LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS)))
656 LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs))
659 ifeq ($(strip $(filter clean clean-local dist-clean,$(MAKECMDGOALS))),)
660 ifdef LINK_COMPONENTS
662 # If LLVM_CONFIG doesn't exist, build it. This can happen if you do a make
663 # clean in tools, then do a make in tools (instead of at the top level).
665 @echo "*** llvm-config doesn't exist - rebuilding it."
666 @$(MAKE) -C $(PROJ_OBJ_ROOT)/tools/llvm-config
668 $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG)
670 ProjLibsOptions = $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS))
671 ProjLibsPaths = $(LLVM_CONFIG) \
672 $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS))
676 ###############################################################################
677 # Library Build Rules: Four ways to build a library
678 ###############################################################################
680 #---------------------------------------------------------
681 # Bytecode Module Targets:
682 # If the user set MODULE_NAME then they want to build a
683 # bytecode module from the sources. We compile all the
684 # sources and link it together into a single bytecode
686 #---------------------------------------------------------
689 ifeq ($(strip $(LLVMGCC)),)
690 $(warning Modules require llvm-gcc but no llvm-gcc is available ****)
693 Module := $(LibDir)/$(MODULE_NAME).bc
694 LinkModule := $(GCCLD) -L$(CFERuntimeLibDir)
697 ifdef EXPORTED_SYMBOL_FILE
698 LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
701 $(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD)
702 $(Echo) Building $(BuildMode) Bytecode Module $(notdir $@)
703 $(Verb) $(LinkModule) -o $@ $(ObjectsBC)
705 all-local:: $(Module)
708 ifneq ($(strip $(Module)),)
709 -$(Verb) $(RM) -f $(Module)
712 ifdef BYTECODE_DESTINATION
713 ModuleDestDir := $(BYTECODE_DESTINATION)
715 ModuleDestDir := $(PROJ_libdir)
718 DestModule := $(ModuleDestDir)/$(MODULE_NAME).bc
720 install-module:: $(DestModule)
721 install-local:: $(DestModule)
723 $(DestModule): $(ModuleDestDir) $(Module)
724 $(Echo) Installing $(BuildMode) Bytecode Module $(DestModule)
725 $(Verb) $(DataInstall) $(Module) $(DestModule)
728 $(Echo) Uninstalling $(BuildMode) Bytecode Module $(DestModule)
729 -$(Verb) $(RM) -f $(DestModule)
734 # if we're building a library ...
737 # Make sure there isn't any extranous whitespace on the LIBRARYNAME option
738 LIBRARYNAME := $(strip $(LIBRARYNAME))
739 ifdef LOADABLE_MODULE
740 LibName.LA := $(LibDir)/$(LIBRARYNAME).la
742 LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la
744 LibName.A := $(LibDir)/lib$(LIBRARYNAME).a
745 LibName.O := $(LibDir)/$(LIBRARYNAME).o
746 LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca
748 #---------------------------------------------------------
749 # Shared Library Targets:
750 # If the user asked for a shared library to be built
751 # with the SHARED_LIBRARY variable, then we provide
752 # targets for building them.
753 #---------------------------------------------------------
756 all-local:: $(LibName.LA)
758 ifdef LINK_LIBS_IN_SHARED
759 ifdef LOADABLE_MODULE
760 SharedLibKindMessage := "Loadable Module"
762 SharedLibKindMessage := "Shared Library"
764 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
765 $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \
766 $(LIBRARYNAME)$(SHLIBEXT)
767 $(Verb) $(LTLink) -o $@ $(ObjectsLO) $(ProjLibsOptions) \
769 $(Verb) $(LTInstall) $@ $(LibDir)
771 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
772 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
773 $(Verb) $(LTLink) -o $@ $(ObjectsLO)
774 $(Verb) $(LTInstall) $@ $(LibDir)
778 ifneq ($(strip $(LibName.LA)),)
779 -$(Verb) $(RM) -f $(LibName.LA)
782 DestSharedLib = $(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
784 install-local:: $(DestSharedLib)
786 $(DestSharedLib): $(PROJ_libdir) $(LibName.LA)
787 $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
788 $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
789 $(Verb) $(LIBTOOL) --finish $(PROJ_libdir)
792 $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
793 -$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
797 #---------------------------------------------------------
798 # Bytecode Library Targets:
799 # If the user asked for a bytecode library to be built
800 # with the BYTECODE_LIBRARY variable, then we provide
801 # targets for building them.
802 #---------------------------------------------------------
803 ifdef BYTECODE_LIBRARY
804 ifeq ($(strip $(LLVMGCC)),)
805 $(warning Bytecode libraries require llvm-gcc which could not be found ****)
808 all-local:: $(LibName.BCA)
810 ifdef EXPORTED_SYMBOL_FILE
811 BCLinkLib = $(GCCLD) -L$(CFERuntimeLibDir) \
812 -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
814 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \
815 $(LLVMToolDir)/llvm-ar
816 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \
818 $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC)
820 $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o
822 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir \
823 $(LLVMToolDir)/llvm-ar
824 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@)
826 $(Verb) $(LArchive) $@ $(ObjectsBC)
831 ifneq ($(strip $(LibName.BCA)),)
832 -$(Verb) $(RM) -f $(LibName.BCA)
835 ifdef BYTECODE_DESTINATION
836 BytecodeDestDir := $(BYTECODE_DESTINATION)
838 BytecodeDestDir := $(PROJ_libdir)
841 DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).a
843 install-bytecode-local:: $(DestBytecodeLib)
845 install-local:: $(DestBytecodeLib)
847 $(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
848 $(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib)
849 $(Verb) $(DataInstall) $(LibName.BCA) $(DestBytecodeLib)
852 $(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib)
853 -$(Verb) $(RM) -f $(DestBytecodeLib)
858 #---------------------------------------------------------
859 # ReLinked Library Targets:
860 # If the user explicitly requests a relinked library with
861 # BUILD_RELINKED, provide it. Otherwise, if they specify
862 # neither of BUILD_ARCHIVE or DONT_BUILD_RELINKED, give
864 #---------------------------------------------------------
866 ifndef DONT_BUILD_RELINKED
873 all-local:: $(LibName.O)
875 $(LibName.O): $(ObjectsO) $(LibDir)/.dir
876 $(Echo) Linking $(BuildMode) Object Library $(notdir $@)
877 $(Verb) $(LTRelink) -o $@ $(ObjectsO)
880 ifneq ($(strip $(LibName.O)),)
881 -$(Verb) $(RM) -f $(LibName.O)
884 DestRelinkedLib = $(PROJ_libdir)/$(LIBRARYNAME).o
886 install-local:: $(DestRelinkedLib)
888 $(DestRelinkedLib): $(PROJ_libdir) $(LibName.O)
889 $(Echo) Installing $(BuildMode) Object Library $(DestRelinkedLib)
890 $(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib)
893 $(Echo) Uninstalling $(BuildMode) Object Library $(DestRelinkedLib)
894 -$(Verb) $(RM) -f $(DestRelinkedLib)
898 #---------------------------------------------------------
899 # Archive Library Targets:
900 # If the user wanted a regular archive library built,
901 # then we provide targets for building them.
902 #---------------------------------------------------------
905 all-local:: $(LibName.A)
907 $(LibName.A): $(ObjectsO) $(LibDir)/.dir
908 $(Echo) Building $(BuildMode) Archive Library $(notdir $@)
910 $(Verb) $(Archive) $@ $(ObjectsO)
914 ifneq ($(strip $(LibName.A)),)
915 -$(Verb) $(RM) -f $(LibName.A)
918 DestArchiveLib := $(PROJ_libdir)/lib$(LIBRARYNAME).a
920 install-local:: $(DestArchiveLib)
922 $(DestArchiveLib): $(PROJ_libdir) $(LibName.A)
923 $(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
924 $(Verb) $(MKDIR) $(PROJ_libdir)
925 $(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib)
928 $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
929 -$(Verb) $(RM) -f $(DestArchiveLib)
936 ###############################################################################
937 # Tool Build Rules: Build executable tool based on TOOLNAME option
938 ###############################################################################
942 #---------------------------------------------------------
943 # Set up variables for building a tool.
944 #---------------------------------------------------------
946 ToolBuildPath := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT)
948 ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
951 #---------------------------------------------------------
952 # Provide targets for building the tools
953 #---------------------------------------------------------
954 all-local:: $(ToolBuildPath)
957 ifneq ($(strip $(ToolBuildPath)),)
958 -$(Verb) $(RM) -f $(ToolBuildPath)
962 $(ToolBuildPath): $(ExmplDir)/.dir
964 $(ToolBuildPath): $(ToolDir)/.dir
967 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
968 $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
969 $(Verb) $(LTLink) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
970 $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
971 $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
974 DestTool = $(PROJ_bindir)/$(TOOLNAME)
976 install-local:: $(DestTool)
978 $(DestTool): $(PROJ_bindir) $(ToolBuildPath)
979 $(Echo) Installing $(BuildMode) $(DestTool)
980 $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
983 $(Echo) Uninstalling $(BuildMode) $(DestTool)
984 -$(Verb) $(RM) -f $(DestTool)
988 ###############################################################################
989 # Object Build Rules: Build object files based on sources
990 ###############################################################################
992 # FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
994 DISABLE_AUTO_DEPENDENCIES=1
999 MAYBE_PIC_Compile.CXX = $(LTCompile.CXX)
1000 MAYBE_PIC_Compile.C = $(LTCompile.C)
1002 MAYBE_PIC_Compile.CXX = $(Compile.CXX)
1003 MAYBE_PIC_Compile.C = $(Compile.C)
1006 # Provide rule sets for when dependency generation is enabled
1007 ifndef DISABLE_AUTO_DEPENDENCIES
1009 #---------------------------------------------------------
1010 # Create .lo files in the ObjDir directory from the .cpp and .c files...
1011 #---------------------------------------------------------
1013 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1014 $(Echo) "Compiling $*.cpp for $(BuildMode) build " $(PIC_FLAG)
1015 $(Verb) if $(MAYBE_PIC_Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
1016 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
1017 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
1019 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1020 $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG)
1021 $(Verb) if $(MAYBE_PIC_Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
1022 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
1023 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
1025 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1026 $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG)
1027 $(Verb) if $(MAYBE_PIC_Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
1028 then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \
1029 else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi
1031 #---------------------------------------------------------
1032 # Create .bc files in the ObjDir directory from .cpp .cc and .c files...
1033 #---------------------------------------------------------
1035 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1036 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1037 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1038 $< -o $@ -S -emit-llvm ; \
1039 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1040 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1041 $(call UPGRADE_MSG,$@)
1042 $(call UPGRADE_LL,$@)
1044 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1045 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1046 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1047 $< -o $@ -S -emit-llvm ; \
1048 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1049 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1050 $(call UPGRADE_MSG,$@)
1051 $(call UPGRADE_LL,$@)
1053 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1054 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1055 $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" \
1056 $< -o $@ -S -emit-llvm ; \
1057 then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
1058 else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
1059 $(call UPGRADE_MSG,$@)
1060 $(call UPGRADE_LL,$@)
1062 # Provide alternate rule sets if dependencies are disabled
1065 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1066 $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG)
1067 $(MAYBE_PIC_Compile.CXX) $< -o $@
1069 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1070 $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG)
1071 $(MAYBE_PIC_Compile.CXX) $< -o $@
1073 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1074 $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG)
1075 $(MAYBE_PIC_Compile.C) $< -o $@
1077 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1078 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1079 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1080 $(call UPGRADE_MSG,$@)
1081 $(call UPGRADE_LL,$@)
1083 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1084 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1085 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1086 $(call UPGRADE_MSG,$@)
1087 $(call UPGRADE_LL,$@)
1089 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1090 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1091 $(BCCompile.C) $< -o $@ -S -emit-llvm
1092 $(call UPGRADE_MSG,@)
1093 $(call UPGRADE_LL,@)
1098 ## Rules for building preprocessed (.i/.ii) outputs.
1099 $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1100 $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file"
1101 $(Verb) $(Preprocess.CXX) $< -o $@
1103 $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1104 $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file"
1105 $(Verb) $(Preprocess.CXX) $< -o $@
1107 $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1108 $(Echo) "Compiling $*.c for $(BuildMode) build to .i file"
1109 $(Verb) $(Preprocess.C) $< -o $@
1112 $(ObjDir)/%.s: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1113 $(Echo) "Compiling $*.cpp to asm for $(BuildMode) build" $(PIC_FLAG)
1114 $(MAYBE_PIC_Compile.CXX) $< -o $@ -S
1116 $(ObjDir)/%.s: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1117 $(Echo) "Compiling $*.cc to asm for $(BuildMode) build" $(PIC_FLAG)
1118 $(MAYBE_PIC_Compile.CXX) $< -o $@ -S
1120 $(ObjDir)/%.s: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1121 $(Echo) "Compiling $*.c to asm for $(BuildMode) build" $(PIC_FLAG)
1122 $(MAYBE_PIC_Compile.C) $< -o $@ -S
1125 # make the C and C++ compilers strip debug info out of bytecode libraries.
1127 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1128 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1129 $(Verb) $(GCCAS) $< -o $@
1131 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1132 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1133 $(Verb) $(GCCAS) -strip-debug $< -o $@
1137 #---------------------------------------------------------
1138 # Provide rule to build .bc files from .ll sources,
1139 # regardless of dependencies
1140 #---------------------------------------------------------
1141 $(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS)
1142 $(Echo) "Compiling $*.ll for $(BuildMode) build"
1143 $(Verb) $(LLVMAS) $< -f -o $@
1145 ###############################################################################
1146 # TABLEGEN: Provide rules for running tblgen to produce *.inc files
1147 ###############################################################################
1151 TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \
1152 $(LLVM_SRC_ROOT)/lib/Target/Target.td \
1153 $(LLVM_SRC_ROOT)/lib/Target/TargetSelectionDAG.td \
1154 $(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td) \
1155 $(wildcard $(LLVM_SRC_ROOT)/include/llvm/Intrinsics*.td)
1156 INCFiles := $(filter %.inc,$(BUILT_SOURCES))
1157 INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
1158 .PRECIOUS: $(INCTMPFiles) $(INCFiles)
1160 # All of these files depend on tblgen and the .td files.
1161 $(INCTMPFiles) : $(TBLGEN) $(TDFiles)
1163 # INCFiles rule: All of the tblgen generated files are emitted to
1164 # $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows
1165 # us to only "touch" the real file if the contents of it change. IOW, if
1166 # tblgen is modified, all of the .inc.tmp files are regereated, but no
1167 # dependencies of the .inc files are, unless the contents of the .inc file
1169 $(INCFiles) : %.inc : $(ObjDir)/%.inc.tmp
1170 $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
1172 $(TARGET:%=$(ObjDir)/%GenRegisterNames.inc.tmp): \
1173 $(ObjDir)/%GenRegisterNames.inc.tmp : %.td $(ObjDir)/.dir
1174 $(Echo) "Building $(<F) register names with tblgen"
1175 $(Verb) $(TableGen) -gen-register-enums -o $@ $<
1177 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.h.inc.tmp): \
1178 $(ObjDir)/%GenRegisterInfo.h.inc.tmp : %.td $(ObjDir)/.dir
1179 $(Echo) "Building $(<F) register information header with tblgen"
1180 $(Verb) $(TableGen) -gen-register-desc-header -o $@ $<
1182 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.inc.tmp): \
1183 $(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir
1184 $(Echo) "Building $(<F) register info implementation with tblgen"
1185 $(Verb) $(TableGen) -gen-register-desc -o $@ $<
1187 $(TARGET:%=$(ObjDir)/%GenInstrNames.inc.tmp): \
1188 $(ObjDir)/%GenInstrNames.inc.tmp : %.td $(ObjDir)/.dir
1189 $(Echo) "Building $(<F) instruction names with tblgen"
1190 $(Verb) $(TableGen) -gen-instr-enums -o $@ $<
1192 $(TARGET:%=$(ObjDir)/%GenInstrInfo.inc.tmp): \
1193 $(ObjDir)/%GenInstrInfo.inc.tmp : %.td $(ObjDir)/.dir
1194 $(Echo) "Building $(<F) instruction information with tblgen"
1195 $(Verb) $(TableGen) -gen-instr-desc -o $@ $<
1197 $(TARGET:%=$(ObjDir)/%GenAsmWriter.inc.tmp): \
1198 $(ObjDir)/%GenAsmWriter.inc.tmp : %.td $(ObjDir)/.dir
1199 $(Echo) "Building $(<F) assembly writer with tblgen"
1200 $(Verb) $(TableGen) -gen-asm-writer -o $@ $<
1202 $(TARGET:%=$(ObjDir)/%GenAsmWriter1.inc.tmp): \
1203 $(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir
1204 $(Echo) "Building $(<F) assembly writer #1 with tblgen"
1205 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
1207 $(TARGET:%=$(ObjDir)/%GenCodeEmitter.inc.tmp): \
1208 $(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir
1209 $(Echo) "Building $(<F) code emitter with tblgen"
1210 $(Verb) $(TableGen) -gen-emitter -o $@ $<
1212 $(TARGET:%=$(ObjDir)/%GenDAGISel.inc.tmp): \
1213 $(ObjDir)/%GenDAGISel.inc.tmp : %.td $(ObjDir)/.dir
1214 $(Echo) "Building $(<F) instruction selector implementation with tblgen"
1215 $(Verb) $(TableGen) -gen-dag-isel -o $@ $<
1217 $(TARGET:%=$(ObjDir)/%GenSubtarget.inc.tmp): \
1218 $(ObjDir)/%GenSubtarget.inc.tmp : %.td $(ObjDir)/.dir
1219 $(Echo) "Building $(<F) subtarget information with tblgen"
1220 $(Verb) $(TableGen) -gen-subtarget -o $@ $<
1223 -$(Verb) $(RM) -f $(INCFiles)
1227 ###############################################################################
1228 # LEX AND YACC: Provide rules for generating sources with lex and yacc
1229 ###############################################################################
1231 #---------------------------------------------------------
1232 # Provide rules for generating a .cpp source file from
1233 # (f)lex input sources.
1234 #---------------------------------------------------------
1236 LexFiles := $(filter %.l,$(Sources))
1238 ifneq ($(LexFiles),)
1240 # Cancel built-in rules for lex
1244 all:: $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs)
1246 # Note the extra sed filtering here, used to cut down on the warnings emited
1247 # by GCC. The last line is a gross hack to work around flex aparently not
1248 # being able to resize the buffer on a large token input. Currently, for
1249 # uninitialized string buffers in LLVM we can generate very long tokens, so
1250 # this is a hack around it.
1251 # FIXME. (f.e. char Buffer[10000] )
1252 $(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
1253 $(Echo) Flexing $*.l
1254 $(Verb) $(FLEX) -t $(PROJ_SRC_DIR)/$*.l | \
1255 $(SED) 's/void yyunput/inline void yyunput/' | \
1256 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
1257 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
1258 > $(PROJ_SRC_DIR)/$*.cpp
1260 # IFF the .l file has changed since it was last checked into CVS, copy the .l
1261 # file to .l.cvs and the generated .cpp file to .cpp.cvs. We use this mechanism
1262 # so that people without flex can build LLVM by copying the .cvs files to the
1263 # source location and building them.
1264 $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1265 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1266 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
1267 ($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)
1269 $(LexFiles:%.l=$(ObjDir)/%.o) : \
1270 $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1273 -$(Verb) $(RM) -f $(LexOutput)
1277 #---------------------------------------------------------
1278 # Provide rules for generating a .cpp and .h source files
1279 # from yacc (bison) input sources.
1280 #---------------------------------------------------------
1282 YaccFiles := $(filter %.y,$(Sources))
1283 ifneq ($(YaccFiles),)
1285 .PRECIOUS: $(YaccOutput)
1287 all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
1289 # Cancel built-in rules for yacc
1294 # Rule for building the bison based parsers...
1295 $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
1297 $(Echo) "Bisoning $*.y"
1298 $(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
1299 $(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
1300 $(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
1302 $(Echo) "Bison of $*.y SKIPPED -- bison not found"
1305 # IFF the .y file has changed since it was last checked into CVS, copy the .y
1306 # file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs. We use this
1307 # mechanism so that people without flex can build LLVM by copying the .cvs files
1308 # to the source location and building them.
1309 $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1310 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1311 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs || \
1313 $(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
1314 $(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
1317 $(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1319 YaccOutput := $(YaccFiles:%.y=%.output)
1322 -$(Verb) $(RM) -f $(YaccOutput)
1325 ###############################################################################
1326 # OTHER RULES: Other rules needed
1327 ###############################################################################
1329 # To create postscript files from dot files...
1330 ifneq ($(DOT),false)
1332 $(DOT) -Tps < $< > $@
1335 $(Echo) "Cannot build $@: The program dot is not installed"
1338 # This rules ensures that header files that are removed still have a rule for
1339 # which they can be "generated." This allows make to ignore them and
1340 # reproduce the dependency lists.
1344 # Define clean-local to clean the current directory. Note that this uses a
1345 # very conservative approach ensuring that empty variables do not cause
1346 # errors or disastrous removal.
1348 ifneq ($(strip $(ObjDir)),)
1349 -$(Verb) $(RM) -rf $(ObjDir)
1351 -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
1352 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
1353 -$(Verb) $(RM) -f *$(SHLIBEXT)
1357 -$(Verb) $(RM) -rf Debug Release Profile
1359 # Build tags database for Emacs/Xemacs:
1363 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1364 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1365 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1366 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1367 -name '*.cpp' -o -name '*.h' | \
1368 $(ETAGS) $(ETAGSFLAGS) -
1371 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1372 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1373 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1374 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1375 \( -name '*.cpp' -o -name '*.h' \) -print | \
1376 ctags -ImtT -o $(PROJ_OBJ_ROOT)/CTAGS -L -
1379 ###############################################################################
1380 # DEPENDENCIES: Include the dependency files if we should
1381 ###############################################################################
1382 ifndef DISABLE_AUTO_DEPENDENCIES
1384 # If its not one of the cleaning targets
1385 ifneq ($(strip $(filter-out clean clean-local dist-clean,$(MAKECMDGOALS)))),)
1387 # Get the list of dependency files
1388 DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources)))
1389 DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d)
1391 -include /dev/null $(DependFiles)
1397 ###############################################################################
1398 # CHECK: Running the test suite
1399 ###############################################################################
1402 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1403 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1404 $(EchoCmd) Running test suite ; \
1405 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local \
1406 TESTSUITE=$(TESTSUITE) ; \
1408 $(EchoCmd) No Makefile in test directory ; \
1411 $(EchoCmd) No test directory ; \
1414 ###############################################################################
1415 # DISTRIBUTION: Handle construction of a distribution tarball
1416 ###############################################################################
1418 #------------------------------------------------------------------------
1419 # Define distribution related variables
1420 #------------------------------------------------------------------------
1421 DistName := $(PROJECT_NAME)-$(PROJ_VERSION)
1422 DistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1423 TopDistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1424 DistTarGZip := $(PROJ_OBJ_ROOT)/$(DistName).tar.gz
1425 DistZip := $(PROJ_OBJ_ROOT)/$(DistName).zip
1426 DistTarBZ2 := $(PROJ_OBJ_ROOT)/$(DistName).tar.bz2
1427 DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \
1428 ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
1429 Makefile.config.in configure autoconf
1430 DistOther := $(notdir $(wildcard \
1431 $(PROJ_SRC_DIR)/*.h \
1432 $(PROJ_SRC_DIR)/*.td \
1433 $(PROJ_SRC_DIR)/*.def \
1434 $(PROJ_SRC_DIR)/*.ll \
1435 $(PROJ_SRC_DIR)/*.in))
1436 DistSubDirs := $(SubDirs)
1437 DistSources = $(Sources) $(EXTRA_DIST)
1438 DistFiles = $(DistAlways) $(DistSources) $(DistOther)
1440 #------------------------------------------------------------------------
1441 # We MUST build distribution with OBJ_DIR != SRC_DIR
1442 #------------------------------------------------------------------------
1443 ifeq ($(PROJ_SRC_DIR),$(PROJ_OBJ_DIR))
1444 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1445 $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
1449 #------------------------------------------------------------------------
1450 # Prevent attempt to run dist targets from anywhere but the top level
1451 #------------------------------------------------------------------------
1453 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1454 $(Echo) ERROR: You must run $@ from $(PROJ_OBJ_ROOT)
1457 #------------------------------------------------------------------------
1458 # Provide the top level targets
1459 #------------------------------------------------------------------------
1461 dist-gzip:: $(DistTarGZip)
1463 $(DistTarGZip) : $(TopDistDir)/.makedistdir
1464 $(Echo) Packing gzipped distribution tar file.
1465 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \
1466 $(GZIP) -c > "$(DistTarGZip)"
1468 dist-bzip2:: $(DistTarBZ2)
1470 $(DistTarBZ2) : $(TopDistDir)/.makedistdir
1471 $(Echo) Packing bzipped distribution tar file.
1472 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \
1473 $(BZIP2) -c >$(DistTarBZ2)
1475 dist-zip:: $(DistZip)
1477 $(DistZip) : $(TopDistDir)/.makedistdir
1478 $(Echo) Packing zipped distribution file.
1479 $(Verb) rm -f $(DistZip)
1480 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
1482 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
1483 $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
1485 DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir
1487 dist-check:: $(DistTarGZip)
1488 $(Echo) Checking distribution tar file.
1489 $(Verb) if test -d $(DistCheckDir) ; then \
1490 $(RM) -rf $(DistCheckDir) ; \
1492 $(Verb) $(MKDIR) $(DistCheckDir)
1493 $(Verb) cd $(DistCheckDir) && \
1494 $(MKDIR) $(DistCheckDir)/build && \
1495 $(MKDIR) $(DistCheckDir)/install && \
1496 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
1498 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
1499 --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
1502 $(MAKE) install && \
1503 $(MAKE) uninstall && \
1504 $(MAKE) dist-clean && \
1505 $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution =====
1508 $(Echo) Cleaning distribution files
1509 -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \
1514 #------------------------------------------------------------------------
1515 # Provide the recursive distdir target for building the distribution directory
1516 #------------------------------------------------------------------------
1517 distdir: $(DistDir)/.makedistdir
1518 $(DistDir)/.makedistdir: $(DistSources)
1519 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1520 if test -d "$(DistDir)" ; then \
1521 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
1524 $(EchoCmd) Removing old $(DistDir) ; \
1525 $(RM) -rf $(DistDir); \
1526 $(EchoCmd) Making 'all' to verify build ; \
1527 $(MAKE) ENABLE_OPTIMIZED=1 all ; \
1529 $(Echo) Building Distribution Directory $(DistDir)
1530 $(Verb) $(MKDIR) $(DistDir)
1531 $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \
1532 srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \
1533 for file in $(DistFiles) ; do \
1535 $(PROJ_SRC_DIR)/*) \
1536 file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \
1538 $(PROJ_SRC_ROOT)/*) \
1539 file=`echo "$$file" | \
1540 sed "s#^$$srcrootstrip/##"` \
1543 if test -f "$(PROJ_SRC_DIR)/$$file" || \
1544 test -d "$(PROJ_SRC_DIR)/$$file" ; then \
1545 from_dir="$(PROJ_SRC_DIR)" ; \
1546 elif test -f "$$file" || test -d "$$file" ; then \
1549 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \
1550 if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \
1551 to_dir="$(DistDir)/$$dir"; \
1552 $(MKDIR) "$$to_dir" ; \
1554 to_dir="$(DistDir)"; \
1556 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
1557 if test -n "$$mid_dir" ; then \
1558 $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
1560 if test -d "$$from_dir/$$file"; then \
1561 if test -d "$(PROJ_SRC_DIR)/$$file" && \
1562 test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \
1563 cd $(PROJ_SRC_DIR) ; \
1564 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1565 ( cd $$to_dir ; $(TAR) xf - ) ; \
1566 cd $(PROJ_OBJ_DIR) ; \
1569 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1570 ( cd $$to_dir ; $(TAR) xf - ) ; \
1571 cd $(PROJ_OBJ_DIR) ; \
1573 elif test -f "$$from_dir/$$file" ; then \
1574 $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
1575 elif test -L "$$from_dir/$$file" ; then \
1576 $(CP) -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
1577 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
1578 $(EchoCmd) "===== WARNING: Distribution Source " \
1579 "$$from_dir/$$file Not Found!" ; \
1580 elif test "$(Verb)" != '@' ; then \
1581 $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \
1584 $(Verb) for subdir in $(DistSubDirs) ; do \
1585 if test "$$subdir" \!= "." ; then \
1586 new_distdir="$(DistDir)/$$subdir" ; \
1587 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
1588 ( cd $$subdir && $(MAKE) ENABLE_OPTIMIZED=1 \
1589 DistDir="$$new_distdir" distdir ) || exit 1; \
1592 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1593 $(EchoCmd) Eliminating CVS/.svn directories from distribution ; \
1594 $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o \
1595 -name .svn \) -print` ;\
1596 $(MAKE) dist-hook ; \
1597 $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \
1598 -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \
1599 -o ! -type d ! -perm -400 -exec chmod a+r {} \; \
1600 -o ! -type d ! -perm -444 -exec \
1601 $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
1602 || chmod -R a+r $(DistDir) ; \
1605 # This is invoked by distdir target, define it as a no-op to avoid errors if not
1611 ###############################################################################
1612 # TOP LEVEL - targets only to apply at the top level directory
1613 ###############################################################################
1617 #------------------------------------------------------------------------
1618 # Install support for the project's include files:
1619 #------------------------------------------------------------------------
1621 $(Echo) Installing include files
1622 $(Verb) $(MKDIR) $(PROJ_includedir)
1623 $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
1624 cd $(PROJ_SRC_ROOT)/include && \
1625 for hdr in `find . -type f '!' '(' -name '*~' -o -name '.cvsignore' \
1626 -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS ` ; do \
1627 instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
1628 if test \! -d "$$instdir" ; then \
1629 $(EchoCmd) Making install directory $$instdir ; \
1630 $(MKDIR) $$instdir ;\
1632 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1635 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
1636 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
1637 cd $(PROJ_OBJ_ROOT)/include && \
1638 for hdr in `find . -type f -print | grep -v CVS` ; do \
1639 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1645 $(Echo) Uninstalling include files
1646 $(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
1647 cd $(PROJ_SRC_ROOT)/include && \
1648 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
1649 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' \
1650 -o -name '*.in' ')' -print ')' | \
1651 grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
1652 cd $(PROJ_SRC_ROOT)/include && \
1653 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
1654 -print ')' | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
1659 #------------------------------------------------------------------------
1660 # Print out the directories used for building
1661 #------------------------------------------------------------------------
1663 $(Echo) "BuildMode : " '$(BuildMode)'
1664 $(Echo) "PROJ_SRC_ROOT: " '$(PROJ_SRC_ROOT)'
1665 $(Echo) "PROJ_SRC_DIR : " '$(PROJ_SRC_DIR)'
1666 $(Echo) "PROJ_OBJ_ROOT: " '$(PROJ_OBJ_ROOT)'
1667 $(Echo) "PROJ_OBJ_DIR : " '$(PROJ_OBJ_DIR)'
1668 $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
1669 $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
1670 $(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
1671 $(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
1672 $(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
1673 $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
1674 $(Echo) "PROJ_includedir : " '$(PROJ_includedir)'
1675 $(Echo) "UserTargets : " '$(UserTargets)'
1676 $(Echo) "ObjMakefiles : " '$(ObjMakefiles)'
1677 $(Echo) "SrcMakefiles : " '$(SrcMakefiles)'
1678 $(Echo) "ObjDir : " '$(ObjDir)'
1679 $(Echo) "LibDir : " '$(LibDir)'
1680 $(Echo) "ToolDir : " '$(ToolDir)'
1681 $(Echo) "ExmplDir : " '$(ExmplDir)'
1682 $(Echo) "Sources : " '$(Sources)'
1683 $(Echo) "TDFiles : " '$(TDFiles)'
1684 $(Echo) "INCFiles : " '$(INCFiles)'
1685 $(Echo) "INCTMPFiles : " '$(INCTMPFiles)'
1686 $(Echo) "PreConditions: " '$(PreConditions)'
1687 $(Echo) "Compile.CXX : " '$(Compile.CXX)'
1688 $(Echo) "Compile.C : " '$(Compile.C)'
1689 $(Echo) "Archive : " '$(Archive)'
1690 $(Echo) "YaccFiles : " '$(YaccFiles)'
1691 $(Echo) "LexFiles : " '$(LexFiles)'
1692 $(Echo) "Module : " '$(Module)'
1693 $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'
1694 $(Echo) "SubDirs : " '$(SubDirs)'