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 #--------------------------------------------------------------------
202 ifdef ENABLE_PROFILING
204 CXX.Flags := -O3 -DNDEBUG -felide-constructors -finline-functions -pg
205 C.Flags := -O3 -DNDEBUG -pg
206 LD.Flags := -O3 -DNDEBUG -pg
208 ifdef ENABLE_OPTIMIZED
210 # Don't use -fomit-frame-pointer on FreeBSD
211 ifneq ($(OS),FreeBSD)
212 OmitFramePointer := -fomit-frame-pointer
214 CXX.Flags := -O3 -DNDEBUG -finline-functions -felide-constructors \
216 C.Flags := -O3 -DNDEBUG $(OmitFramePointer)
217 LD.Flags := -O3 -DNDEBUG
220 CXX.Flags := -g -D_DEBUG
221 C.Flags := -g -D_DEBUG
222 LD.Flags := -g -D_DEBUG
227 CXX.Flags += $(CXXFLAGS)
229 CPP.Flags += $(CPPFLAGS)
230 LD.Flags += $(LDFLAGS)
232 LibTool.Flags := --tag=CXX
234 #Make Floating point ieee complient on alpha
240 #--------------------------------------------------------------------
241 # Directory locations
242 #--------------------------------------------------------------------
243 ObjDir := $(PROJ_OBJ_DIR)/$(BuildMode)
244 LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
245 ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
246 ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
247 LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
248 LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
249 LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
250 CFERuntimeLibDir := $(LLVMGCCDIR)/lib
252 #--------------------------------------------------------------------
253 # Full Paths To Compiled Tools and Utilities
254 #--------------------------------------------------------------------
255 EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]:
258 LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
261 LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
264 BURG := $(LLVMToolDir)/burg$(EXEEXT)
267 TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
270 GCCAS := $(LLVMToolDir)/gccas$(EXEEXT)
273 GCCLD := $(LLVMToolDir)/gccld$(EXEEXT)
276 LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
279 LLI := $(LLVMToolDir)/lli$(EXEEXT)
282 LLC := $(LLVMToolDir)/llc$(EXEEXT)
285 LOPT := $(LLVMToolDir)/opt$(EXEEXT)
288 LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT)
291 LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC)
292 LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX)
294 #--------------------------------------------------------------------
295 # Adjust to user's request
296 #--------------------------------------------------------------------
298 # Adjust LD.Flags and Libtool.Flags depending on the kind of library that is
299 # to be built. Note that if LOADABLE_MODULE is specified then the resulting
300 # shared library can be opened with dlopen
302 LD.Flags += -rpath $(LibDir)
303 ifdef LOADABLE_MODULE
307 LibTool.Flags += --tag=disable-shared
317 # Adjust settings for verbose mode
320 LibTool.Flags += --silent
321 AR.Flags += >/dev/null 2>/dev/null
322 ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1
324 ConfigureScriptFLAGS :=
327 # By default, strip symbol information from executable
329 Strip := $(PLATFORMSTRIPOPTS)
330 StripWarnMsg := "(without symbols)"
331 Install.StripFlag += -s
334 # Adjust linker flags for building an executable
337 LD.Flags += -rpath $(ExmplDir) -export-dynamic
339 LD.Flags += -rpath $(ToolDir) -export-dynamic
343 #----------------------------------------------------------
344 # Options To Invoke Tools
345 #----------------------------------------------------------
347 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused
350 CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
353 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
354 CPP.Flags += -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
355 -I$(PROJ_OBJ_ROOT)/include \
356 -I$(PROJ_SRC_ROOT)/include \
357 -I$(LLVM_OBJ_ROOT)/include \
358 -I$(LLVM_SRC_ROOT)/include \
359 -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
361 Compile.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -c $(C.Flags)
362 LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C)
363 BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
365 Preprocess.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -E $(C.Flags)
367 Compile.CXX = $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c
368 LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX)
369 BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
371 Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -E
372 Link = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
373 $(CompileCommonOpts) $(LD.Flags) $(Strip)
374 Relink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
376 LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
378 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
379 DataInstall = $(INSTALL) -m 0644
380 Burg = $(BURG) -I $(PROJ_SRC_DIR)
381 TableGen = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include
382 Archive = $(AR) $(AR.Flags)
383 LArchive = $(LLVMToolDir)/llvm-ar rcsf
390 #----------------------------------------------------------
391 # Get the list of source files and compute object file
393 #----------------------------------------------------------
396 Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \
397 $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c $(PROJ_SRC_DIR)/*.y \
398 $(PROJ_SRC_DIR)/*.l))
400 Sources := $(SOURCES)
404 Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES))
407 BaseNameSources := $(sort $(basename $(Sources)))
409 ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
410 ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo)
411 ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
413 ###############################################################################
414 # DIRECTORIES: Handle recursive descent of directory structure
415 ###############################################################################
417 #---------------------------------------------------------
418 # Provide rules to make install dirs. This must be early
419 # in the file so they get built before dependencies
420 #---------------------------------------------------------
422 $(PROJ_bindir): $(PROJ_bindir)/.dir
423 $(PROJ_libdir): $(PROJ_libdir)/.dir
424 $(PROJ_includedir): $(PROJ_includedir)/.dir
425 $(PROJ_etcdir): $(PROJ_etcdir)/.dir
427 # To create other directories, as needed, and timestamp their creation
429 $(Verb) $(MKDIR) $* > /dev/null
432 .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
433 .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
435 #---------------------------------------------------------
436 # Handle the DIRS options for sequential construction
437 #---------------------------------------------------------
442 $(RecursiveTargets)::
443 $(Verb) for dir in $(DIRS); do \
444 if [ ! -f $$dir/Makefile ]; then \
446 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
448 if [ ! -f $$dir/LLVM_DO_NOT_BUILD ]; then \
449 ($(MAKE) -C $$dir $@ ) || exit 1; \
454 #---------------------------------------------------------
455 # Handle the EXPERIMENTAL_DIRS options ensuring success
456 # after each directory is built.
457 #---------------------------------------------------------
458 ifdef EXPERIMENTAL_DIRS
459 $(RecursiveTargets)::
460 $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
461 if [ ! -f $$dir/Makefile ]; then \
463 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
465 if [ ! -f $$dir/LLVM_DO_NOT_BUILD ]; then \
466 ($(MAKE) -C $$dir $@ ) || exit 0; \
471 #-----------------------------------------------------------
472 # Handle the PARALLEL_DIRS options for parallel construction
473 #-----------------------------------------------------------
476 SubDirs += $(PARALLEL_DIRS)
478 # Unfortunately, this list must be maintained if new recursive targets are added
479 all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS))
480 clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS))
481 clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
482 install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS))
483 uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
484 install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS))
486 ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
489 $(Verb) if [ ! -f $(@D)/Makefile ]; then \
491 $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
493 if [ ! -f $$dir/LLVM_DO_NOT_BUILD ]; then \
494 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) ; \
498 #---------------------------------------------------------
499 # Handle the OPTIONAL_DIRS options for directores that may
501 #---------------------------------------------------------
504 SubDirs += $(OPTIONAL_DIRS)
506 $(RecursiveTargets)::
507 $(Verb) for dir in $(OPTIONAL_DIRS); do \
508 if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
509 if [ ! -f $$dir/Makefile ]; then \
511 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
513 if [ ! -f $$dir/LLVM_DO_NOT_BUILD ]; then \
514 ($(MAKE) -C$$dir $@ ) || exit 1; \
520 #---------------------------------------------------------
521 # Handle the CONFIG_FILES options
522 #---------------------------------------------------------
525 install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
526 $(Echo) Installing Configuration Files To $(PROJ_etcdir)
527 $(Verb)for file in $(CONFIG_FILES); do \
528 if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
529 $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
530 elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
531 $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
533 $(ECHO) Error: cannot find config file $${file}. ; \
538 $(Echo) Uninstalling Configuration Files From $(PROJ_etcdir)
539 $(Verb)for file in $(CONFIG_FILES); do \
540 $(RM) -f $(PROJ_etcdir)/$${file} ; \
545 ###############################################################################
546 # Set up variables for building libararies
547 ###############################################################################
549 #---------------------------------------------------------
550 # Handle the special "JIT" value for LLVM_LIBS which is a
551 # shorthand for a bunch of libraries that get the correct
552 # JIT support for a library or a tool that runs JIT.
553 #---------------------------------------------------------
554 ifeq ($(LLVMLIBS),JIT)
556 # Make sure we can get our own symbols in the tool
559 # Generic JIT libraries
560 JIT_LIBS := LLVMInterpreter LLVMJIT LLVMCodeGen LLVMExecutionEngine
562 # You can enable the X86 JIT on a non-X86 host by setting the flag
563 # ENABLE_X86_JIT on the make command line. If not, it will still be
564 # enabled automagically on an X86 host.
569 # What the X86 JIT requires
571 JIT_LIBS += LLVMX86 LLVMSelectionDAG
574 # You can enable the SparcV9 JIT on a non-SparcV9 host by setting the flag
575 # ENABLE_SPARCV9_JIT on the make command line. If not, it will still be
576 # enabled automagically on an SparcV9 host.
577 ifeq ($(ARCH), Sparc)
578 ENABLE_SPARCV9_JIT = 1
581 # What the Sparc JIT requires
582 ifdef ENABLE_SPARCV9_JIT
583 JIT_LIBS += LLVMSparcV9 LLVMSparcV9ModuloSched LLVMSparcV9InstrSched \
584 LLVMSparcV9LiveVar LLVMInstrumentation.a \
585 LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \
586 LLVMDataStructure LLVMSparcV9RegAlloc
589 # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
590 # ENABLE_PPC_JIT on the make command line. If not, it will still be
591 # enabled automagically on an PowerPC host.
592 ifeq ($(ARCH), PowerPC)
596 # What the PowerPC JIT requires
598 JIT_LIBS += LLVMPowerPC LLVMSelectionDAG
601 # You can enable the Alpha JIT on a non-Alpha host by setting the flag
602 # ENABLE_ALPHA_JIT on the make command line. If not, it will still be
603 # enabled automagically on an Alpha host.
604 ifeq ($(ARCH), Alpha)
608 # What the Alpha JIT requires
609 ifdef ENABLE_ALPHA_JIT
610 JIT_LIBS += LLVMAlpha LLVMSelectionDAG
613 LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \
614 LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \
615 LLVMSystem.a $(PLATFORMLIBDL)
618 #---------------------------------------------------------
619 # Define various command line options pertaining to the
620 # libraries needed when linking. There are "Proj" libs
621 # (defined by the user's project) and "LLVM" libs (defined
622 # by the # LLVM project).
623 #---------------------------------------------------------
624 # Some versions of gcc on Alpha produce too many symbols, so use a .a file
626 USEDLIBS := $(subst LLVMCore, LLVMCore.a, $(USEDLIBS))
627 LLVMLIBS := $(subst LLVMCore, LLVMCore.a, $(LLVMLIBS))
630 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
631 ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions))
632 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
633 LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions))
634 ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
635 LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS)))
636 ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs))
637 LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs))
639 ###############################################################################
640 # Library Build Rules: Four ways to build a library
641 ###############################################################################
643 #---------------------------------------------------------
644 # Bytecode Module Targets:
645 # If the user set MODULE_NAME then they want to build a
646 # bytecode module from the sources. We compile all the
647 # sources and link it together into a single bytecode
649 #---------------------------------------------------------
652 ifeq ($(strip $(LLVMGCC)),)
653 $(warning Modules require llvm-gcc but no llvm-gcc is available ****)
656 Module := $(LibDir)/$(MODULE_NAME).bc
657 LinkModule := $(GCCLD)
659 ifdef EXPORTED_SYMBOL_FILE
660 LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
663 $(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD)
664 $(Echo) Building $(BuildMode) Bytecode Module $(notdir $@)
665 $(Verb) $(LinkModule) -o $@ $(ObjectsBC)
667 all-local:: $(Module)
670 ifneq ($(strip $(Module)),)
671 -$(Verb) $(RM) -f $(Module)
674 ifdef BYTECODE_DESTINATION
675 ModuleDestDir := $(BYTECODE_DESTINATION)
677 ModuleDestDir := $(PROJ_libdir)
680 DestModule := $(ModuleDestDir)/$(MODULE_NAME).bc
682 install-module:: $(DestModule)
683 install-local:: $(DestModule)
685 $(DestModule): $(ModuleDestDir) $(Module)
686 $(Echo) Installing $(BuildMode) Bytecode Module $(DestModule)
687 $(Verb) $(DataInstall) $(Module) $(DestModule)
690 $(Echo) Uninstalling $(BuildMode) Bytecode Module $(DestModule)
691 -$(Verb) $(RM) -f $(DestModule)
696 # if we're building a library ...
699 # Make sure there isn't any extranous whitespace on the LIBRARYNAME option
700 LIBRARYNAME := $(strip $(LIBRARYNAME))
701 ifdef LOADABLE_MODULE
702 LibName.LA := $(LibDir)/$(LIBRARYNAME).la
704 LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la
706 LibName.A := $(LibDir)/lib$(LIBRARYNAME).a
707 LibName.O := $(LibDir)/$(LIBRARYNAME).o
708 LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca
710 #---------------------------------------------------------
711 # Shared Library Targets:
712 # If the user asked for a shared library to be built
713 # with the SHARED_LIBRARY variable, then we provide
714 # targets for building them.
715 #---------------------------------------------------------
718 all-local:: $(LibName.LA)
720 ifdef LINK_LIBS_IN_SHARED
721 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
722 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
723 $(Verb) $(Link) -o $@ $(ObjectsLO) \
724 $(ProjLibsOptions) $(LLVMLibsOptions)
725 $(Verb) $(LTInstall) $@ $(LibDir)
727 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
728 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
729 $(Verb) $(Link) -o $@ $(ObjectsLO)
730 $(Verb) $(LTInstall) $@ $(LibDir)
734 ifneq ($(strip $(LibName.LA)),)
735 -$(Verb) $(RM) -f $(LibName.LA)
738 DestSharedLib = $(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
740 install-local:: $(DestSharedLib)
742 $(DestSharedLib): $(PROJ_libdir) $(LibName.LA)
743 $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
744 $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
745 $(Verb) $(LIBTOOL) --finish $(PROJ_libdir)
748 $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
749 -$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
753 #---------------------------------------------------------
754 # Bytecode Library Targets:
755 # If the user asked for a bytecode library to be built
756 # with the BYTECODE_LIBRARY variable, then we provide
757 # targets for building them.
758 #---------------------------------------------------------
759 ifdef BYTECODE_LIBRARY
760 ifeq ($(strip $(LLVMGCC)),)
761 $(warning Bytecode libraries require llvm-gcc which could not be found ****)
764 all-local:: $(LibName.BCA)
766 ifdef EXPORTED_SYMBOL_FILE
767 BCLinkLib = $(GCCLD) -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
769 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \
770 $(LLVMToolDir)/llvm-ar
771 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \
773 $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC)
775 $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o
777 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir \
778 $(LLVMToolDir)/llvm-ar
779 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@)
781 $(Verb) $(LArchive) $@ $(ObjectsBC)
786 ifneq ($(strip $(LibName.BCA)),)
787 -$(Verb) $(RM) -f $(LibName.BCA)
790 ifdef BYTECODE_DESTINATION
791 BytecodeDestDir := $(BYTECODE_DESTINATION)
793 BytecodeDestDir := $(PROJ_libdir)
796 DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).a
798 install-bytecode-local:: $(DestBytecodeLib)
800 install-local:: $(DestBytecodeLib)
802 $(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
803 $(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib)
804 $(Verb) $(DataInstall) $(LibName.BCA) $(DestBytecodeLib)
807 $(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib)
808 -$(Verb) $(RM) -f $(DestBytecodeLib)
813 #---------------------------------------------------------
814 # ReLinked Library Targets:
815 # If the user explicitly requests a relinked library with
816 # BUILD_RELINKED, provide it. Otherwise, if they specify
817 # neither of BUILD_ARCHIVE or DONT_BUILD_RELINKED, give
819 #---------------------------------------------------------
821 ifndef DONT_BUILD_RELINKED
828 all-local:: $(LibName.O)
830 $(LibName.O): $(ObjectsO) $(LibDir)/.dir
831 $(Echo) Linking $(BuildMode) Object Library $(notdir $@)
832 $(Verb) $(Relink) -o $@ $(ObjectsO)
835 ifneq ($(strip $(LibName.O)),)
836 -$(Verb) $(RM) -f $(LibName.O)
839 DestRelinkedLib = $(PROJ_libdir)/$(LIBRARYNAME).o
841 install-local:: $(DestRelinkedLib)
843 $(DestRelinkedLib): $(PROJ_libdir) $(LibName.O)
844 $(Echo) Installing $(BuildMode) Object Library $(DestRelinkedLib)
845 $(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib)
848 $(Echo) Uninstalling $(BuildMode) Object Library $(DestRelinkedLib)
849 -$(Verb) $(RM) -f $(DestRelinkedLib)
853 #---------------------------------------------------------
854 # Archive Library Targets:
855 # If the user wanted a regular archive library built,
856 # then we provide targets for building them.
857 #---------------------------------------------------------
860 all-local:: $(LibName.A)
862 $(LibName.A): $(ObjectsO) $(LibDir)/.dir
863 $(Echo) Building $(BuildMode) Archive Library $(notdir $@)
865 $(Verb) $(Archive) $@ $(ObjectsO)
869 ifneq ($(strip $(LibName.A)),)
870 -$(Verb) $(RM) -f $(LibName.A)
873 DestArchiveLib := $(PROJ_libdir)/lib$(LIBRARYNAME).a
875 install-local:: $(DestArchiveLib)
877 $(DestArchiveLib): $(PROJ_libdir) $(LibName.A)
878 $(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
879 $(Verb) $(MKDIR) $(PROJ_libdir)
880 $(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib)
883 $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
884 -$(Verb) $(RM) -f $(DestArchiveLib)
891 ###############################################################################
892 # Tool Build Rules: Build executable tool based on TOOLNAME option
893 ###############################################################################
897 #---------------------------------------------------------
898 # Set up variables for building a tool.
899 #---------------------------------------------------------
901 ToolBuildPath := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT)
903 ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
906 #---------------------------------------------------------
907 # Tell make that we need to rebuild subdirectories before
908 # we can link the tool. This affects things like LLI which
909 # has library subdirectories.
910 #---------------------------------------------------------
911 $(ToolBuildPath): $(addsuffix /.makeall, $(PARALLEL_DIRS))
913 #---------------------------------------------------------
914 # Provide targets for building the tools
915 #---------------------------------------------------------
916 all-local:: $(ToolBuildPath)
919 ifneq ($(strip $(ToolBuildPath)),)
920 -$(Verb) $(RM) -f $(ToolBuildPath)
924 $(ToolBuildPath): $(ExmplDir)/.dir
926 $(ToolBuildPath): $(ToolDir)/.dir
929 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
930 $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
931 $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
932 $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
933 $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
936 DestTool = $(PROJ_bindir)/$(TOOLNAME)
938 install-local:: $(DestTool)
940 $(DestTool): $(PROJ_bindir) $(ToolBuildPath)
941 $(Echo) Installing $(BuildMode) $(DestTool)
942 $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
945 $(Echo) Uninstalling $(BuildMode) $(DestTool)
946 -$(Verb) $(RM) -f $(DestTool)
950 ###############################################################################
951 # Object Build Rules: Build object files based on sources
952 ###############################################################################
954 # FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
956 DISABLE_AUTO_DEPENDENCIES=1
959 # Provide rule sets for when dependency generation is enabled
960 ifndef DISABLE_AUTO_DEPENDENCIES
962 #---------------------------------------------------------
963 # Create .lo files in the ObjDir directory from the .cpp and .c files...
964 #---------------------------------------------------------
967 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
968 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
969 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
970 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
971 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
973 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
974 $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
975 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
976 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
977 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
979 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
980 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
981 $(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
982 then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \
983 else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi
985 #---------------------------------------------------------
986 # Create .o files in the ObjDir directory from the .cpp and .c files...
987 #---------------------------------------------------------
990 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
991 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
992 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
993 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
994 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
996 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
997 $(Echo) "Compiling $*.cc for $(BuildMode) build"
998 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
999 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
1000 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
1002 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1003 $(Echo) "Compiling $*.c for $(BuildMode) build"
1004 $(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \
1005 then $(MV) -f "$(ObjDir)/$*.Cd" "$(ObjDir)/$*.d"; \
1006 else $(RM) -f "$(ObjDir)/$*.Cd"; exit 1; fi
1010 ## Rules for building preprocessed (.i/.ii) outputs.
1011 $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1012 $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file"
1013 $(Verb) $(Preprocess.CXX) $< -o $@
1015 $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1016 $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file"
1017 $(Verb) $(Preprocess.CXX) $< -o $@
1019 $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1020 $(Echo) "Compiling $*.c for $(BuildMode) build to .i file"
1021 $(Verb) $(Preprocess.C) $< -o $@
1024 #---------------------------------------------------------
1025 # Create .bc files in the ObjDir directory from .cpp .cc and .c files...
1026 #---------------------------------------------------------
1028 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1029 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1030 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1031 $< -o $@ -S -emit-llvm ; \
1032 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1033 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1035 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1036 $(Echo) "Compiling $*.cc 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
1042 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1043 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1044 $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" \
1045 $< -o $@ -S -emit-llvm ; \
1046 then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
1047 else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
1049 # Provide alternate rule sets if dependencies are disabled
1052 ifdef SHARED_LIBRARY
1054 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1055 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
1056 $(LTCompile.CXX) $< -o $@
1058 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1059 $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
1060 $(LTCompile.CXX) $< -o $@
1062 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1063 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
1064 $(LTCompile.C) $< -o $@
1068 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1069 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
1070 $(Compile.CXX) $< -o $@
1072 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1073 $(Echo) "Compiling $*.cc for $(BuildMode) build"
1074 $(Compile.CXX) $< -o $@
1076 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1077 $(Echo) "Compiling $*.c for $(BuildMode) build"
1078 $(Compile.C) $< -o $@
1081 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1082 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1083 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1085 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1086 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1087 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1089 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1090 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1091 $(BCCompile.C) $< -o $@ -S -emit-llvm
1095 # make the C and C++ compilers strip debug info out of bytecode libraries.
1097 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1098 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1099 $(Verb) $(GCCAS) $< -o $@
1101 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1102 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1103 $(Verb) $(GCCAS) -strip-debug $< -o $@
1107 #---------------------------------------------------------
1108 # Provide rule to build .bc files from .ll sources,
1109 # regardless of dependencies
1110 #---------------------------------------------------------
1111 $(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS)
1112 $(Echo) "Compiling $*.ll for $(BuildMode) build"
1113 $(Verb) $(LLVMAS) $< -f -o $@
1115 ###############################################################################
1116 # TABLEGEN: Provide rules for running tblgen to produce *.inc files
1117 ###############################################################################
1121 TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \
1122 $(LLVM_SRC_ROOT)/lib/Target/Target.td \
1123 $(LLVM_SRC_ROOT)/lib/Target/TargetSelectionDAG.td \
1124 $(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td)
1125 INCFiles := $(filter %.inc,$(BUILT_SOURCES))
1126 INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
1127 .PRECIOUS: $(INCTMPFiles) $(INCFiles)
1129 # All of these files depend on tblgen and the .td files.
1130 $(INCTMPFiles) : $(TBLGEN) $(TDFiles)
1132 # INCFiles rule: All of the tblgen generated files are emitted to
1133 # $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows
1134 # us to only "touch" the real file if the contents of it change. IOW, if
1135 # tblgen is modified, all of the .inc.tmp files are regereated, but no
1136 # dependencies of the .inc files are, unless the contents of the .inc file
1138 $(INCFiles) : %.inc : $(ObjDir)/%.inc.tmp
1139 $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
1141 $(TARGET:%=$(ObjDir)/%GenRegisterNames.inc.tmp): \
1142 $(ObjDir)/%GenRegisterNames.inc.tmp : %.td $(ObjDir)/.dir
1143 $(Echo) "Building $(<F) register names with tblgen"
1144 $(Verb) $(TableGen) -gen-register-enums -o $@ $<
1146 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.h.inc.tmp): \
1147 $(ObjDir)/%GenRegisterInfo.h.inc.tmp : %.td $(ObjDir)/.dir
1148 $(Echo) "Building $(<F) register information header with tblgen"
1149 $(Verb) $(TableGen) -gen-register-desc-header -o $@ $<
1151 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.inc.tmp): \
1152 $(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir
1153 $(Echo) "Building $(<F) register info implementation with tblgen"
1154 $(Verb) $(TableGen) -gen-register-desc -o $@ $<
1156 $(TARGET:%=$(ObjDir)/%GenInstrNames.inc.tmp): \
1157 $(ObjDir)/%GenInstrNames.inc.tmp : %.td $(ObjDir)/.dir
1158 $(Echo) "Building $(<F) instruction names with tblgen"
1159 $(Verb) $(TableGen) -gen-instr-enums -o $@ $<
1161 $(TARGET:%=$(ObjDir)/%GenInstrInfo.inc.tmp): \
1162 $(ObjDir)/%GenInstrInfo.inc.tmp : %.td $(ObjDir)/.dir
1163 $(Echo) "Building $(<F) instruction information with tblgen"
1164 $(Verb) $(TableGen) -gen-instr-desc -o $@ $<
1166 $(TARGET:%=$(ObjDir)/%GenAsmWriter.inc.tmp): \
1167 $(ObjDir)/%GenAsmWriter.inc.tmp : %.td $(ObjDir)/.dir
1168 $(Echo) "Building $(<F) assembly writer with tblgen"
1169 $(Verb) $(TableGen) -gen-asm-writer -o $@ $<
1171 $(TARGET:%=$(ObjDir)/%GenAsmWriter1.inc.tmp): \
1172 $(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir
1173 $(Echo) "Building $(<F) assembly writer #1 with tblgen"
1174 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
1176 $(TARGET:%=$(ObjDir)/%GenCodeEmitter.inc.tmp): \
1177 $(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir
1178 $(Echo) "Building $(<F) code emitter with tblgen"
1179 $(Verb) $(TableGen) -gen-emitter -o $@ $<
1181 $(TARGET:%=$(ObjDir)/%GenDAGISel.inc.tmp): \
1182 $(ObjDir)/%GenDAGISel.inc.tmp : %.td $(ObjDir)/.dir
1183 $(Echo) "Building $(<F) instruction selector implementation with tblgen"
1184 $(Verb) $(TableGen) -gen-dag-isel -o $@ $<
1186 $(TARGET:%=$(ObjDir)/%GenSubtarget.inc.tmp): \
1187 $(ObjDir)/%GenSubtarget.inc.tmp : %.td $(ObjDir)/.dir
1188 $(Echo) "Building $(<F) subtarget information with tblgen"
1189 $(Verb) $(TableGen) -gen-subtarget -o $@ $<
1192 -$(Verb) $(RM) -f $(INCFiles)
1196 ###############################################################################
1197 # LEX AND YACC: Provide rules for generating sources with lex and yacc
1198 ###############################################################################
1200 #---------------------------------------------------------
1201 # Provide rules for generating a .cpp source file from
1202 # (f)lex input sources.
1203 #---------------------------------------------------------
1205 LexFiles := $(filter %.l,$(Sources))
1207 ifneq ($(LexFiles),)
1209 # Cancel built-in rules for lex
1213 all:: $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs)
1215 # Note the extra sed filtering here, used to cut down on the warnings emited
1216 # by GCC. The last line is a gross hack to work around flex aparently not
1217 # being able to resize the buffer on a large token input. Currently, for
1218 # uninitialized string buffers in LLVM we can generate very long tokens, so
1219 # this is a hack around it.
1220 # FIXME. (f.e. char Buffer[10000] )
1221 $(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
1222 $(Echo) Flexing $*.l
1223 $(Verb) $(FLEX) -t $(PROJ_SRC_DIR)/$*.l | \
1224 $(SED) 's/void yyunput/inline void yyunput/' | \
1225 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
1226 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
1227 > $(PROJ_SRC_DIR)/$*.cpp
1229 # IFF the .l file has changed since it was last checked into CVS, copy the .l
1230 # file to .l.cvs and the generated .cpp file to .cpp.cvs. We use this mechanism
1231 # so that people without flex can build LLVM by copying the .cvs files to the
1232 # source location and building them.
1233 $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1234 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1235 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
1236 ($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)
1238 $(LexFiles:%.l=$(ObjDir)/%.o) : \
1239 $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1242 -$(Verb) $(RM) -f $(LexOutput)
1246 #---------------------------------------------------------
1247 # Provide rules for generating a .cpp and .h source files
1248 # from yacc (bison) input sources.
1249 #---------------------------------------------------------
1251 YaccFiles := $(filter %.y,$(Sources))
1252 ifneq ($(YaccFiles),)
1254 .PRECIOUS: $(YaccOutput)
1256 all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
1258 # Cancel built-in rules for yacc
1263 # Rule for building the bison based parsers...
1264 $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
1265 $(Echo) "Bisoning $*.y"
1266 $(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
1267 $(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
1268 $(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
1270 # IFF the .y file has changed since it was last checked into CVS, copy the .y
1271 # file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs. We use this
1272 # mechanism so that people without flex can build LLVM by copying the .cvs files
1273 # to the source location and building them.
1274 $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1275 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1276 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs || \
1278 $(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
1279 $(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
1282 $(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1284 YaccOutput := $(YaccFiles:%.y=%.output)
1287 -$(Verb) $(RM) -f $(YaccOutput)
1290 ###############################################################################
1291 # OTHER RULES: Other rules needed
1292 ###############################################################################
1294 # To create postscript files from dot files...
1295 ifneq ($(DOT),false)
1297 $(DOT) -Tps < $< > $@
1300 $(Echo) "Cannot build $@: The program dot is not installed"
1303 # This rules ensures that header files that are removed still have a rule for
1304 # which they can be "generated." This allows make to ignore them and
1305 # reproduce the dependency lists.
1309 # Define clean-local to clean the current directory. Note that this uses a
1310 # very conservative approach ensuring that empty variables do not cause
1311 # errors or disastrous removal.
1313 ifneq ($(strip $(ObjDir)),)
1314 -$(Verb) $(RM) -rf $(ObjDir)
1316 -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
1317 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
1318 -$(Verb) $(RM) -f *$(SHLIBEXT)
1322 -$(Verb) $(RM) -rf Debug Release Profile
1324 # Build tags database for Emacs/Xemacs:
1328 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1329 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1330 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1331 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1332 -name '*.cpp' -o -name '*.h' | \
1333 $(ETAGS) $(ETAGSFLAGS) -
1336 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1337 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1338 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1339 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1340 \( -name '*.cpp' -o -name '*.h' \) -print | \
1341 ctags -ImtT -o $(PROJ_OBJ_ROOT)/CTAGS -L -
1344 ###############################################################################
1345 # DEPENDENCIES: Include the dependency files if we should
1346 ###############################################################################
1347 ifndef DISABLE_AUTO_DEPENDENCIES
1349 # If its not one of the cleaning targets
1350 ifneq ($strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),)
1352 # Get the list of dependency files
1353 DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources)))
1354 DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d)
1356 -include /dev/null $(DependFiles)
1362 ###############################################################################
1363 # CHECK: Running the test suite
1364 ###############################################################################
1367 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1368 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1369 $(EchoCmd) Running test suite ; \
1370 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local \
1371 TESTSUITE=$(TESTSUITE) ; \
1373 $(EchoCmd) No Makefile in test directory ; \
1376 $(EchoCmd) No test directory ; \
1379 ###############################################################################
1380 # DISTRIBUTION: Handle construction of a distribution tarball
1381 ###############################################################################
1383 #------------------------------------------------------------------------
1384 # Define distribution related variables
1385 #------------------------------------------------------------------------
1386 DistName := $(PROJECT_NAME)-$(PROJ_VERSION)
1387 DistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1388 TopDistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1389 DistTarGZip := $(PROJ_OBJ_ROOT)/$(DistName).tar.gz
1390 DistZip := $(PROJ_OBJ_ROOT)/$(DistName).zip
1391 DistTarBZ2 := $(PROJ_OBJ_ROOT)/$(DistName).tar.bz2
1392 DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \
1393 ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
1394 Makefile.config.in configure autoconf
1395 DistOther := $(notdir $(wildcard \
1396 $(PROJ_SRC_DIR)/*.h \
1397 $(PROJ_SRC_DIR)/*.td \
1398 $(PROJ_SRC_DIR)/*.def \
1399 $(PROJ_SRC_DIR)/*.ll \
1400 $(PROJ_SRC_DIR)/*.in))
1401 DistSubDirs := $(SubDirs)
1402 DistSources = $(Sources) $(EXTRA_DIST)
1403 DistFiles = $(DistAlways) $(DistSources) $(DistOther)
1405 #------------------------------------------------------------------------
1406 # We MUST build distribution with OBJ_DIR != SRC_DIR
1407 #------------------------------------------------------------------------
1408 ifeq ($(PROJ_SRC_DIR),$(PROJ_OBJ_DIR))
1409 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1410 $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
1414 #------------------------------------------------------------------------
1415 # Prevent attempt to run dist targets from anywhere but the top level
1416 #------------------------------------------------------------------------
1418 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1419 $(Echo) ERROR: You must run $@ from $(PROJ_OBJ_ROOT)
1422 #------------------------------------------------------------------------
1423 # Provide the top level targets
1424 #------------------------------------------------------------------------
1426 dist-gzip:: $(DistTarGZip)
1428 $(DistTarGZip) : $(TopDistDir)/.makedistdir
1429 $(Echo) Packing gzipped distribution tar file.
1430 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \
1431 $(GZIP) -c > "$(DistTarGZip)"
1433 dist-bzip2:: $(DistTarBZ2)
1435 $(DistTarBZ2) : $(TopDistDir)/.makedistdir
1436 $(Echo) Packing bzipped distribution tar file.
1437 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \
1438 $(BZIP2) -c >$(DistTarBZ2)
1440 dist-zip:: $(DistZip)
1442 $(DistZip) : $(TopDistDir)/.makedistdir
1443 $(Echo) Packing zipped distribution file.
1444 $(Verb) rm -f $(DistZip)
1445 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
1447 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
1448 $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
1450 DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir
1452 dist-check:: $(DistTarGZip)
1453 $(Echo) Checking distribution tar file.
1454 $(Verb) if test -d $(DistCheckDir) ; then \
1455 $(RM) -rf $(DistCheckDir) ; \
1457 $(Verb) $(MKDIR) $(DistCheckDir)
1458 $(Verb) cd $(DistCheckDir) && \
1459 $(MKDIR) $(DistCheckDir)/build && \
1460 $(MKDIR) $(DistCheckDir)/install && \
1461 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
1463 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
1464 --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
1467 $(MAKE) install && \
1468 $(MAKE) uninstall && \
1471 $(MAKE) dist-clean && \
1472 $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution =====
1475 $(Echo) Cleaning distribution files
1476 -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \
1481 #------------------------------------------------------------------------
1482 # Provide the recursive distdir target for building the distribution directory
1483 #------------------------------------------------------------------------
1484 distdir: $(DistDir)/.makedistdir
1485 $(DistDir)/.makedistdir: $(DistSources)
1486 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1487 if test -d "$(DistDir)" ; then \
1488 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
1491 $(EchoCmd) Removing old $(DistDir) ; \
1492 $(RM) -rf $(DistDir); \
1493 $(EchoCmd) Making 'all' to verify build ; \
1496 $(Echo) Building Distribution Directory $(DistDir)
1497 $(Verb) $(MKDIR) $(DistDir)
1498 $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \
1499 srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \
1500 for file in $(DistFiles) ; do \
1502 $(PROJ_SRC_DIR)/*) \
1503 file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \
1505 $(PROJ_SRC_ROOT)/*) \
1506 file=`echo "$$file" | \
1507 sed "s#^$$srcrootstrip/##"` \
1510 if test -f "$(PROJ_SRC_DIR)/$$file" || \
1511 test -d "$(PROJ_SRC_DIR)/$$file" ; then \
1512 from_dir="$(PROJ_SRC_DIR)" ; \
1513 elif test -f "$$file" || test -d "$$file" ; then \
1516 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \
1517 if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \
1518 to_dir="$(DistDir)/$$dir"; \
1519 $(MKDIR) "$$to_dir" ; \
1521 to_dir="$(DistDir)"; \
1523 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
1524 if test -n "$$mid_dir" ; then \
1525 $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
1527 if test -d "$$from_dir/$$file"; then \
1528 if test -d "$(PROJ_SRC_DIR)/$$file" && \
1529 test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \
1530 cd $(PROJ_SRC_DIR) ; \
1531 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1532 ( cd $$to_dir ; $(TAR) xf - ) ; \
1533 cd $(PROJ_OBJ_DIR) ; \
1536 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1537 ( cd $$to_dir ; $(TAR) xf - ) ; \
1538 cd $(PROJ_OBJ_DIR) ; \
1540 elif test -f "$$from_dir/$$file" ; then \
1541 $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
1542 elif test -L "$$from_dir/$$file" ; then \
1543 $(CP) -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
1544 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
1545 $(EchoCmd) "===== WARNING: Distribution Source " \
1546 "$$from_dir/$$file Not Found!" ; \
1547 elif test "$(Verb)" != '@' ; then \
1548 $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \
1551 $(Verb) for subdir in $(DistSubDirs) ; do \
1552 if test "$$subdir" \!= "." ; then \
1553 new_distdir="$(DistDir)/$$subdir" ; \
1554 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
1555 ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || \
1559 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1560 $(EchoCmd) Eliminating CVS/.svn directories from distribution ; \
1561 $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o \
1562 -name .svn \) -print` ;\
1563 $(MAKE) dist-hook ; \
1564 $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \
1565 -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \
1566 -o ! -type d ! -perm -400 -exec chmod a+r {} \; \
1567 -o ! -type d ! -perm -444 -exec \
1568 $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
1569 || chmod -R a+r $(DistDir) ; \
1572 # This is invoked by distdir target, define it as a no-op to avoid errors if not
1578 ###############################################################################
1579 # TOP LEVEL - targets only to apply at the top level directory
1580 ###############################################################################
1584 #------------------------------------------------------------------------
1585 # Install support for the project's include files:
1586 #------------------------------------------------------------------------
1588 $(Echo) Installing include files
1589 $(Verb) $(MKDIR) $(PROJ_includedir)
1590 $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
1591 cd $(PROJ_SRC_ROOT)/include && \
1592 for hdr in `find . -type f '!' '(' -name '*~' -o -name '.cvsignore' \
1593 -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS ` ; do \
1594 instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
1595 if test \! -d "$$instdir" ; then \
1596 $(EchoCmd) Making install directory $$instdir ; \
1597 $(MKDIR) $$instdir ;\
1599 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1602 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
1603 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
1604 cd $(PROJ_OBJ_ROOT)/include && \
1605 for hdr in `find . -type f -print | grep -v CVS` ; do \
1606 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1612 $(Echo) Uninstalling include files
1613 $(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
1614 cd $(PROJ_SRC_ROOT)/include && \
1615 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
1616 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' \
1617 -o -name '*.in' ')' -print ')' | \
1618 grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
1619 cd $(PROJ_SRC_ROOT)/include && \
1620 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
1621 -print ')' | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
1626 #------------------------------------------------------------------------
1627 # Print out the directories used for building
1628 #------------------------------------------------------------------------
1630 $(Echo) "BuildMode : " '$(BuildMode)'
1631 $(Echo) "PROJ_SRC_ROOT: " '$(PROJ_SRC_ROOT)'
1632 $(Echo) "PROJ_SRC_DIR : " '$(PROJ_SRC_DIR)'
1633 $(Echo) "PROJ_OBJ_ROOT: " '$(PROJ_OBJ_ROOT)'
1634 $(Echo) "PROJ_OBJ_DIR : " '$(PROJ_OBJ_DIR)'
1635 $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
1636 $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
1637 $(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
1638 $(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
1639 $(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
1640 $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
1641 $(Echo) "PROJ_includedir : " '$(PROJ_includedir)'
1642 $(Echo) "UserTargets : " '$(UserTargets)'
1643 $(Echo) "ObjMakefiles : " '$(ObjMakefiles)'
1644 $(Echo) "SrcMakefiles : " '$(SrcMakefiles)'
1645 $(Echo) "ObjDir : " '$(ObjDir)'
1646 $(Echo) "LibDir : " '$(LibDir)'
1647 $(Echo) "ToolDir : " '$(ToolDir)'
1648 $(Echo) "ExmplDir : " '$(ExmplDir)'
1649 $(Echo) "Sources : " '$(Sources)'
1650 $(Echo) "TDFiles : " '$(TDFiles)'
1651 $(Echo) "INCFiles : " '$(INCFiles)'
1652 $(Echo) "INCTMPFiles : " '$(INCTMPFiles)'
1653 $(Echo) "PreConditions: " '$(PreConditions)'
1654 $(Echo) "Compile.CXX : " '$(Compile.CXX)'
1655 $(Echo) "Compile.C : " '$(Compile.C)'
1656 $(Echo) "Archive : " '$(Archive)'
1657 $(Echo) "YaccFiles : " '$(YaccFiles)'
1658 $(Echo) "LexFiles : " '$(LexFiles)'
1659 $(Echo) "Module : " '$(Module)'
1660 $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'