1 #===-- Makefile.rules - Common make rules for LLVM ---------*- Makefile -*--===#
3 # The LLVM Compiler Infrastructure
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
8 #===------------------------------------------------------------------------===#
10 # This file is included by all of the LLVM makefiles. For details on how to use
11 # it properly, please see the document MakefileGuide.html in the docs directory.
13 #===-----------------------------------------------------------------------====#
15 ################################################################################
16 # TARGETS: Define standard targets that can be invoked
17 ################################################################################
19 #--------------------------------------------------------------------
20 # Define the various target sets
21 #--------------------------------------------------------------------
22 RecursiveTargets := all clean clean-all install uninstall install-bytecode
23 LocalTargets := all-local clean-local clean-all-local check-local \
24 install-local printvars uninstall-local \
25 install-bytecode-local
26 TopLevelTargets := check dist dist-check dist-clean tags dist-gzip dist-bzip2 \
28 UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
29 InternalTargets := preconditions distdir dist-hook
31 ################################################################################
32 # INITIALIZATION: Basic things the makefile needs
33 ################################################################################
35 #--------------------------------------------------------------------
36 # Set the VPATH so that we can find source files.
37 #--------------------------------------------------------------------
40 #--------------------------------------------------------------------
41 # Reset the list of suffixes we know how to build
42 #--------------------------------------------------------------------
44 .SUFFIXES: .c .cpp .cc .h .hpp .y .l .lo .o .a .bc .td .ps .dot .ll
45 .SUFFIXES: $(SHLIBEXT) $(SUFFIXES)
47 #--------------------------------------------------------------------
48 # Mark all of these targets as phony to avoid implicit rule search
49 #--------------------------------------------------------------------
50 .PHONY: $(UserTargets) $(InternalTargets)
52 #--------------------------------------------------------------------
53 # Make sure all the user-target rules are double colon rules and
54 # they are defined first.
55 #--------------------------------------------------------------------
59 ################################################################################
60 # PRECONDITIONS: that which must be built/checked first
61 ################################################################################
63 SrcMakefiles := $(filter %Makefile %Makefile.tests,\
64 $(wildcard $(PROJ_SRC_DIR)/Makefile*))
65 ObjMakefiles := $(subst $(PROJ_SRC_DIR),$(PROJ_OBJ_DIR),$(SrcMakefiles))
66 ConfigureScript := $(PROJ_SRC_ROOT)/configure
67 ConfigStatusScript := $(PROJ_OBJ_ROOT)/config.status
68 MakefileConfigIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.config.in))
69 MakefileCommonIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.common.in))
70 MakefileConfig := $(PROJ_OBJ_ROOT)/Makefile.config
71 MakefileCommon := $(PROJ_OBJ_ROOT)/Makefile.common
72 PreConditions := $(ConfigStatusScript) $(ObjMakefiles)
73 ifneq ($(MakefileCommonIn),)
74 PreConditions += $(MakefileCommon)
76 ifneq ($(MakefileConfigIn),)
77 PreConditions += $(MakefileConfig)
80 preconditions: $(PreConditions)
82 #------------------------------------------------------------------------
83 # Make sure the BUILT_SOURCES are built first
84 #------------------------------------------------------------------------
85 $(filter-out clean clean-local,$(UserTargets)):: $(BUILT_SOURCES)
88 ifneq ($(strip $(BUILT_SOURCES)),)
89 -$(Verb) $(RM) -f $(BUILT_SOURCES)
92 ifneq ($(PROJ_OBJ_ROOT),$(PROJ_SRC_ROOT))
94 $(Verb) if test -x config.status ; then \
95 $(EchoCmd) Wiping out $(PROJ_OBJ_ROOT) ; \
96 $(MKDIR) .spotless.save ; \
97 $(MV) config.status .spotless.save ; \
98 $(MV) mklib .spotless.save ; \
99 $(MV) projects .spotless.save ; \
101 $(MV) .spotless.save/config.status . ; \
102 $(MV) .spotless.save/mklib . ; \
103 $(MV) .spotless.save/projects . ; \
104 $(RM) -rf .spotless.save ; \
105 $(EchoCmd) Rebuilding configuration of $(PROJ_OBJ_ROOT) ; \
106 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
107 $(ConfigStatusScript) ; \
109 $(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
113 $(EchoCmd) "spotless target not supported for objdir == srcdir"
116 $(BUILT_SOURCES) : $(ObjMakefiles)
118 #------------------------------------------------------------------------
119 # Make sure we're not using a stale configuration
120 #------------------------------------------------------------------------
122 $(Echo) Reconfiguring $(PROJ_OBJ_ROOT)
123 $(Verb) cd $(PROJ_OBJ_ROOT) && \
124 if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
125 $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
127 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
128 $(ConfigStatusScript)
130 .PRECIOUS: $(ConfigStatusScript)
131 $(ConfigStatusScript): $(ConfigureScript)
132 $(Echo) Reconfiguring with $<
133 $(Verb) cd $(PROJ_OBJ_ROOT) && \
134 if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
135 $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
137 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
138 $(ConfigStatusScript)
140 #------------------------------------------------------------------------
141 # Make sure the configuration makefile is up to date
142 #------------------------------------------------------------------------
143 ifneq ($(MakefileConfigIn),)
144 $(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript)
145 $(Echo) Regenerating $@
146 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config
149 ifneq ($(MakefileCommonIn),)
150 $(MakefileCommon): $(MakefileCommonIn) $(ConfigStatusScript)
151 $(Echo) Regenerating $@
152 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.common
155 #------------------------------------------------------------------------
156 # If the Makefile in the source tree has been updated, copy it over into the
157 # build tree. But, only do this if the source and object makefiles differ
158 #------------------------------------------------------------------------
159 ifneq ($(PROJ_OBJ_DIR),$(PROJ_SRC_DIR))
161 Makefile: $(PROJ_SRC_DIR)/Makefile
162 $(Echo) "Updating Makefile"
163 $(Verb) $(MKDIR) $(@D)
164 $(Verb) $(CP) -f $< $@
166 # Copy the Makefile.* files unless we're in the root directory which avoids
167 # the copying of Makefile.config.in or other things that should be explicitly
169 $(PROJ_OBJ_DIR)/Makefile% : $(PROJ_SRC_DIR)/Makefile%
171 *Makefile.rules) ;; \
173 *) $(Echo) "Updating $(@F)" ; \
180 #------------------------------------------------------------------------
181 # Set up the basic dependencies
182 #------------------------------------------------------------------------
183 $(UserTargets):: $(PreConditions)
187 clean-all:: clean-local clean-all-local
188 install:: install-local
189 uninstall:: uninstall-local
190 install-local:: all-local
191 install-bytecode:: install-bytecode-local
193 ###############################################################################
194 # VARIABLES: Set up various variables based on configuration data
195 ###############################################################################
197 #--------------------------------------------------------------------
198 # Variables derived from configuration we are building
199 #--------------------------------------------------------------------
201 # OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
202 # this can be overridden on the make command line.
204 OPTIMIZE_OPTION := -O3
206 OPTIMIZE_OPTION := -O2
209 ifdef ENABLE_PROFILING
211 CXX.Flags := $(OPTIMIZE_OPTION) -pg
212 C.Flags := $(OPTIMIZE_OPTION) -pg
213 LD.Flags := $(OPTIMIZE_OPTION) -pg
215 ifdef ENABLE_OPTIMIZED
217 # Don't use -fomit-frame-pointer on FreeBSD
218 ifneq ($(OS),FreeBSD)
219 # Don't use -fomit-frame-pointer on Darwin, it breaks backtraces.
221 OmitFramePointer := -fomit-frame-pointer
224 CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
225 C.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
226 LD.Flags := $(OPTIMIZE_OPTION)
236 # If DISABLE_ASSERTIONS=1 is specified (make command line or configured),
237 # then disable assertions by defining the appropriate preprocessor symbols.
238 ifdef DISABLE_ASSERTIONS
239 BuildMode := $(BuildMode)-Asserts
240 CXX.Flags += -DNDEBUG
243 CXX.Flags += -D_DEBUG
247 CXX.Flags += $(CXXFLAGS)
249 CPP.BaseFlags += $(CPPFLAGS)
250 LD.Flags += $(LDFLAGS)
252 LibTool.Flags := --tag=CXX
254 #Make Floating point ieee complient on alpha
257 CPP.BaseFlags += -mieee
260 #--------------------------------------------------------------------
261 # Directory locations
262 #--------------------------------------------------------------------
263 ObjDir := $(PROJ_OBJ_DIR)/$(BuildMode)
264 LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
265 ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
266 ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
267 LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
268 LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
269 LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
270 CFERuntimeLibDir := $(LLVMGCCDIR)/lib
272 #--------------------------------------------------------------------
273 # Full Paths To Compiled Tools and Utilities
274 #--------------------------------------------------------------------
275 EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]:
278 LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
281 LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
284 TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
287 GCCAS := $(LLVMToolDir)/gccas$(EXEEXT)
290 GCCLD := $(LLVMToolDir)/gccld$(EXEEXT)
293 LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
296 LLI := $(LLVMToolDir)/lli$(EXEEXT)
299 LLC := $(LLVMToolDir)/llc$(EXEEXT)
302 LOPT := $(LLVMToolDir)/opt$(EXEEXT)
305 LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT)
308 LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC)
309 LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX)
311 #--------------------------------------------------------------------
312 # Adjust to user's request
313 #--------------------------------------------------------------------
315 # Adjust LD.Flags and Libtool.Flags depending on the kind of library that is
316 # to be built. Note that if LOADABLE_MODULE is specified then the resulting
317 # shared library can be opened with dlopen
319 LD.Flags += -rpath $(LibDir)
320 ifdef LOADABLE_MODULE
324 LibTool.Flags += --tag=disable-shared
334 # Adjust settings for verbose mode
337 LibTool.Flags += --silent
338 AR.Flags += >/dev/null 2>/dev/null
339 ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1
341 ConfigureScriptFLAGS :=
344 # By default, strip symbol information from executable
346 Strip := $(PLATFORMSTRIPOPTS)
347 StripWarnMsg := "(without symbols)"
348 Install.StripFlag += -s
351 # Adjust linker flags for building an executable
354 LD.Flags += -rpath $(ExmplDir) -export-dynamic
356 LD.Flags += -rpath $(ToolDir) -export-dynamic
360 #----------------------------------------------------------
361 # Options To Invoke Tools
362 #----------------------------------------------------------
364 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -Wno-long-long \
368 CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
371 # If we are building a universal binary on Mac OS/X, pass extra options. This
372 # is useful to people that want to link the LLVM libraries into their universal
373 # apps. The UNIVERSAL_SDK_PATH variable can optionally be specified as a path
374 # to the SDK to use. For Mac OS/X 10.4 Intel machines, the traditional one is:
375 # UNIVERSAL_SDK_PATH=/Developer/SDKs/MacOSX10.4u.sdk/
377 CompileCommonOpts += -arch i386 -arch ppc
378 Relink.Flags := -XCClinker -arch -XCClinker i386 -XCClinker -arch \
380 ifdef UNIVERSAL_SDK_PATH
381 CompileCommonOpts += -isysroot $(UNIVERSAL_SDK_PATH)
382 Relink.Flags += -XCClinker -isysroot -XCClinker $(UNIVERSAL_SDK_PATH)
385 # Building universal cannot compute dependencies automatically.
386 DISABLE_AUTO_DEPENDENCIES=1
389 # Temporary workaround for a Mac OSX compatibility issue.
391 CXX.Flags += -fno-use-cxa-atexit
394 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
395 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
396 # All -I flags should go here, so that they don't confuse llvm-config.
397 CPP.Flags += -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
398 -I$(PROJ_OBJ_ROOT)/include \
399 -I$(PROJ_SRC_ROOT)/include \
400 -I$(LLVM_OBJ_ROOT)/include \
401 -I$(LLVM_SRC_ROOT)/include \
404 Compile.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -c $(C.Flags)
405 LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C)
406 BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
408 Preprocess.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -E $(C.Flags)
410 Compile.CXX = $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c
411 LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX)
412 BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
414 Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -E
415 Link = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
416 $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags) $(Strip)
417 Relink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
418 $(CXX.Flags) $(CompileCommonOpts) $(Relink.Flags)
419 LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
421 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
422 ScriptInstall = $(INSTALL) -m 0755
423 DataInstall = $(INSTALL) -m 0644
424 TableGen = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include \
425 -I $(PROJ_SRC_ROOT)/lib/Target
426 Archive = $(AR) $(AR.Flags)
427 LArchive = $(LLVMToolDir)/llvm-ar rcsf
434 #----------------------------------------------------------
435 # Get the list of source files and compute object file
437 #----------------------------------------------------------
440 Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \
441 $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c $(PROJ_SRC_DIR)/*.y \
442 $(PROJ_SRC_DIR)/*.l))
444 Sources := $(SOURCES)
448 Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES))
451 BaseNameSources := $(sort $(basename $(Sources)))
453 ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
454 ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo)
455 ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
457 ###############################################################################
458 # DIRECTORIES: Handle recursive descent of directory structure
459 ###############################################################################
461 #---------------------------------------------------------
462 # Provide rules to make install dirs. This must be early
463 # in the file so they get built before dependencies
464 #---------------------------------------------------------
466 $(PROJ_bindir): $(PROJ_bindir)/.dir
467 $(PROJ_libdir): $(PROJ_libdir)/.dir
468 $(PROJ_includedir): $(PROJ_includedir)/.dir
469 $(PROJ_etcdir): $(PROJ_etcdir)/.dir
471 # To create other directories, as needed, and timestamp their creation
473 $(Verb) $(MKDIR) $* > /dev/null
476 .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
477 .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
479 #---------------------------------------------------------
480 # Handle the DIRS options for sequential construction
481 #---------------------------------------------------------
486 $(RecursiveTargets)::
487 $(Verb) for dir in $(DIRS); do \
488 if [ ! -f $$dir/Makefile ]; then \
490 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
492 ($(MAKE) -C $$dir $@ ) || exit 1; \
496 #---------------------------------------------------------
497 # Handle the EXPERIMENTAL_DIRS options ensuring success
498 # after each directory is built.
499 #---------------------------------------------------------
500 ifdef EXPERIMENTAL_DIRS
501 $(RecursiveTargets)::
502 $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
503 if [ ! -f $$dir/Makefile ]; then \
505 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
507 ($(MAKE) -C $$dir $@ ) || exit 0; \
511 #-----------------------------------------------------------
512 # Handle the PARALLEL_DIRS options for parallel construction
513 #-----------------------------------------------------------
516 SubDirs += $(PARALLEL_DIRS)
518 # Unfortunately, this list must be maintained if new recursive targets are added
519 all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS))
520 clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS))
521 clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
522 install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS))
523 uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
524 install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS))
526 ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
529 $(Verb) if [ ! -f $(@D)/Makefile ]; then \
531 $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
533 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) ;
536 #---------------------------------------------------------
537 # Handle the OPTIONAL_DIRS options for directores that may
539 #---------------------------------------------------------
542 SubDirs += $(OPTIONAL_DIRS)
544 $(RecursiveTargets)::
545 $(Verb) for dir in $(OPTIONAL_DIRS); do \
546 if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
547 if [ ! -f $$dir/Makefile ]; then \
549 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
551 ($(MAKE) -C$$dir $@ ) || exit 1; \
556 #---------------------------------------------------------
557 # Handle the CONFIG_FILES options
558 #---------------------------------------------------------
561 install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
562 $(Echo) Installing Configuration Files To $(PROJ_etcdir)
563 $(Verb)for file in $(CONFIG_FILES); do \
564 if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
565 $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
566 elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
567 $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
569 $(ECHO) Error: cannot find config file $${file}. ; \
574 $(Echo) Uninstalling Configuration Files From $(PROJ_etcdir)
575 $(Verb)for file in $(CONFIG_FILES); do \
576 $(RM) -f $(PROJ_etcdir)/$${file} ; \
581 ###############################################################################
582 # Set up variables for building libararies
583 ###############################################################################
585 #---------------------------------------------------------
586 # Handle the special "JIT" value for LLVM_LIBS which is a
587 # shorthand for a bunch of libraries that get the correct
588 # JIT support for a library or a tool that runs JIT.
589 #---------------------------------------------------------
590 ifeq ($(firstword $(LLVMLIBS)),config)
591 LLVM_CONFIG := $(LLVM_SRC_ROOT)/utils/llvm-config/llvm-config
592 LLVMLIBS := $(shell $(LLVM_CONFIG) --libnames $(wordlist 2,9999,$(LLVMLIBS)))
593 LLVMLIBS := $(patsubst lib%.a,%.a,$(LLVMLIBS))
594 LLVMLIBS := $(patsubst %.o,%,$(LLVMLIBS))
597 ifeq ($(LLVMLIBS),JIT)
599 # Make sure we can get our own symbols in the tool
602 # Generic JIT libraries
603 JIT_LIBS := LLVMInterpreter LLVMJIT LLVMCodeGen LLVMExecutionEngine
605 # You can enable the X86 JIT on a non-X86 host by setting the flag
606 # ENABLE_X86_JIT on the make command line. If not, it will still be
607 # enabled automagically on an X86 host.
612 # What the X86 JIT requires
614 JIT_LIBS += LLVMX86 LLVMSelectionDAG
617 # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
618 # ENABLE_PPC_JIT on the make command line. If not, it will still be
619 # enabled automagically on an PowerPC host.
620 ifeq ($(ARCH), PowerPC)
624 # What the PowerPC JIT requires
626 JIT_LIBS += LLVMPowerPC LLVMSelectionDAG
629 # You can enable the Alpha JIT on a non-Alpha host by setting the flag
630 # ENABLE_ALPHA_JIT on the make command line. If not, it will still be
631 # enabled automagically on an Alpha host.
632 ifeq ($(ARCH), Alpha)
636 # What the Alpha JIT requires
637 ifdef ENABLE_ALPHA_JIT
638 JIT_LIBS += LLVMAlpha LLVMSelectionDAG
641 LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \
642 LLVMBCReader.a LLVMTarget.a LLVMCore.a LLVMSupport.a LLVMbzip2.a \
643 LLVMSystem.a $(PLATFORMLIBDL)
646 #---------------------------------------------------------
647 # Define various command line options pertaining to the
648 # libraries needed when linking. There are "Proj" libs
649 # (defined by the user's project) and "LLVM" libs (defined
650 # by the # LLVM project).
651 #---------------------------------------------------------
653 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
654 ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions))
655 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
656 LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions))
657 ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
658 LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS)))
659 ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs))
660 LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs))
662 ###############################################################################
663 # Library Build Rules: Four ways to build a library
664 ###############################################################################
666 #---------------------------------------------------------
667 # Bytecode Module Targets:
668 # If the user set MODULE_NAME then they want to build a
669 # bytecode module from the sources. We compile all the
670 # sources and link it together into a single bytecode
672 #---------------------------------------------------------
675 ifeq ($(strip $(LLVMGCC)),)
676 $(warning Modules require llvm-gcc but no llvm-gcc is available ****)
679 Module := $(LibDir)/$(MODULE_NAME).bc
680 LinkModule := $(GCCLD) -L$(CFERuntimeLibDir)
683 ifdef EXPORTED_SYMBOL_FILE
684 LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
687 $(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD)
688 $(Echo) Building $(BuildMode) Bytecode Module $(notdir $@)
689 $(Verb) $(LinkModule) -o $@ $(ObjectsBC)
691 all-local:: $(Module)
694 ifneq ($(strip $(Module)),)
695 -$(Verb) $(RM) -f $(Module)
698 ifdef BYTECODE_DESTINATION
699 ModuleDestDir := $(BYTECODE_DESTINATION)
701 ModuleDestDir := $(PROJ_libdir)
704 DestModule := $(ModuleDestDir)/$(MODULE_NAME).bc
706 install-module:: $(DestModule)
707 install-local:: $(DestModule)
709 $(DestModule): $(ModuleDestDir) $(Module)
710 $(Echo) Installing $(BuildMode) Bytecode Module $(DestModule)
711 $(Verb) $(DataInstall) $(Module) $(DestModule)
714 $(Echo) Uninstalling $(BuildMode) Bytecode Module $(DestModule)
715 -$(Verb) $(RM) -f $(DestModule)
720 # if we're building a library ...
723 # Make sure there isn't any extranous whitespace on the LIBRARYNAME option
724 LIBRARYNAME := $(strip $(LIBRARYNAME))
725 ifdef LOADABLE_MODULE
726 LibName.LA := $(LibDir)/$(LIBRARYNAME).la
728 LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la
730 LibName.A := $(LibDir)/lib$(LIBRARYNAME).a
731 LibName.O := $(LibDir)/$(LIBRARYNAME).o
732 LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca
734 #---------------------------------------------------------
735 # Shared Library Targets:
736 # If the user asked for a shared library to be built
737 # with the SHARED_LIBRARY variable, then we provide
738 # targets for building them.
739 #---------------------------------------------------------
742 all-local:: $(LibName.LA)
744 ifdef LINK_LIBS_IN_SHARED
745 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
746 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
747 $(Verb) $(Link) -o $@ $(ObjectsLO) \
748 $(ProjLibsOptions) $(LLVMLibsOptions)
749 $(Verb) $(LTInstall) $@ $(LibDir)
751 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
752 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
753 $(Verb) $(Link) -o $@ $(ObjectsLO)
754 $(Verb) $(LTInstall) $@ $(LibDir)
758 ifneq ($(strip $(LibName.LA)),)
759 -$(Verb) $(RM) -f $(LibName.LA)
762 DestSharedLib = $(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
764 install-local:: $(DestSharedLib)
766 $(DestSharedLib): $(PROJ_libdir) $(LibName.LA)
767 $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
768 $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
769 $(Verb) $(LIBTOOL) --finish $(PROJ_libdir)
772 $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
773 -$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
777 #---------------------------------------------------------
778 # Bytecode Library Targets:
779 # If the user asked for a bytecode library to be built
780 # with the BYTECODE_LIBRARY variable, then we provide
781 # targets for building them.
782 #---------------------------------------------------------
783 ifdef BYTECODE_LIBRARY
784 ifeq ($(strip $(LLVMGCC)),)
785 $(warning Bytecode libraries require llvm-gcc which could not be found ****)
788 all-local:: $(LibName.BCA)
790 ifdef EXPORTED_SYMBOL_FILE
791 BCLinkLib = $(GCCLD) -L$(CFERuntimeLibDir) \
792 -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
794 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \
795 $(LLVMToolDir)/llvm-ar
796 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \
798 $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC)
800 $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o
802 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir \
803 $(LLVMToolDir)/llvm-ar
804 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@)
806 $(Verb) $(LArchive) $@ $(ObjectsBC)
811 ifneq ($(strip $(LibName.BCA)),)
812 -$(Verb) $(RM) -f $(LibName.BCA)
815 ifdef BYTECODE_DESTINATION
816 BytecodeDestDir := $(BYTECODE_DESTINATION)
818 BytecodeDestDir := $(PROJ_libdir)
821 DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).a
823 install-bytecode-local:: $(DestBytecodeLib)
825 install-local:: $(DestBytecodeLib)
827 $(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
828 $(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib)
829 $(Verb) $(DataInstall) $(LibName.BCA) $(DestBytecodeLib)
832 $(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib)
833 -$(Verb) $(RM) -f $(DestBytecodeLib)
838 #---------------------------------------------------------
839 # ReLinked Library Targets:
840 # If the user explicitly requests a relinked library with
841 # BUILD_RELINKED, provide it. Otherwise, if they specify
842 # neither of BUILD_ARCHIVE or DONT_BUILD_RELINKED, give
844 #---------------------------------------------------------
846 ifndef DONT_BUILD_RELINKED
853 all-local:: $(LibName.O)
855 $(LibName.O): $(ObjectsO) $(LibDir)/.dir
856 $(Echo) Linking $(BuildMode) Object Library $(notdir $@)
857 $(Verb) $(Relink) -o $@ $(ObjectsO)
860 ifneq ($(strip $(LibName.O)),)
861 -$(Verb) $(RM) -f $(LibName.O)
864 DestRelinkedLib = $(PROJ_libdir)/$(LIBRARYNAME).o
866 install-local:: $(DestRelinkedLib)
868 $(DestRelinkedLib): $(PROJ_libdir) $(LibName.O)
869 $(Echo) Installing $(BuildMode) Object Library $(DestRelinkedLib)
870 $(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib)
873 $(Echo) Uninstalling $(BuildMode) Object Library $(DestRelinkedLib)
874 -$(Verb) $(RM) -f $(DestRelinkedLib)
878 #---------------------------------------------------------
879 # Archive Library Targets:
880 # If the user wanted a regular archive library built,
881 # then we provide targets for building them.
882 #---------------------------------------------------------
885 all-local:: $(LibName.A)
887 $(LibName.A): $(ObjectsO) $(LibDir)/.dir
888 $(Echo) Building $(BuildMode) Archive Library $(notdir $@)
890 $(Verb) $(Archive) $@ $(ObjectsO)
894 ifneq ($(strip $(LibName.A)),)
895 -$(Verb) $(RM) -f $(LibName.A)
898 DestArchiveLib := $(PROJ_libdir)/lib$(LIBRARYNAME).a
900 install-local:: $(DestArchiveLib)
902 $(DestArchiveLib): $(PROJ_libdir) $(LibName.A)
903 $(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
904 $(Verb) $(MKDIR) $(PROJ_libdir)
905 $(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib)
908 $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
909 -$(Verb) $(RM) -f $(DestArchiveLib)
916 ###############################################################################
917 # Tool Build Rules: Build executable tool based on TOOLNAME option
918 ###############################################################################
922 #---------------------------------------------------------
923 # Set up variables for building a tool.
924 #---------------------------------------------------------
926 ToolBuildPath := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT)
928 ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
931 #---------------------------------------------------------
932 # Tell make that we need to rebuild subdirectories before
933 # we can link the tool. This affects things like LLI which
934 # has library subdirectories.
935 #---------------------------------------------------------
936 $(ToolBuildPath): $(addsuffix /.makeall, $(PARALLEL_DIRS))
938 #---------------------------------------------------------
939 # Provide targets for building the tools
940 #---------------------------------------------------------
941 all-local:: $(ToolBuildPath)
944 ifneq ($(strip $(ToolBuildPath)),)
945 -$(Verb) $(RM) -f $(ToolBuildPath)
949 $(ToolBuildPath): $(ExmplDir)/.dir
951 $(ToolBuildPath): $(ToolDir)/.dir
954 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
955 $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
956 $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
957 $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
958 $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
961 DestTool = $(PROJ_bindir)/$(TOOLNAME)
963 install-local:: $(DestTool)
965 $(DestTool): $(PROJ_bindir) $(ToolBuildPath)
966 $(Echo) Installing $(BuildMode) $(DestTool)
967 $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
970 $(Echo) Uninstalling $(BuildMode) $(DestTool)
971 -$(Verb) $(RM) -f $(DestTool)
975 ###############################################################################
976 # Object Build Rules: Build object files based on sources
977 ###############################################################################
979 # FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
981 DISABLE_AUTO_DEPENDENCIES=1
984 # Provide rule sets for when dependency generation is enabled
985 ifndef DISABLE_AUTO_DEPENDENCIES
987 #---------------------------------------------------------
988 # Create .lo files in the ObjDir directory from the .cpp and .c files...
989 #---------------------------------------------------------
992 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
993 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
994 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
995 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
996 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
998 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
999 $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
1000 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
1001 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
1002 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
1004 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1005 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
1006 $(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
1007 then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \
1008 else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi
1010 #---------------------------------------------------------
1011 # Create .o files in the ObjDir directory from the .cpp and .c files...
1012 #---------------------------------------------------------
1015 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1016 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
1017 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
1018 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
1019 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
1021 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1022 $(Echo) "Compiling $*.cc for $(BuildMode) build"
1023 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
1024 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
1025 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
1027 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1028 $(Echo) "Compiling $*.c for $(BuildMode) build"
1029 $(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \
1030 then $(MV) -f "$(ObjDir)/$*.Cd" "$(ObjDir)/$*.d"; \
1031 else $(RM) -f "$(ObjDir)/$*.Cd"; exit 1; fi
1035 ## Rules for building preprocessed (.i/.ii) outputs.
1036 $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1037 $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file"
1038 $(Verb) $(Preprocess.CXX) $< -o $@
1040 $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1041 $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file"
1042 $(Verb) $(Preprocess.CXX) $< -o $@
1044 $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1045 $(Echo) "Compiling $*.c for $(BuildMode) build to .i file"
1046 $(Verb) $(Preprocess.C) $< -o $@
1049 #---------------------------------------------------------
1050 # Create .bc files in the ObjDir directory from .cpp .cc and .c files...
1051 #---------------------------------------------------------
1053 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1054 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1055 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1056 $< -o $@ -S -emit-llvm ; \
1057 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1058 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1060 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1061 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1062 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1063 $< -o $@ -S -emit-llvm ; \
1064 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1065 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1067 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1068 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1069 $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" \
1070 $< -o $@ -S -emit-llvm ; \
1071 then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
1072 else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
1074 # Provide alternate rule sets if dependencies are disabled
1077 ifdef SHARED_LIBRARY
1079 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1080 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
1081 $(LTCompile.CXX) $< -o $@
1083 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1084 $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
1085 $(LTCompile.CXX) $< -o $@
1087 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1088 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
1089 $(LTCompile.C) $< -o $@
1093 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1094 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
1095 $(Compile.CXX) $< -o $@
1097 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1098 $(Echo) "Compiling $*.cc for $(BuildMode) build"
1099 $(Compile.CXX) $< -o $@
1101 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1102 $(Echo) "Compiling $*.c for $(BuildMode) build"
1103 $(Compile.C) $< -o $@
1106 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1107 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1108 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1110 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1111 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1112 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1114 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1115 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1116 $(BCCompile.C) $< -o $@ -S -emit-llvm
1120 # make the C and C++ compilers strip debug info out of bytecode libraries.
1122 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1123 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1124 $(Verb) $(GCCAS) $< -o $@
1126 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1127 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1128 $(Verb) $(GCCAS) -strip-debug $< -o $@
1132 #---------------------------------------------------------
1133 # Provide rule to build .bc files from .ll sources,
1134 # regardless of dependencies
1135 #---------------------------------------------------------
1136 $(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS)
1137 $(Echo) "Compiling $*.ll for $(BuildMode) build"
1138 $(Verb) $(LLVMAS) $< -f -o $@
1140 ###############################################################################
1141 # TABLEGEN: Provide rules for running tblgen to produce *.inc files
1142 ###############################################################################
1146 TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \
1147 $(LLVM_SRC_ROOT)/lib/Target/Target.td \
1148 $(LLVM_SRC_ROOT)/lib/Target/TargetSelectionDAG.td \
1149 $(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td)
1150 INCFiles := $(filter %.inc,$(BUILT_SOURCES))
1151 INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
1152 .PRECIOUS: $(INCTMPFiles) $(INCFiles)
1154 # All of these files depend on tblgen and the .td files.
1155 $(INCTMPFiles) : $(TBLGEN) $(TDFiles)
1157 # INCFiles rule: All of the tblgen generated files are emitted to
1158 # $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows
1159 # us to only "touch" the real file if the contents of it change. IOW, if
1160 # tblgen is modified, all of the .inc.tmp files are regereated, but no
1161 # dependencies of the .inc files are, unless the contents of the .inc file
1163 $(INCFiles) : %.inc : $(ObjDir)/%.inc.tmp
1164 $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
1166 $(TARGET:%=$(ObjDir)/%GenRegisterNames.inc.tmp): \
1167 $(ObjDir)/%GenRegisterNames.inc.tmp : %.td $(ObjDir)/.dir
1168 $(Echo) "Building $(<F) register names with tblgen"
1169 $(Verb) $(TableGen) -gen-register-enums -o $@ $<
1171 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.h.inc.tmp): \
1172 $(ObjDir)/%GenRegisterInfo.h.inc.tmp : %.td $(ObjDir)/.dir
1173 $(Echo) "Building $(<F) register information header with tblgen"
1174 $(Verb) $(TableGen) -gen-register-desc-header -o $@ $<
1176 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.inc.tmp): \
1177 $(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir
1178 $(Echo) "Building $(<F) register info implementation with tblgen"
1179 $(Verb) $(TableGen) -gen-register-desc -o $@ $<
1181 $(TARGET:%=$(ObjDir)/%GenInstrNames.inc.tmp): \
1182 $(ObjDir)/%GenInstrNames.inc.tmp : %.td $(ObjDir)/.dir
1183 $(Echo) "Building $(<F) instruction names with tblgen"
1184 $(Verb) $(TableGen) -gen-instr-enums -o $@ $<
1186 $(TARGET:%=$(ObjDir)/%GenInstrInfo.inc.tmp): \
1187 $(ObjDir)/%GenInstrInfo.inc.tmp : %.td $(ObjDir)/.dir
1188 $(Echo) "Building $(<F) instruction information with tblgen"
1189 $(Verb) $(TableGen) -gen-instr-desc -o $@ $<
1191 $(TARGET:%=$(ObjDir)/%GenAsmWriter.inc.tmp): \
1192 $(ObjDir)/%GenAsmWriter.inc.tmp : %.td $(ObjDir)/.dir
1193 $(Echo) "Building $(<F) assembly writer with tblgen"
1194 $(Verb) $(TableGen) -gen-asm-writer -o $@ $<
1196 $(TARGET:%=$(ObjDir)/%GenAsmWriter1.inc.tmp): \
1197 $(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir
1198 $(Echo) "Building $(<F) assembly writer #1 with tblgen"
1199 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
1201 $(TARGET:%=$(ObjDir)/%GenCodeEmitter.inc.tmp): \
1202 $(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir
1203 $(Echo) "Building $(<F) code emitter with tblgen"
1204 $(Verb) $(TableGen) -gen-emitter -o $@ $<
1206 $(TARGET:%=$(ObjDir)/%GenDAGISel.inc.tmp): \
1207 $(ObjDir)/%GenDAGISel.inc.tmp : %.td $(ObjDir)/.dir
1208 $(Echo) "Building $(<F) instruction selector implementation with tblgen"
1209 $(Verb) $(TableGen) -gen-dag-isel -o $@ $<
1211 $(TARGET:%=$(ObjDir)/%GenSubtarget.inc.tmp): \
1212 $(ObjDir)/%GenSubtarget.inc.tmp : %.td $(ObjDir)/.dir
1213 $(Echo) "Building $(<F) subtarget information with tblgen"
1214 $(Verb) $(TableGen) -gen-subtarget -o $@ $<
1217 -$(Verb) $(RM) -f $(INCFiles)
1221 ###############################################################################
1222 # LEX AND YACC: Provide rules for generating sources with lex and yacc
1223 ###############################################################################
1225 #---------------------------------------------------------
1226 # Provide rules for generating a .cpp source file from
1227 # (f)lex input sources.
1228 #---------------------------------------------------------
1230 LexFiles := $(filter %.l,$(Sources))
1232 ifneq ($(LexFiles),)
1234 # Cancel built-in rules for lex
1238 all:: $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs)
1240 # Note the extra sed filtering here, used to cut down on the warnings emited
1241 # by GCC. The last line is a gross hack to work around flex aparently not
1242 # being able to resize the buffer on a large token input. Currently, for
1243 # uninitialized string buffers in LLVM we can generate very long tokens, so
1244 # this is a hack around it.
1245 # FIXME. (f.e. char Buffer[10000] )
1246 $(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
1247 $(Echo) Flexing $*.l
1248 $(Verb) $(FLEX) -t $(PROJ_SRC_DIR)/$*.l | \
1249 $(SED) 's/void yyunput/inline void yyunput/' | \
1250 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
1251 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
1252 > $(PROJ_SRC_DIR)/$*.cpp
1254 # IFF the .l file has changed since it was last checked into CVS, copy the .l
1255 # file to .l.cvs and the generated .cpp file to .cpp.cvs. We use this mechanism
1256 # so that people without flex can build LLVM by copying the .cvs files to the
1257 # source location and building them.
1258 $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1259 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1260 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
1261 ($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)
1263 $(LexFiles:%.l=$(ObjDir)/%.o) : \
1264 $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1267 -$(Verb) $(RM) -f $(LexOutput)
1271 #---------------------------------------------------------
1272 # Provide rules for generating a .cpp and .h source files
1273 # from yacc (bison) input sources.
1274 #---------------------------------------------------------
1276 YaccFiles := $(filter %.y,$(Sources))
1277 ifneq ($(YaccFiles),)
1279 .PRECIOUS: $(YaccOutput)
1281 all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
1283 # Cancel built-in rules for yacc
1288 # Rule for building the bison based parsers...
1289 $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
1290 $(Echo) "Bisoning $*.y"
1291 $(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
1292 $(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
1293 $(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
1295 # IFF the .y file has changed since it was last checked into CVS, copy the .y
1296 # file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs. We use this
1297 # mechanism so that people without flex can build LLVM by copying the .cvs files
1298 # to the source location and building them.
1299 $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1300 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1301 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs || \
1303 $(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
1304 $(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
1307 $(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1309 YaccOutput := $(YaccFiles:%.y=%.output)
1312 -$(Verb) $(RM) -f $(YaccOutput)
1315 ###############################################################################
1316 # OTHER RULES: Other rules needed
1317 ###############################################################################
1319 # To create postscript files from dot files...
1320 ifneq ($(DOT),false)
1322 $(DOT) -Tps < $< > $@
1325 $(Echo) "Cannot build $@: The program dot is not installed"
1328 # This rules ensures that header files that are removed still have a rule for
1329 # which they can be "generated." This allows make to ignore them and
1330 # reproduce the dependency lists.
1334 # Define clean-local to clean the current directory. Note that this uses a
1335 # very conservative approach ensuring that empty variables do not cause
1336 # errors or disastrous removal.
1338 ifneq ($(strip $(ObjDir)),)
1339 -$(Verb) $(RM) -rf $(ObjDir)
1341 -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
1342 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
1343 -$(Verb) $(RM) -f *$(SHLIBEXT)
1347 -$(Verb) $(RM) -rf Debug Release Profile
1349 # Build tags database for Emacs/Xemacs:
1353 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1354 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1355 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1356 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1357 -name '*.cpp' -o -name '*.h' | \
1358 $(ETAGS) $(ETAGSFLAGS) -
1361 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1362 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1363 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1364 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1365 \( -name '*.cpp' -o -name '*.h' \) -print | \
1366 ctags -ImtT -o $(PROJ_OBJ_ROOT)/CTAGS -L -
1369 ###############################################################################
1370 # DEPENDENCIES: Include the dependency files if we should
1371 ###############################################################################
1372 ifndef DISABLE_AUTO_DEPENDENCIES
1374 # If its not one of the cleaning targets
1375 ifneq ($strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),)
1377 # Get the list of dependency files
1378 DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources)))
1379 DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d)
1381 -include /dev/null $(DependFiles)
1387 ###############################################################################
1388 # CHECK: Running the test suite
1389 ###############################################################################
1392 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1393 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1394 $(EchoCmd) Running test suite ; \
1395 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local \
1396 TESTSUITE=$(TESTSUITE) ; \
1398 $(EchoCmd) No Makefile in test directory ; \
1401 $(EchoCmd) No test directory ; \
1404 ###############################################################################
1405 # DISTRIBUTION: Handle construction of a distribution tarball
1406 ###############################################################################
1408 #------------------------------------------------------------------------
1409 # Define distribution related variables
1410 #------------------------------------------------------------------------
1411 DistName := $(PROJECT_NAME)-$(PROJ_VERSION)
1412 DistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1413 TopDistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1414 DistTarGZip := $(PROJ_OBJ_ROOT)/$(DistName).tar.gz
1415 DistZip := $(PROJ_OBJ_ROOT)/$(DistName).zip
1416 DistTarBZ2 := $(PROJ_OBJ_ROOT)/$(DistName).tar.bz2
1417 DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \
1418 ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
1419 Makefile.config.in configure autoconf
1420 DistOther := $(notdir $(wildcard \
1421 $(PROJ_SRC_DIR)/*.h \
1422 $(PROJ_SRC_DIR)/*.td \
1423 $(PROJ_SRC_DIR)/*.def \
1424 $(PROJ_SRC_DIR)/*.ll \
1425 $(PROJ_SRC_DIR)/*.in))
1426 DistSubDirs := $(SubDirs)
1427 DistSources = $(Sources) $(EXTRA_DIST)
1428 DistFiles = $(DistAlways) $(DistSources) $(DistOther)
1430 #------------------------------------------------------------------------
1431 # We MUST build distribution with OBJ_DIR != SRC_DIR
1432 #------------------------------------------------------------------------
1433 ifeq ($(PROJ_SRC_DIR),$(PROJ_OBJ_DIR))
1434 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1435 $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
1439 #------------------------------------------------------------------------
1440 # Prevent attempt to run dist targets from anywhere but the top level
1441 #------------------------------------------------------------------------
1443 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1444 $(Echo) ERROR: You must run $@ from $(PROJ_OBJ_ROOT)
1447 #------------------------------------------------------------------------
1448 # Provide the top level targets
1449 #------------------------------------------------------------------------
1451 dist-gzip:: $(DistTarGZip)
1453 $(DistTarGZip) : $(TopDistDir)/.makedistdir
1454 $(Echo) Packing gzipped distribution tar file.
1455 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \
1456 $(GZIP) -c > "$(DistTarGZip)"
1458 dist-bzip2:: $(DistTarBZ2)
1460 $(DistTarBZ2) : $(TopDistDir)/.makedistdir
1461 $(Echo) Packing bzipped distribution tar file.
1462 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \
1463 $(BZIP2) -c >$(DistTarBZ2)
1465 dist-zip:: $(DistZip)
1467 $(DistZip) : $(TopDistDir)/.makedistdir
1468 $(Echo) Packing zipped distribution file.
1469 $(Verb) rm -f $(DistZip)
1470 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
1472 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
1473 $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
1475 DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir
1477 dist-check:: $(DistTarGZip)
1478 $(Echo) Checking distribution tar file.
1479 $(Verb) if test -d $(DistCheckDir) ; then \
1480 $(RM) -rf $(DistCheckDir) ; \
1482 $(Verb) $(MKDIR) $(DistCheckDir)
1483 $(Verb) cd $(DistCheckDir) && \
1484 $(MKDIR) $(DistCheckDir)/build && \
1485 $(MKDIR) $(DistCheckDir)/install && \
1486 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
1488 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
1489 --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
1492 $(MAKE) install && \
1493 $(MAKE) uninstall && \
1494 $(MAKE) dist-clean && \
1495 $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution =====
1498 $(Echo) Cleaning distribution files
1499 -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \
1504 #------------------------------------------------------------------------
1505 # Provide the recursive distdir target for building the distribution directory
1506 #------------------------------------------------------------------------
1507 distdir: $(DistDir)/.makedistdir
1508 $(DistDir)/.makedistdir: $(DistSources)
1509 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1510 if test -d "$(DistDir)" ; then \
1511 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
1514 $(EchoCmd) Removing old $(DistDir) ; \
1515 $(RM) -rf $(DistDir); \
1516 $(EchoCmd) Making 'all' to verify build ; \
1517 $(MAKE) ENABLE_OPTIMIZED=1 all ; \
1519 $(Echo) Building Distribution Directory $(DistDir)
1520 $(Verb) $(MKDIR) $(DistDir)
1521 $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \
1522 srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \
1523 for file in $(DistFiles) ; do \
1525 $(PROJ_SRC_DIR)/*) \
1526 file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \
1528 $(PROJ_SRC_ROOT)/*) \
1529 file=`echo "$$file" | \
1530 sed "s#^$$srcrootstrip/##"` \
1533 if test -f "$(PROJ_SRC_DIR)/$$file" || \
1534 test -d "$(PROJ_SRC_DIR)/$$file" ; then \
1535 from_dir="$(PROJ_SRC_DIR)" ; \
1536 elif test -f "$$file" || test -d "$$file" ; then \
1539 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \
1540 if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \
1541 to_dir="$(DistDir)/$$dir"; \
1542 $(MKDIR) "$$to_dir" ; \
1544 to_dir="$(DistDir)"; \
1546 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
1547 if test -n "$$mid_dir" ; then \
1548 $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
1550 if test -d "$$from_dir/$$file"; then \
1551 if test -d "$(PROJ_SRC_DIR)/$$file" && \
1552 test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \
1553 cd $(PROJ_SRC_DIR) ; \
1554 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1555 ( cd $$to_dir ; $(TAR) xf - ) ; \
1556 cd $(PROJ_OBJ_DIR) ; \
1559 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1560 ( cd $$to_dir ; $(TAR) xf - ) ; \
1561 cd $(PROJ_OBJ_DIR) ; \
1563 elif test -f "$$from_dir/$$file" ; then \
1564 $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
1565 elif test -L "$$from_dir/$$file" ; then \
1566 $(CP) -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
1567 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
1568 $(EchoCmd) "===== WARNING: Distribution Source " \
1569 "$$from_dir/$$file Not Found!" ; \
1570 elif test "$(Verb)" != '@' ; then \
1571 $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \
1574 $(Verb) for subdir in $(DistSubDirs) ; do \
1575 if test "$$subdir" \!= "." ; then \
1576 new_distdir="$(DistDir)/$$subdir" ; \
1577 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
1578 ( cd $$subdir && $(MAKE) ENABLE_OPTIMIZED=1 \
1579 DistDir="$$new_distdir" distdir ) || exit 1; \
1582 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1583 $(EchoCmd) Eliminating CVS/.svn directories from distribution ; \
1584 $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o \
1585 -name .svn \) -print` ;\
1586 $(MAKE) dist-hook ; \
1587 $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \
1588 -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \
1589 -o ! -type d ! -perm -400 -exec chmod a+r {} \; \
1590 -o ! -type d ! -perm -444 -exec \
1591 $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
1592 || chmod -R a+r $(DistDir) ; \
1595 # This is invoked by distdir target, define it as a no-op to avoid errors if not
1601 ###############################################################################
1602 # TOP LEVEL - targets only to apply at the top level directory
1603 ###############################################################################
1607 #------------------------------------------------------------------------
1608 # Install support for the project's include files:
1609 #------------------------------------------------------------------------
1611 $(Echo) Installing include files
1612 $(Verb) $(MKDIR) $(PROJ_includedir)
1613 $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
1614 cd $(PROJ_SRC_ROOT)/include && \
1615 for hdr in `find . -type f '!' '(' -name '*~' -o -name '.cvsignore' \
1616 -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS ` ; do \
1617 instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
1618 if test \! -d "$$instdir" ; then \
1619 $(EchoCmd) Making install directory $$instdir ; \
1620 $(MKDIR) $$instdir ;\
1622 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1625 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
1626 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
1627 cd $(PROJ_OBJ_ROOT)/include && \
1628 for hdr in `find . -type f -print | grep -v CVS` ; do \
1629 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1635 $(Echo) Uninstalling include files
1636 $(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
1637 cd $(PROJ_SRC_ROOT)/include && \
1638 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
1639 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' \
1640 -o -name '*.in' ')' -print ')' | \
1641 grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
1642 cd $(PROJ_SRC_ROOT)/include && \
1643 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
1644 -print ')' | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
1649 #------------------------------------------------------------------------
1650 # Print out the directories used for building
1651 #------------------------------------------------------------------------
1653 $(Echo) "BuildMode : " '$(BuildMode)'
1654 $(Echo) "PROJ_SRC_ROOT: " '$(PROJ_SRC_ROOT)'
1655 $(Echo) "PROJ_SRC_DIR : " '$(PROJ_SRC_DIR)'
1656 $(Echo) "PROJ_OBJ_ROOT: " '$(PROJ_OBJ_ROOT)'
1657 $(Echo) "PROJ_OBJ_DIR : " '$(PROJ_OBJ_DIR)'
1658 $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
1659 $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
1660 $(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
1661 $(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
1662 $(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
1663 $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
1664 $(Echo) "PROJ_includedir : " '$(PROJ_includedir)'
1665 $(Echo) "UserTargets : " '$(UserTargets)'
1666 $(Echo) "ObjMakefiles : " '$(ObjMakefiles)'
1667 $(Echo) "SrcMakefiles : " '$(SrcMakefiles)'
1668 $(Echo) "ObjDir : " '$(ObjDir)'
1669 $(Echo) "LibDir : " '$(LibDir)'
1670 $(Echo) "ToolDir : " '$(ToolDir)'
1671 $(Echo) "ExmplDir : " '$(ExmplDir)'
1672 $(Echo) "Sources : " '$(Sources)'
1673 $(Echo) "TDFiles : " '$(TDFiles)'
1674 $(Echo) "INCFiles : " '$(INCFiles)'
1675 $(Echo) "INCTMPFiles : " '$(INCTMPFiles)'
1676 $(Echo) "PreConditions: " '$(PreConditions)'
1677 $(Echo) "Compile.CXX : " '$(Compile.CXX)'
1678 $(Echo) "Compile.C : " '$(Compile.C)'
1679 $(Echo) "Archive : " '$(Archive)'
1680 $(Echo) "YaccFiles : " '$(YaccFiles)'
1681 $(Echo) "LexFiles : " '$(LexFiles)'
1682 $(Echo) "Module : " '$(Module)'
1683 $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'
1684 $(Echo) "SubDirs : " '$(SubDirs)'