1 #===-- Makefile.rules - Common make rules for LLVM ---------*- Makefile -*--===#
3 # The LLVM Compiler Infrastructure
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
8 #===------------------------------------------------------------------------===#
10 # This file is included by all of the LLVM makefiles. For details on how to use
11 # it properly, please see the document MakefileGuide.html in the docs directory.
13 #===-----------------------------------------------------------------------====#
15 ################################################################################
16 # TARGETS: Define standard targets that can be invoked
17 ################################################################################
19 #--------------------------------------------------------------------
20 # Define the various target sets
21 #--------------------------------------------------------------------
22 RecursiveTargets := all clean clean-all install uninstall install-bytecode
23 LocalTargets := all-local clean-local clean-all-local check-local \
24 install-local printvars uninstall-local \
25 install-bytecode-local
26 TopLevelTargets := check dist dist-check dist-clean tags dist-gzip dist-bzip2 \
28 UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
29 InternalTargets := preconditions distdir dist-hook
31 ################################################################################
32 # INITIALIZATION: Basic things the makefile needs
33 ################################################################################
35 #--------------------------------------------------------------------
36 # Set the VPATH so that we can find source files.
37 #--------------------------------------------------------------------
40 #--------------------------------------------------------------------
41 # Reset the list of suffixes we know how to build
42 #--------------------------------------------------------------------
44 .SUFFIXES: .c .cpp .cc .h .hpp .y .l .lo .o .a .bc .td .ps .dot .ll
45 .SUFFIXES: $(SHLIBEXT) $(SUFFIXES)
47 #--------------------------------------------------------------------
48 # Mark all of these targets as phony to avoid implicit rule search
49 #--------------------------------------------------------------------
50 .PHONY: $(UserTargets) $(InternalTargets)
52 #--------------------------------------------------------------------
53 # Make sure all the user-target rules are double colon rules and
54 # they are defined first.
55 #--------------------------------------------------------------------
59 ################################################################################
60 # PRECONDITIONS: that which must be built/checked first
61 ################################################################################
63 SrcMakefiles := $(filter %Makefile %Makefile.tests,\
64 $(wildcard $(PROJ_SRC_DIR)/Makefile*))
65 ObjMakefiles := $(subst $(PROJ_SRC_DIR),$(PROJ_OBJ_DIR),$(SrcMakefiles))
66 ConfigureScript := $(PROJ_SRC_ROOT)/configure
67 ConfigStatusScript := $(PROJ_OBJ_ROOT)/config.status
68 MakefileConfigIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.config.in))
69 MakefileCommonIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.common.in))
70 MakefileConfig := $(PROJ_OBJ_ROOT)/Makefile.config
71 MakefileCommon := $(PROJ_OBJ_ROOT)/Makefile.common
72 PreConditions := $(ConfigStatusScript) $(ObjMakefiles)
73 ifneq ($(MakefileCommonIn),)
74 PreConditions += $(MakefileCommon)
76 ifneq ($(MakefileConfigIn),)
77 PreConditions += $(MakefileConfig)
80 preconditions: $(PreConditions)
82 #------------------------------------------------------------------------
83 # Make sure the BUILT_SOURCES are built first
84 #------------------------------------------------------------------------
85 $(filter-out clean clean-local,$(UserTargets)):: $(BUILT_SOURCES)
88 ifneq ($(strip $(BUILT_SOURCES)),)
89 -$(Verb) $(RM) -f $(BUILT_SOURCES)
92 ifneq ($(PROJ_OBJ_ROOT),$(PROJ_SRC_ROOT))
94 $(Verb) if test -x config.status ; then \
95 $(EchoCmd) Wiping out $(PROJ_OBJ_ROOT) ; \
96 $(MKDIR) .spotless.save ; \
97 $(MV) config.status .spotless.save ; \
98 $(MV) mklib .spotless.save ; \
99 $(MV) projects .spotless.save ; \
101 $(MV) .spotless.save/config.status . ; \
102 $(MV) .spotless.save/mklib . ; \
103 $(MV) .spotless.save/projects . ; \
104 $(RM) -rf .spotless.save ; \
105 $(EchoCmd) Rebuilding configuration of $(PROJ_OBJ_ROOT) ; \
106 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
107 $(ConfigStatusScript) ; \
109 $(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
113 $(EchoCmd) "spotless target not supported for objdir == srcdir"
116 $(BUILT_SOURCES) : $(ObjMakefiles)
118 #------------------------------------------------------------------------
119 # Make sure we're not using a stale configuration
120 #------------------------------------------------------------------------
122 $(Echo) Reconfiguring $(PROJ_OBJ_ROOT)
123 $(Verb) cd $(PROJ_OBJ_ROOT) && \
124 if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
125 $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
127 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
128 $(ConfigStatusScript)
130 .PRECIOUS: $(ConfigStatusScript)
131 $(ConfigStatusScript): $(ConfigureScript)
132 $(Echo) Reconfiguring with $<
133 $(Verb) cd $(PROJ_OBJ_ROOT) && \
134 if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
135 $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
137 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
138 $(ConfigStatusScript)
140 #------------------------------------------------------------------------
141 # Make sure the configuration makefile is up to date
142 #------------------------------------------------------------------------
143 ifneq ($(MakefileConfigIn),)
144 $(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript)
145 $(Echo) Regenerating $@
146 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config
149 ifneq ($(MakefileCommonIn),)
150 $(MakefileCommon): $(MakefileCommonIn) $(ConfigStatusScript)
151 $(Echo) Regenerating $@
152 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.common
155 #------------------------------------------------------------------------
156 # If the Makefile in the source tree has been updated, copy it over into the
157 # build tree. But, only do this if the source and object makefiles differ
158 #------------------------------------------------------------------------
159 ifneq ($(PROJ_OBJ_DIR),$(PROJ_SRC_DIR))
161 Makefile: $(PROJ_SRC_DIR)/Makefile
162 $(Echo) "Updating Makefile"
163 $(Verb) $(MKDIR) $(@D)
164 $(Verb) $(CP) -f $< $@
166 # Copy the Makefile.* files unless we're in the root directory which avoids
167 # the copying of Makefile.config.in or other things that should be explicitly
169 $(PROJ_OBJ_DIR)/Makefile% : $(PROJ_SRC_DIR)/Makefile%
171 *Makefile.rules) ;; \
173 *) $(Echo) "Updating $(@F)" ; \
180 #------------------------------------------------------------------------
181 # Set up the basic dependencies
182 #------------------------------------------------------------------------
183 $(UserTargets):: $(PreConditions)
187 clean-all:: clean-local clean-all-local
188 install:: install-local
189 uninstall:: uninstall-local
190 install-local:: all-local
191 install-bytecode:: install-bytecode-local
193 ###############################################################################
194 # VARIABLES: Set up various variables based on configuration data
195 ###############################################################################
197 #--------------------------------------------------------------------
198 # Variables derived from configuration we are building
199 #--------------------------------------------------------------------
201 # OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
202 # this can be overridden on the make command line.
204 OPTIMIZE_OPTION := -O3
206 OPTIMIZE_OPTION := -O2
209 ifdef ENABLE_PROFILING
211 CXX.Flags := $(OPTIMIZE_OPTION) -pg
212 C.Flags := $(OPTIMIZE_OPTION) -pg
213 LD.Flags := $(OPTIMIZE_OPTION) -pg
215 ifdef ENABLE_OPTIMIZED
217 # Don't use -fomit-frame-pointer on FreeBSD
218 ifneq ($(OS),FreeBSD)
219 # Don't use -fomit-frame-pointer on Darwin, it breaks backtraces.
221 OmitFramePointer := -fomit-frame-pointer
224 CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
225 C.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
226 LD.Flags := $(OPTIMIZE_OPTION)
236 # If DISABLE_ASSERTIONS=1 is specified (make command line or configured),
237 # then disable assertions by defining the appropriate preprocessor symbols.
238 ifdef DISABLE_ASSERTIONS
239 BuildMode := $(BuildMode)-Asserts
240 CXX.Flags += -DNDEBUG
243 CXX.Flags += -D_DEBUG
247 CXX.Flags += $(CXXFLAGS)
249 CPP.BaseFlags += $(CPPFLAGS)
250 LD.Flags += $(LDFLAGS)
252 LibTool.Flags := --tag=CXX
254 #Make Floating point ieee complient on alpha
257 CPP.BaseFlags += -mieee
260 #--------------------------------------------------------------------
261 # Directory locations
262 #--------------------------------------------------------------------
263 ObjDir := $(PROJ_OBJ_DIR)/$(BuildMode)
264 LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
265 ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
266 ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
267 LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
268 LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
269 LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
270 CFERuntimeLibDir := $(LLVMGCCDIR)/lib
272 #--------------------------------------------------------------------
273 # Full Paths To Compiled Tools and Utilities
274 #--------------------------------------------------------------------
275 EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]:
278 LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
281 LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
284 TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
287 GCCAS := $(LLVMToolDir)/gccas$(EXEEXT)
290 GCCLD := $(LLVMToolDir)/gccld$(EXEEXT)
293 LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
296 LLI := $(LLVMToolDir)/lli$(EXEEXT)
299 LLC := $(LLVMToolDir)/llc$(EXEEXT)
302 LOPT := $(LLVMToolDir)/opt$(EXEEXT)
305 LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT)
308 LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC)
309 LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX)
311 #--------------------------------------------------------------------
312 # Adjust to user's request
313 #--------------------------------------------------------------------
315 # Adjust LD.Flags and Libtool.Flags depending on the kind of library that is
316 # to be built. Note that if LOADABLE_MODULE is specified then the resulting
317 # shared library can be opened with dlopen
319 LD.Flags += -rpath $(LibDir)
320 ifdef LOADABLE_MODULE
324 LibTool.Flags += --tag=disable-shared
334 # Adjust settings for verbose mode
337 LibTool.Flags += --silent
338 AR.Flags += >/dev/null 2>/dev/null
339 ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1
341 ConfigureScriptFLAGS :=
344 # By default, strip symbol information from executable
346 Strip := $(PLATFORMSTRIPOPTS)
347 StripWarnMsg := "(without symbols)"
348 Install.StripFlag += -s
351 # Adjust linker flags for building an executable
354 LD.Flags += -rpath $(ExmplDir) -export-dynamic
356 LD.Flags += -rpath $(ToolDir) -export-dynamic
360 #----------------------------------------------------------
361 # Options To Invoke Tools
362 #----------------------------------------------------------
364 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -Wno-long-long \
368 CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
371 # If we are building a universal binary on Mac OS/X, pass extra options. This
372 # is useful to people that want to link the LLVM libraries into their universal
375 CompileCommonOpts += \
376 -arch i386 -arch ppc -isysroot /Developer/SDKs/MACOSX10.4u.sdk/
377 Relink.Flags := -XCClinker -arch -XCClinker i386 -XCClinker -arch \
378 -XCClinker ppc -XCClinker \
379 -isysroot -XCClinker /Developer/SDKs/MACOSX10.4u.sdk/
380 DISABLE_AUTO_DEPENDENCIES=1
383 # Temporary workaround for a Mac OSX compatibility issue.
385 CXX.Flags += -fno-use-cxa-atexit
388 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
389 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
390 # All -I flags should go here, so that they don't confuse llvm-config.
391 CPP.Flags += -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
392 -I$(PROJ_OBJ_ROOT)/include \
393 -I$(PROJ_SRC_ROOT)/include \
394 -I$(LLVM_OBJ_ROOT)/include \
395 -I$(LLVM_SRC_ROOT)/include \
398 Compile.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -c $(C.Flags)
399 LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C)
400 BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
402 Preprocess.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -E $(C.Flags)
404 Compile.CXX = $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c
405 LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX)
406 BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \
408 Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -E
409 Link = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
410 $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags) $(Strip)
411 Relink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
412 $(CXX.Flags) $(CompileCommonOpts) $(Relink.Flags)
413 LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
415 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
416 ScriptInstall = $(INSTALL) -m 0755
417 DataInstall = $(INSTALL) -m 0644
418 TableGen = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include \
419 -I $(PROJ_SRC_ROOT)/lib/Target
420 Archive = $(AR) $(AR.Flags)
421 LArchive = $(LLVMToolDir)/llvm-ar rcsf
428 #----------------------------------------------------------
429 # Get the list of source files and compute object file
431 #----------------------------------------------------------
434 Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \
435 $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c $(PROJ_SRC_DIR)/*.y \
436 $(PROJ_SRC_DIR)/*.l))
438 Sources := $(SOURCES)
442 Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES))
445 BaseNameSources := $(sort $(basename $(Sources)))
447 ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
448 ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo)
449 ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
451 ###############################################################################
452 # DIRECTORIES: Handle recursive descent of directory structure
453 ###############################################################################
455 #---------------------------------------------------------
456 # Provide rules to make install dirs. This must be early
457 # in the file so they get built before dependencies
458 #---------------------------------------------------------
460 $(PROJ_bindir): $(PROJ_bindir)/.dir
461 $(PROJ_libdir): $(PROJ_libdir)/.dir
462 $(PROJ_includedir): $(PROJ_includedir)/.dir
463 $(PROJ_etcdir): $(PROJ_etcdir)/.dir
465 # To create other directories, as needed, and timestamp their creation
467 $(Verb) $(MKDIR) $* > /dev/null
470 .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
471 .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
473 #---------------------------------------------------------
474 # Handle the DIRS options for sequential construction
475 #---------------------------------------------------------
480 $(RecursiveTargets)::
481 $(Verb) for dir in $(DIRS); do \
482 if [ ! -f $$dir/Makefile ]; then \
484 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
486 ($(MAKE) -C $$dir $@ ) || exit 1; \
490 #---------------------------------------------------------
491 # Handle the EXPERIMENTAL_DIRS options ensuring success
492 # after each directory is built.
493 #---------------------------------------------------------
494 ifdef EXPERIMENTAL_DIRS
495 $(RecursiveTargets)::
496 $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
497 if [ ! -f $$dir/Makefile ]; then \
499 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
501 ($(MAKE) -C $$dir $@ ) || exit 0; \
505 #-----------------------------------------------------------
506 # Handle the PARALLEL_DIRS options for parallel construction
507 #-----------------------------------------------------------
510 SubDirs += $(PARALLEL_DIRS)
512 # Unfortunately, this list must be maintained if new recursive targets are added
513 all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS))
514 clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS))
515 clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
516 install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS))
517 uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
518 install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS))
520 ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
523 $(Verb) if [ ! -f $(@D)/Makefile ]; then \
525 $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
527 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) ;
530 #---------------------------------------------------------
531 # Handle the OPTIONAL_DIRS options for directores that may
533 #---------------------------------------------------------
536 SubDirs += $(OPTIONAL_DIRS)
538 $(RecursiveTargets)::
539 $(Verb) for dir in $(OPTIONAL_DIRS); do \
540 if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
541 if [ ! -f $$dir/Makefile ]; then \
543 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
545 ($(MAKE) -C$$dir $@ ) || exit 1; \
550 #---------------------------------------------------------
551 # Handle the CONFIG_FILES options
552 #---------------------------------------------------------
555 install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
556 $(Echo) Installing Configuration Files To $(PROJ_etcdir)
557 $(Verb)for file in $(CONFIG_FILES); do \
558 if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
559 $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
560 elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
561 $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
563 $(ECHO) Error: cannot find config file $${file}. ; \
568 $(Echo) Uninstalling Configuration Files From $(PROJ_etcdir)
569 $(Verb)for file in $(CONFIG_FILES); do \
570 $(RM) -f $(PROJ_etcdir)/$${file} ; \
575 ###############################################################################
576 # Set up variables for building libararies
577 ###############################################################################
579 #---------------------------------------------------------
580 # Handle the special "JIT" value for LLVM_LIBS which is a
581 # shorthand for a bunch of libraries that get the correct
582 # JIT support for a library or a tool that runs JIT.
583 #---------------------------------------------------------
584 ifeq ($(firstword $(LLVMLIBS)),config)
585 LLVM_CONFIG := $(LLVM_SRC_ROOT)/utils/llvm-config/llvm-config
586 LLVMLIBS := $(shell $(LLVM_CONFIG) --libnames $(wordlist 2,9999,$(LLVMLIBS)))
587 LLVMLIBS := $(patsubst lib%.a,%.a,$(LLVMLIBS))
588 LLVMLIBS := $(patsubst %.o,%,$(LLVMLIBS))
591 ifeq ($(LLVMLIBS),JIT)
593 # Make sure we can get our own symbols in the tool
596 # Generic JIT libraries
597 JIT_LIBS := LLVMInterpreter LLVMJIT LLVMCodeGen LLVMExecutionEngine
599 # You can enable the X86 JIT on a non-X86 host by setting the flag
600 # ENABLE_X86_JIT on the make command line. If not, it will still be
601 # enabled automagically on an X86 host.
606 # What the X86 JIT requires
608 JIT_LIBS += LLVMX86 LLVMSelectionDAG
611 # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
612 # ENABLE_PPC_JIT on the make command line. If not, it will still be
613 # enabled automagically on an PowerPC host.
614 ifeq ($(ARCH), PowerPC)
618 # What the PowerPC JIT requires
620 JIT_LIBS += LLVMPowerPC LLVMSelectionDAG
623 # You can enable the Alpha JIT on a non-Alpha host by setting the flag
624 # ENABLE_ALPHA_JIT on the make command line. If not, it will still be
625 # enabled automagically on an Alpha host.
626 ifeq ($(ARCH), Alpha)
630 # What the Alpha JIT requires
631 ifdef ENABLE_ALPHA_JIT
632 JIT_LIBS += LLVMAlpha LLVMSelectionDAG
635 LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \
636 LLVMBCReader.a LLVMTarget.a LLVMCore.a LLVMSupport.a LLVMbzip2.a \
637 LLVMSystem.a $(PLATFORMLIBDL)
640 #---------------------------------------------------------
641 # Define various command line options pertaining to the
642 # libraries needed when linking. There are "Proj" libs
643 # (defined by the user's project) and "LLVM" libs (defined
644 # by the # LLVM project).
645 #---------------------------------------------------------
646 # Some versions of gcc on Alpha produce too many symbols, so use a .a file
648 USEDLIBS := $(subst LLVMCore, LLVMCore.a, $(USEDLIBS))
649 LLVMLIBS := $(subst LLVMCore, LLVMCore.a, $(LLVMLIBS))
655 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
656 ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions))
657 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
658 LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions))
659 ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
660 LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS)))
661 ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs))
662 LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs))
664 ###############################################################################
665 # Library Build Rules: Four ways to build a library
666 ###############################################################################
668 #---------------------------------------------------------
669 # Bytecode Module Targets:
670 # If the user set MODULE_NAME then they want to build a
671 # bytecode module from the sources. We compile all the
672 # sources and link it together into a single bytecode
674 #---------------------------------------------------------
677 ifeq ($(strip $(LLVMGCC)),)
678 $(warning Modules require llvm-gcc but no llvm-gcc is available ****)
681 Module := $(LibDir)/$(MODULE_NAME).bc
682 LinkModule := $(GCCLD) -L$(CFERuntimeLibDir)
685 ifdef EXPORTED_SYMBOL_FILE
686 LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
689 $(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD)
690 $(Echo) Building $(BuildMode) Bytecode Module $(notdir $@)
691 $(Verb) $(LinkModule) -o $@ $(ObjectsBC)
693 all-local:: $(Module)
696 ifneq ($(strip $(Module)),)
697 -$(Verb) $(RM) -f $(Module)
700 ifdef BYTECODE_DESTINATION
701 ModuleDestDir := $(BYTECODE_DESTINATION)
703 ModuleDestDir := $(PROJ_libdir)
706 DestModule := $(ModuleDestDir)/$(MODULE_NAME).bc
708 install-module:: $(DestModule)
709 install-local:: $(DestModule)
711 $(DestModule): $(ModuleDestDir) $(Module)
712 $(Echo) Installing $(BuildMode) Bytecode Module $(DestModule)
713 $(Verb) $(DataInstall) $(Module) $(DestModule)
716 $(Echo) Uninstalling $(BuildMode) Bytecode Module $(DestModule)
717 -$(Verb) $(RM) -f $(DestModule)
722 # if we're building a library ...
725 # Make sure there isn't any extranous whitespace on the LIBRARYNAME option
726 LIBRARYNAME := $(strip $(LIBRARYNAME))
727 ifdef LOADABLE_MODULE
728 LibName.LA := $(LibDir)/$(LIBRARYNAME).la
730 LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la
732 LibName.A := $(LibDir)/lib$(LIBRARYNAME).a
733 LibName.O := $(LibDir)/$(LIBRARYNAME).o
734 LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca
736 #---------------------------------------------------------
737 # Shared Library Targets:
738 # If the user asked for a shared library to be built
739 # with the SHARED_LIBRARY variable, then we provide
740 # targets for building them.
741 #---------------------------------------------------------
744 all-local:: $(LibName.LA)
746 ifdef LINK_LIBS_IN_SHARED
747 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
748 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
749 $(Verb) $(Link) -o $@ $(ObjectsLO) \
750 $(ProjLibsOptions) $(LLVMLibsOptions)
751 $(Verb) $(LTInstall) $@ $(LibDir)
753 $(LibName.LA): $(ObjectsLO) $(LibDir)/.dir
754 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
755 $(Verb) $(Link) -o $@ $(ObjectsLO)
756 $(Verb) $(LTInstall) $@ $(LibDir)
760 ifneq ($(strip $(LibName.LA)),)
761 -$(Verb) $(RM) -f $(LibName.LA)
764 DestSharedLib = $(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
766 install-local:: $(DestSharedLib)
768 $(DestSharedLib): $(PROJ_libdir) $(LibName.LA)
769 $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
770 $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
771 $(Verb) $(LIBTOOL) --finish $(PROJ_libdir)
774 $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
775 -$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
779 #---------------------------------------------------------
780 # Bytecode Library Targets:
781 # If the user asked for a bytecode library to be built
782 # with the BYTECODE_LIBRARY variable, then we provide
783 # targets for building them.
784 #---------------------------------------------------------
785 ifdef BYTECODE_LIBRARY
786 ifeq ($(strip $(LLVMGCC)),)
787 $(warning Bytecode libraries require llvm-gcc which could not be found ****)
790 all-local:: $(LibName.BCA)
792 ifdef EXPORTED_SYMBOL_FILE
793 BCLinkLib = $(GCCLD) -L$(CFERuntimeLibDir) \
794 -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
796 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \
797 $(LLVMToolDir)/llvm-ar
798 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \
800 $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC)
802 $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o
804 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir \
805 $(LLVMToolDir)/llvm-ar
806 $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@)
808 $(Verb) $(LArchive) $@ $(ObjectsBC)
813 ifneq ($(strip $(LibName.BCA)),)
814 -$(Verb) $(RM) -f $(LibName.BCA)
817 ifdef BYTECODE_DESTINATION
818 BytecodeDestDir := $(BYTECODE_DESTINATION)
820 BytecodeDestDir := $(PROJ_libdir)
823 DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).a
825 install-bytecode-local:: $(DestBytecodeLib)
827 install-local:: $(DestBytecodeLib)
829 $(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
830 $(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib)
831 $(Verb) $(DataInstall) $(LibName.BCA) $(DestBytecodeLib)
834 $(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib)
835 -$(Verb) $(RM) -f $(DestBytecodeLib)
840 #---------------------------------------------------------
841 # ReLinked Library Targets:
842 # If the user explicitly requests a relinked library with
843 # BUILD_RELINKED, provide it. Otherwise, if they specify
844 # neither of BUILD_ARCHIVE or DONT_BUILD_RELINKED, give
846 #---------------------------------------------------------
848 ifndef DONT_BUILD_RELINKED
855 all-local:: $(LibName.O)
857 $(LibName.O): $(ObjectsO) $(LibDir)/.dir
858 $(Echo) Linking $(BuildMode) Object Library $(notdir $@)
859 $(Verb) $(Relink) -o $@ $(ObjectsO)
862 ifneq ($(strip $(LibName.O)),)
863 -$(Verb) $(RM) -f $(LibName.O)
866 DestRelinkedLib = $(PROJ_libdir)/$(LIBRARYNAME).o
868 install-local:: $(DestRelinkedLib)
870 $(DestRelinkedLib): $(PROJ_libdir) $(LibName.O)
871 $(Echo) Installing $(BuildMode) Object Library $(DestRelinkedLib)
872 $(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib)
875 $(Echo) Uninstalling $(BuildMode) Object Library $(DestRelinkedLib)
876 -$(Verb) $(RM) -f $(DestRelinkedLib)
880 #---------------------------------------------------------
881 # Archive Library Targets:
882 # If the user wanted a regular archive library built,
883 # then we provide targets for building them.
884 #---------------------------------------------------------
887 all-local:: $(LibName.A)
889 $(LibName.A): $(ObjectsO) $(LibDir)/.dir
890 $(Echo) Building $(BuildMode) Archive Library $(notdir $@)
892 $(Verb) $(Archive) $@ $(ObjectsO)
896 ifneq ($(strip $(LibName.A)),)
897 -$(Verb) $(RM) -f $(LibName.A)
900 DestArchiveLib := $(PROJ_libdir)/lib$(LIBRARYNAME).a
902 install-local:: $(DestArchiveLib)
904 $(DestArchiveLib): $(PROJ_libdir) $(LibName.A)
905 $(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
906 $(Verb) $(MKDIR) $(PROJ_libdir)
907 $(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib)
910 $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
911 -$(Verb) $(RM) -f $(DestArchiveLib)
918 ###############################################################################
919 # Tool Build Rules: Build executable tool based on TOOLNAME option
920 ###############################################################################
924 #---------------------------------------------------------
925 # Set up variables for building a tool.
926 #---------------------------------------------------------
928 ToolBuildPath := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT)
930 ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
933 #---------------------------------------------------------
934 # Tell make that we need to rebuild subdirectories before
935 # we can link the tool. This affects things like LLI which
936 # has library subdirectories.
937 #---------------------------------------------------------
938 $(ToolBuildPath): $(addsuffix /.makeall, $(PARALLEL_DIRS))
940 #---------------------------------------------------------
941 # Provide targets for building the tools
942 #---------------------------------------------------------
943 all-local:: $(ToolBuildPath)
946 ifneq ($(strip $(ToolBuildPath)),)
947 -$(Verb) $(RM) -f $(ToolBuildPath)
951 $(ToolBuildPath): $(ExmplDir)/.dir
953 $(ToolBuildPath): $(ToolDir)/.dir
956 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
957 $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
958 $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
959 $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
960 $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
963 DestTool = $(PROJ_bindir)/$(TOOLNAME)
965 install-local:: $(DestTool)
967 $(DestTool): $(PROJ_bindir) $(ToolBuildPath)
968 $(Echo) Installing $(BuildMode) $(DestTool)
969 $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
972 $(Echo) Uninstalling $(BuildMode) $(DestTool)
973 -$(Verb) $(RM) -f $(DestTool)
977 ###############################################################################
978 # Object Build Rules: Build object files based on sources
979 ###############################################################################
981 # FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
983 DISABLE_AUTO_DEPENDENCIES=1
986 # Provide rule sets for when dependency generation is enabled
987 ifndef DISABLE_AUTO_DEPENDENCIES
989 #---------------------------------------------------------
990 # Create .lo files in the ObjDir directory from the .cpp and .c files...
991 #---------------------------------------------------------
994 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
995 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
996 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
997 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
998 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
1000 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1001 $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
1002 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\
1003 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
1004 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
1006 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1007 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
1008 $(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
1009 then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \
1010 else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi
1012 #---------------------------------------------------------
1013 # Create .o files in the ObjDir directory from the .cpp and .c files...
1014 #---------------------------------------------------------
1017 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1018 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
1019 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
1020 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
1021 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
1023 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1024 $(Echo) "Compiling $*.cc for $(BuildMode) build"
1025 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
1026 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
1027 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
1029 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1030 $(Echo) "Compiling $*.c for $(BuildMode) build"
1031 $(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \
1032 then $(MV) -f "$(ObjDir)/$*.Cd" "$(ObjDir)/$*.d"; \
1033 else $(RM) -f "$(ObjDir)/$*.Cd"; exit 1; fi
1037 ## Rules for building preprocessed (.i/.ii) outputs.
1038 $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1039 $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file"
1040 $(Verb) $(Preprocess.CXX) $< -o $@
1042 $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1043 $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file"
1044 $(Verb) $(Preprocess.CXX) $< -o $@
1046 $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1047 $(Echo) "Compiling $*.c for $(BuildMode) build to .i file"
1048 $(Verb) $(Preprocess.C) $< -o $@
1051 #---------------------------------------------------------
1052 # Create .bc files in the ObjDir directory from .cpp .cc and .c files...
1053 #---------------------------------------------------------
1055 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1056 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1057 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1058 $< -o $@ -S -emit-llvm ; \
1059 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1060 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1062 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1063 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1064 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \
1065 $< -o $@ -S -emit-llvm ; \
1066 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
1067 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1069 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1070 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1071 $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" \
1072 $< -o $@ -S -emit-llvm ; \
1073 then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
1074 else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
1076 # Provide alternate rule sets if dependencies are disabled
1079 ifdef SHARED_LIBRARY
1081 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1082 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
1083 $(LTCompile.CXX) $< -o $@
1085 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1086 $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
1087 $(LTCompile.CXX) $< -o $@
1089 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1090 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
1091 $(LTCompile.C) $< -o $@
1095 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1096 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
1097 $(Compile.CXX) $< -o $@
1099 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1100 $(Echo) "Compiling $*.cc for $(BuildMode) build"
1101 $(Compile.CXX) $< -o $@
1103 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1104 $(Echo) "Compiling $*.c for $(BuildMode) build"
1105 $(Compile.C) $< -o $@
1108 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1109 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
1110 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1112 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1113 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
1114 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1116 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1117 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
1118 $(BCCompile.C) $< -o $@ -S -emit-llvm
1122 # make the C and C++ compilers strip debug info out of bytecode libraries.
1124 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1125 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1126 $(Verb) $(GCCAS) $< -o $@
1128 $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
1129 $(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
1130 $(Verb) $(GCCAS) -strip-debug $< -o $@
1134 #---------------------------------------------------------
1135 # Provide rule to build .bc files from .ll sources,
1136 # regardless of dependencies
1137 #---------------------------------------------------------
1138 $(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS)
1139 $(Echo) "Compiling $*.ll for $(BuildMode) build"
1140 $(Verb) $(LLVMAS) $< -f -o $@
1142 ###############################################################################
1143 # TABLEGEN: Provide rules for running tblgen to produce *.inc files
1144 ###############################################################################
1148 TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \
1149 $(LLVM_SRC_ROOT)/lib/Target/Target.td \
1150 $(LLVM_SRC_ROOT)/lib/Target/TargetSelectionDAG.td \
1151 $(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td)
1152 INCFiles := $(filter %.inc,$(BUILT_SOURCES))
1153 INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
1154 .PRECIOUS: $(INCTMPFiles) $(INCFiles)
1156 # All of these files depend on tblgen and the .td files.
1157 $(INCTMPFiles) : $(TBLGEN) $(TDFiles)
1159 # INCFiles rule: All of the tblgen generated files are emitted to
1160 # $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows
1161 # us to only "touch" the real file if the contents of it change. IOW, if
1162 # tblgen is modified, all of the .inc.tmp files are regereated, but no
1163 # dependencies of the .inc files are, unless the contents of the .inc file
1165 $(INCFiles) : %.inc : $(ObjDir)/%.inc.tmp
1166 $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
1168 $(TARGET:%=$(ObjDir)/%GenRegisterNames.inc.tmp): \
1169 $(ObjDir)/%GenRegisterNames.inc.tmp : %.td $(ObjDir)/.dir
1170 $(Echo) "Building $(<F) register names with tblgen"
1171 $(Verb) $(TableGen) -gen-register-enums -o $@ $<
1173 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.h.inc.tmp): \
1174 $(ObjDir)/%GenRegisterInfo.h.inc.tmp : %.td $(ObjDir)/.dir
1175 $(Echo) "Building $(<F) register information header with tblgen"
1176 $(Verb) $(TableGen) -gen-register-desc-header -o $@ $<
1178 $(TARGET:%=$(ObjDir)/%GenRegisterInfo.inc.tmp): \
1179 $(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir
1180 $(Echo) "Building $(<F) register info implementation with tblgen"
1181 $(Verb) $(TableGen) -gen-register-desc -o $@ $<
1183 $(TARGET:%=$(ObjDir)/%GenInstrNames.inc.tmp): \
1184 $(ObjDir)/%GenInstrNames.inc.tmp : %.td $(ObjDir)/.dir
1185 $(Echo) "Building $(<F) instruction names with tblgen"
1186 $(Verb) $(TableGen) -gen-instr-enums -o $@ $<
1188 $(TARGET:%=$(ObjDir)/%GenInstrInfo.inc.tmp): \
1189 $(ObjDir)/%GenInstrInfo.inc.tmp : %.td $(ObjDir)/.dir
1190 $(Echo) "Building $(<F) instruction information with tblgen"
1191 $(Verb) $(TableGen) -gen-instr-desc -o $@ $<
1193 $(TARGET:%=$(ObjDir)/%GenAsmWriter.inc.tmp): \
1194 $(ObjDir)/%GenAsmWriter.inc.tmp : %.td $(ObjDir)/.dir
1195 $(Echo) "Building $(<F) assembly writer with tblgen"
1196 $(Verb) $(TableGen) -gen-asm-writer -o $@ $<
1198 $(TARGET:%=$(ObjDir)/%GenAsmWriter1.inc.tmp): \
1199 $(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir
1200 $(Echo) "Building $(<F) assembly writer #1 with tblgen"
1201 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
1203 $(TARGET:%=$(ObjDir)/%GenCodeEmitter.inc.tmp): \
1204 $(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir
1205 $(Echo) "Building $(<F) code emitter with tblgen"
1206 $(Verb) $(TableGen) -gen-emitter -o $@ $<
1208 $(TARGET:%=$(ObjDir)/%GenDAGISel.inc.tmp): \
1209 $(ObjDir)/%GenDAGISel.inc.tmp : %.td $(ObjDir)/.dir
1210 $(Echo) "Building $(<F) instruction selector implementation with tblgen"
1211 $(Verb) $(TableGen) -gen-dag-isel -o $@ $<
1213 $(TARGET:%=$(ObjDir)/%GenSubtarget.inc.tmp): \
1214 $(ObjDir)/%GenSubtarget.inc.tmp : %.td $(ObjDir)/.dir
1215 $(Echo) "Building $(<F) subtarget information with tblgen"
1216 $(Verb) $(TableGen) -gen-subtarget -o $@ $<
1219 -$(Verb) $(RM) -f $(INCFiles)
1223 ###############################################################################
1224 # LEX AND YACC: Provide rules for generating sources with lex and yacc
1225 ###############################################################################
1227 #---------------------------------------------------------
1228 # Provide rules for generating a .cpp source file from
1229 # (f)lex input sources.
1230 #---------------------------------------------------------
1232 LexFiles := $(filter %.l,$(Sources))
1234 ifneq ($(LexFiles),)
1236 # Cancel built-in rules for lex
1240 all:: $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs)
1242 # Note the extra sed filtering here, used to cut down on the warnings emited
1243 # by GCC. The last line is a gross hack to work around flex aparently not
1244 # being able to resize the buffer on a large token input. Currently, for
1245 # uninitialized string buffers in LLVM we can generate very long tokens, so
1246 # this is a hack around it.
1247 # FIXME. (f.e. char Buffer[10000] )
1248 $(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
1249 $(Echo) Flexing $*.l
1250 $(Verb) $(FLEX) -t $(PROJ_SRC_DIR)/$*.l | \
1251 $(SED) 's/void yyunput/inline void yyunput/' | \
1252 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
1253 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
1254 > $(PROJ_SRC_DIR)/$*.cpp
1256 # IFF the .l file has changed since it was last checked into CVS, copy the .l
1257 # file to .l.cvs and the generated .cpp file to .cpp.cvs. We use this mechanism
1258 # so that people without flex can build LLVM by copying the .cvs files to the
1259 # source location and building them.
1260 $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1261 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1262 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
1263 ($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)
1265 $(LexFiles:%.l=$(ObjDir)/%.o) : \
1266 $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1269 -$(Verb) $(RM) -f $(LexOutput)
1273 #---------------------------------------------------------
1274 # Provide rules for generating a .cpp and .h source files
1275 # from yacc (bison) input sources.
1276 #---------------------------------------------------------
1278 YaccFiles := $(filter %.y,$(Sources))
1279 ifneq ($(YaccFiles),)
1281 .PRECIOUS: $(YaccOutput)
1283 all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
1285 # Cancel built-in rules for yacc
1290 # Rule for building the bison based parsers...
1291 $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
1292 $(Echo) "Bisoning $*.y"
1293 $(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
1294 $(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
1295 $(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
1297 # IFF the .y file has changed since it was last checked into CVS, copy the .y
1298 # file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs. We use this
1299 # mechanism so that people without flex can build LLVM by copying the .cvs files
1300 # to the source location and building them.
1301 $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs): \
1302 $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
1303 $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs || \
1305 $(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
1306 $(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
1309 $(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
1311 YaccOutput := $(YaccFiles:%.y=%.output)
1314 -$(Verb) $(RM) -f $(YaccOutput)
1317 ###############################################################################
1318 # OTHER RULES: Other rules needed
1319 ###############################################################################
1321 # To create postscript files from dot files...
1322 ifneq ($(DOT),false)
1324 $(DOT) -Tps < $< > $@
1327 $(Echo) "Cannot build $@: The program dot is not installed"
1330 # This rules ensures that header files that are removed still have a rule for
1331 # which they can be "generated." This allows make to ignore them and
1332 # reproduce the dependency lists.
1336 # Define clean-local to clean the current directory. Note that this uses a
1337 # very conservative approach ensuring that empty variables do not cause
1338 # errors or disastrous removal.
1340 ifneq ($(strip $(ObjDir)),)
1341 -$(Verb) $(RM) -rf $(ObjDir)
1343 -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
1344 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
1345 -$(Verb) $(RM) -f *$(SHLIBEXT)
1349 -$(Verb) $(RM) -rf Debug Release Profile
1351 # Build tags database for Emacs/Xemacs:
1355 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1356 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1357 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1358 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1359 -name '*.cpp' -o -name '*.h' | \
1360 $(ETAGS) $(ETAGSFLAGS) -
1363 find $(PROJ_SRC_ROOT)/include $(PROJ_SRC_ROOT)/lib \
1364 $(PROJ_SRC_ROOT)/tools $(PROJ_SRC_ROOT)/examples \
1365 $(PROJ_OBJ_ROOT)/include $(PROJ_OBJ_ROOT)/lib \
1366 $(PROJ_OBJ_ROOT)/tools $(PROJ_OBJ_ROOT)/examples \
1367 \( -name '*.cpp' -o -name '*.h' \) -print | \
1368 ctags -ImtT -o $(PROJ_OBJ_ROOT)/CTAGS -L -
1371 ###############################################################################
1372 # DEPENDENCIES: Include the dependency files if we should
1373 ###############################################################################
1374 ifndef DISABLE_AUTO_DEPENDENCIES
1376 # If its not one of the cleaning targets
1377 ifneq ($strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),)
1379 # Get the list of dependency files
1380 DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources)))
1381 DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d)
1383 -include /dev/null $(DependFiles)
1389 ###############################################################################
1390 # CHECK: Running the test suite
1391 ###############################################################################
1394 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1395 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1396 $(EchoCmd) Running test suite ; \
1397 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local \
1398 TESTSUITE=$(TESTSUITE) ; \
1400 $(EchoCmd) No Makefile in test directory ; \
1403 $(EchoCmd) No test directory ; \
1406 ###############################################################################
1407 # DISTRIBUTION: Handle construction of a distribution tarball
1408 ###############################################################################
1410 #------------------------------------------------------------------------
1411 # Define distribution related variables
1412 #------------------------------------------------------------------------
1413 DistName := $(PROJECT_NAME)-$(PROJ_VERSION)
1414 DistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1415 TopDistDir := $(PROJ_OBJ_ROOT)/$(DistName)
1416 DistTarGZip := $(PROJ_OBJ_ROOT)/$(DistName).tar.gz
1417 DistZip := $(PROJ_OBJ_ROOT)/$(DistName).zip
1418 DistTarBZ2 := $(PROJ_OBJ_ROOT)/$(DistName).tar.bz2
1419 DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \
1420 ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
1421 Makefile.config.in configure autoconf
1422 DistOther := $(notdir $(wildcard \
1423 $(PROJ_SRC_DIR)/*.h \
1424 $(PROJ_SRC_DIR)/*.td \
1425 $(PROJ_SRC_DIR)/*.def \
1426 $(PROJ_SRC_DIR)/*.ll \
1427 $(PROJ_SRC_DIR)/*.in))
1428 DistSubDirs := $(SubDirs)
1429 DistSources = $(Sources) $(EXTRA_DIST)
1430 DistFiles = $(DistAlways) $(DistSources) $(DistOther)
1432 #------------------------------------------------------------------------
1433 # We MUST build distribution with OBJ_DIR != SRC_DIR
1434 #------------------------------------------------------------------------
1435 ifeq ($(PROJ_SRC_DIR),$(PROJ_OBJ_DIR))
1436 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1437 $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
1441 #------------------------------------------------------------------------
1442 # Prevent attempt to run dist targets from anywhere but the top level
1443 #------------------------------------------------------------------------
1445 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1446 $(Echo) ERROR: You must run $@ from $(PROJ_OBJ_ROOT)
1449 #------------------------------------------------------------------------
1450 # Provide the top level targets
1451 #------------------------------------------------------------------------
1453 dist-gzip:: $(DistTarGZip)
1455 $(DistTarGZip) : $(TopDistDir)/.makedistdir
1456 $(Echo) Packing gzipped distribution tar file.
1457 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \
1458 $(GZIP) -c > "$(DistTarGZip)"
1460 dist-bzip2:: $(DistTarBZ2)
1462 $(DistTarBZ2) : $(TopDistDir)/.makedistdir
1463 $(Echo) Packing bzipped distribution tar file.
1464 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \
1465 $(BZIP2) -c >$(DistTarBZ2)
1467 dist-zip:: $(DistZip)
1469 $(DistZip) : $(TopDistDir)/.makedistdir
1470 $(Echo) Packing zipped distribution file.
1471 $(Verb) rm -f $(DistZip)
1472 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
1474 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
1475 $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
1477 DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir
1479 dist-check:: $(DistTarGZip)
1480 $(Echo) Checking distribution tar file.
1481 $(Verb) if test -d $(DistCheckDir) ; then \
1482 $(RM) -rf $(DistCheckDir) ; \
1484 $(Verb) $(MKDIR) $(DistCheckDir)
1485 $(Verb) cd $(DistCheckDir) && \
1486 $(MKDIR) $(DistCheckDir)/build && \
1487 $(MKDIR) $(DistCheckDir)/install && \
1488 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
1490 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
1491 --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
1494 $(MAKE) install && \
1495 $(MAKE) uninstall && \
1496 $(MAKE) dist-clean && \
1497 $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution =====
1500 $(Echo) Cleaning distribution files
1501 -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \
1506 #------------------------------------------------------------------------
1507 # Provide the recursive distdir target for building the distribution directory
1508 #------------------------------------------------------------------------
1509 distdir: $(DistDir)/.makedistdir
1510 $(DistDir)/.makedistdir: $(DistSources)
1511 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1512 if test -d "$(DistDir)" ; then \
1513 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
1516 $(EchoCmd) Removing old $(DistDir) ; \
1517 $(RM) -rf $(DistDir); \
1518 $(EchoCmd) Making 'all' to verify build ; \
1519 $(MAKE) ENABLE_OPTIMIZED=1 all ; \
1521 $(Echo) Building Distribution Directory $(DistDir)
1522 $(Verb) $(MKDIR) $(DistDir)
1523 $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \
1524 srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \
1525 for file in $(DistFiles) ; do \
1527 $(PROJ_SRC_DIR)/*) \
1528 file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \
1530 $(PROJ_SRC_ROOT)/*) \
1531 file=`echo "$$file" | \
1532 sed "s#^$$srcrootstrip/##"` \
1535 if test -f "$(PROJ_SRC_DIR)/$$file" || \
1536 test -d "$(PROJ_SRC_DIR)/$$file" ; then \
1537 from_dir="$(PROJ_SRC_DIR)" ; \
1538 elif test -f "$$file" || test -d "$$file" ; then \
1541 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \
1542 if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \
1543 to_dir="$(DistDir)/$$dir"; \
1544 $(MKDIR) "$$to_dir" ; \
1546 to_dir="$(DistDir)"; \
1548 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
1549 if test -n "$$mid_dir" ; then \
1550 $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
1552 if test -d "$$from_dir/$$file"; then \
1553 if test -d "$(PROJ_SRC_DIR)/$$file" && \
1554 test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \
1555 cd $(PROJ_SRC_DIR) ; \
1556 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1557 ( cd $$to_dir ; $(TAR) xf - ) ; \
1558 cd $(PROJ_OBJ_DIR) ; \
1561 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
1562 ( cd $$to_dir ; $(TAR) xf - ) ; \
1563 cd $(PROJ_OBJ_DIR) ; \
1565 elif test -f "$$from_dir/$$file" ; then \
1566 $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
1567 elif test -L "$$from_dir/$$file" ; then \
1568 $(CP) -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
1569 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
1570 $(EchoCmd) "===== WARNING: Distribution Source " \
1571 "$$from_dir/$$file Not Found!" ; \
1572 elif test "$(Verb)" != '@' ; then \
1573 $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \
1576 $(Verb) for subdir in $(DistSubDirs) ; do \
1577 if test "$$subdir" \!= "." ; then \
1578 new_distdir="$(DistDir)/$$subdir" ; \
1579 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
1580 ( cd $$subdir && $(MAKE) ENABLE_OPTIMIZED=1 \
1581 DistDir="$$new_distdir" distdir ) || exit 1; \
1584 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
1585 $(EchoCmd) Eliminating CVS/.svn directories from distribution ; \
1586 $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o \
1587 -name .svn \) -print` ;\
1588 $(MAKE) dist-hook ; \
1589 $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \
1590 -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \
1591 -o ! -type d ! -perm -400 -exec chmod a+r {} \; \
1592 -o ! -type d ! -perm -444 -exec \
1593 $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
1594 || chmod -R a+r $(DistDir) ; \
1597 # This is invoked by distdir target, define it as a no-op to avoid errors if not
1603 ###############################################################################
1604 # TOP LEVEL - targets only to apply at the top level directory
1605 ###############################################################################
1609 #------------------------------------------------------------------------
1610 # Install support for the project's include files:
1611 #------------------------------------------------------------------------
1613 $(Echo) Installing include files
1614 $(Verb) $(MKDIR) $(PROJ_includedir)
1615 $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
1616 cd $(PROJ_SRC_ROOT)/include && \
1617 for hdr in `find . -type f '!' '(' -name '*~' -o -name '.cvsignore' \
1618 -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS ` ; do \
1619 instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
1620 if test \! -d "$$instdir" ; then \
1621 $(EchoCmd) Making install directory $$instdir ; \
1622 $(MKDIR) $$instdir ;\
1624 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1627 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
1628 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
1629 cd $(PROJ_OBJ_ROOT)/include && \
1630 for hdr in `find . -type f -print | grep -v CVS` ; do \
1631 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
1637 $(Echo) Uninstalling include files
1638 $(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
1639 cd $(PROJ_SRC_ROOT)/include && \
1640 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
1641 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' \
1642 -o -name '*.in' ')' -print ')' | \
1643 grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
1644 cd $(PROJ_SRC_ROOT)/include && \
1645 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
1646 -print ')' | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
1651 #------------------------------------------------------------------------
1652 # Print out the directories used for building
1653 #------------------------------------------------------------------------
1655 $(Echo) "BuildMode : " '$(BuildMode)'
1656 $(Echo) "PROJ_SRC_ROOT: " '$(PROJ_SRC_ROOT)'
1657 $(Echo) "PROJ_SRC_DIR : " '$(PROJ_SRC_DIR)'
1658 $(Echo) "PROJ_OBJ_ROOT: " '$(PROJ_OBJ_ROOT)'
1659 $(Echo) "PROJ_OBJ_DIR : " '$(PROJ_OBJ_DIR)'
1660 $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
1661 $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
1662 $(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
1663 $(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
1664 $(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
1665 $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
1666 $(Echo) "PROJ_includedir : " '$(PROJ_includedir)'
1667 $(Echo) "UserTargets : " '$(UserTargets)'
1668 $(Echo) "ObjMakefiles : " '$(ObjMakefiles)'
1669 $(Echo) "SrcMakefiles : " '$(SrcMakefiles)'
1670 $(Echo) "ObjDir : " '$(ObjDir)'
1671 $(Echo) "LibDir : " '$(LibDir)'
1672 $(Echo) "ToolDir : " '$(ToolDir)'
1673 $(Echo) "ExmplDir : " '$(ExmplDir)'
1674 $(Echo) "Sources : " '$(Sources)'
1675 $(Echo) "TDFiles : " '$(TDFiles)'
1676 $(Echo) "INCFiles : " '$(INCFiles)'
1677 $(Echo) "INCTMPFiles : " '$(INCTMPFiles)'
1678 $(Echo) "PreConditions: " '$(PreConditions)'
1679 $(Echo) "Compile.CXX : " '$(Compile.CXX)'
1680 $(Echo) "Compile.C : " '$(Compile.C)'
1681 $(Echo) "Archive : " '$(Archive)'
1682 $(Echo) "YaccFiles : " '$(YaccFiles)'
1683 $(Echo) "LexFiles : " '$(LexFiles)'
1684 $(Echo) "Module : " '$(Module)'
1685 $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'
1686 $(Echo) "SubDirs : " '$(SubDirs)'