llvm.org GIT mirror llvm / ef5dc70
Removed trailing whitespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61904 91177308-0d34-0410-b5e6-96231b3b80d8 Misha Brukman 10 years ago
2 changed file(s) with 48 addition(s) and 48 deletion(s). Raw diff Collapse all Expand all
0 #===- ./Makefile -------------------------------------------*- Makefile -*--===#
1 #
1 #
22 # The LLVM Compiler Infrastructure
33 #
44 # This file is distributed under the University of Illinois Open Source
55 # License. See LICENSE.TXT for details.
6 #
6 #
77 #===------------------------------------------------------------------------===#
88
99 LEVEL := .
2929
3030 EXTRA_DIST := test unittests llvm.spec include win32 Xcode
3131
32 include $(LEVEL)/Makefile.config
32 include $(LEVEL)/Makefile.config
3333
3434 # llvm-gcc4 doesn't need runtime libs. llvm-gcc4 is the only supported one.
3535 # FIXME: Remove runtime entirely once we have an understanding of where
5858 OPTIONAL_DIRS :=
5959 endif
6060
61 # Don't install utils, examples, or projects they are only used to
61 # Don't install utils, examples, or projects they are only used to
6262 # build LLVM.
6363 ifeq ($(MAKECMDGOALS),install)
6464 DIRS := $(filter-out utils, $(DIRS))
129129 FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
130130
131131 all-local:: $(FilesToConfigPATH)
132 $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
132 $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
133133 $(Echo) Regenerating $*
134134 $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
135135 .PRECIOUS: $(FilesToConfigPATH)
137137 # NOTE: This needs to remain as the last target definition in this file so
138138 # that it gets executed last.
139139 ifneq ($(BUILD_DIRS_ONLY),1)
140 all::
140 all::
141141 $(Echo) '*****' Completed $(BuildMode)$(AssertMode) Build
142142 ifeq ($(BuildMode),Debug)
143143 $(Echo) '*****' Note: Debug build can be 10 times slower than an
153153 check-one:
154154 $(Verb)$(MAKE) -C test check-one TESTONE=$(TESTONE)
155155
156 srpm: $(LLVM_OBJ_ROOT)/llvm.spec
156 srpm: $(LLVM_OBJ_ROOT)/llvm.spec
157157 rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec
158158
159 rpm: $(LLVM_OBJ_ROOT)/llvm.spec
159 rpm: $(LLVM_OBJ_ROOT)/llvm.spec
160160 rpmbuild -bb --target $(TARGET_TRIPLE) $(LLVM_OBJ_ROOT)/llvm.spec
161161
162162 show-footprint:
33 #
44 # This file is distributed under the University of Illinois Open Source
55 # License. See LICENSE.TXT for details.
6 #
6 #
77 #===------------------------------------------------------------------------===#
88 #
99 # This file is included by all of the LLVM makefiles. For details on how to use
4949 .PHONY: $(UserTargets) $(InternalTargets)
5050
5151 #--------------------------------------------------------------------
52 # Make sure all the user-target rules are double colon rules and
52 # Make sure all the user-target rules are double colon rules and
5353 # they are defined first.
5454 #--------------------------------------------------------------------
5555
187187 clean-all:: clean-local clean-all-local
188188 install:: install-local
189189 uninstall:: uninstall-local
190 install-local:: all-local
190 install-local:: all-local
191191 install-bytecode:: install-bytecode-local
192192
193193 ###############################################################################
268268 CPP.Defines += -D_DEBUG
269269 endif
270270
271 # If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or
272 # configured), then enable expensive checks by defining the
271 # If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or
272 # configured), then enable expensive checks by defining the
273273 # appropriate preprocessor symbols.
274274 ifdef ENABLE_EXPENSIVE_CHECKS
275275 BuildMode := $(BuildMode)+Checks
339339 TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
340340 endif
341341 endif
342 LLVM_CONFIG := $(LLVMToolDir)/llvm-config
342 LLVM_CONFIG := $(LLVMToolDir)/llvm-config
343343 ifndef LLVMLD
344344 LLVMLD := $(LLVMToolDir)/llvm-ld$(EXEEXT)
345345 endif
379379
380380 # Adjust LD.Flags and Libtool.Flags depending on the kind of library that is
381381 # to be built. Note that if LOADABLE_MODULE is specified then the resulting
382 # shared library can be opened with dlopen. Also, LOADABLE_MODULE implies
382 # shared library can be opened with dlopen. Also, LOADABLE_MODULE implies
383383 # several other things so we force them to be defined/on.
384384 ifdef LOADABLE_MODULE
385385 SHARED_LIBRARY := 1
408408 AR.Flags += >/dev/null 2>/dev/null
409409 ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1
410410 else
411 ConfigureScriptFLAGS :=
411 ConfigureScriptFLAGS :=
412412 endif
413413
414414 # By default, strip symbol information from executable
469469 CPP.BaseFlags += -include llvm/System/Solaris.h
470470 endif
471471
472 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
472 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
473473 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
474474 # All -I flags should go here, so that they don't confuse llvm-config.
475475 CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
508508 LTRelink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(Relink)
509509 LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
510510 $(Install.Flags)
511 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
512 ScriptInstall = $(INSTALL) -m 0755
511 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
512 ScriptInstall = $(INSTALL) -m 0755
513513 DataInstall = $(INSTALL) -m 0644
514514
515515 # When compiling under Mingw/Cygwin, the tblgen tool expects Windows
528528 endif
529529
530530 #----------------------------------------------------------
531 # Get the list of source files and compute object file
532 # names from them.
531 # Get the list of source files and compute object file
532 # names from them.
533533 #----------------------------------------------------------
534534
535535 ifndef SOURCES
537537 $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c))
538538 else
539539 Sources := $(SOURCES)
540 endif
540 endif
541541
542542 ifdef BUILT_SOURCES
543543 Sources += $(filter %.cpp %.c %.cc,$(BUILT_SOURCES))
575575 # Handle the DIRS options for sequential construction
576576 #---------------------------------------------------------
577577
578 SubDirs :=
578 SubDirs :=
579579 ifdef DIRS
580580 SubDirs += $(DIRS)
581581
702702
703703 #---------------------------------------------------------
704704 # Define various command line options pertaining to the
705 # libraries needed when linking. There are "Proj" libs
706 # (defined by the user's project) and "LLVM" libs (defined
705 # libraries needed when linking. There are "Proj" libs
706 # (defined by the user's project) and "LLVM" libs (defined
707707 # by the LLVM project).
708708 #---------------------------------------------------------
709709
791791 install-module:: $(DestModule)
792792 install-local:: $(DestModule)
793793
794 $(DestModule): $(ModuleDestDir) $(Module)
794 $(DestModule): $(ModuleDestDir) $(Module)
795795 $(Echo) Installing $(BuildMode) Bytecode Module $(DestModule)
796796 $(Verb) $(DataInstall) $(Module) $(DestModule)
797797
866866 $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
867867 $(Verb) $(LIBTOOL) --finish $(PROJ_libdir)
868868
869 uninstall-local::
869 uninstall-local::
870870 $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
871871 -$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
872872 endif
875875 #---------------------------------------------------------
876876 # Bytecode Library Targets:
877877 # If the user asked for a bytecode library to be built
878 # with the BYTECODE_LIBRARY variable, then we provide
878 # with the BYTECODE_LIBRARY variable, then we provide
879879 # targets for building them.
880880 #---------------------------------------------------------
881881 ifdef BYTECODE_LIBRARY
928928 else
929929 install-local:: $(DestBytecodeLib)
930930
931 $(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
931 $(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
932932 $(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib)
933933 $(Verb) $(DataInstall) $(LibName.BCA) $(DestBytecodeLib)
934934
987987
988988 #---------------------------------------------------------
989989 # Archive Library Targets:
990 # If the user wanted a regular archive library built,
990 # If the user wanted a regular archive library built,
991991 # then we provide targets for building them.
992992 #---------------------------------------------------------
993993 ifdef BUILD_ARCHIVE
10271027 endif
10281028
10291029 # endif LIBRARYNAME
1030 endif
1030 endif
10311031
10321032 ###############################################################################
10331033 # Tool Build Rules: Build executable tool based on TOOLNAME option
10651065 $(Verb) $(LTLink) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
10661066 $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
10671067 $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
1068 $(StripWarnMsg)
1068 $(StripWarnMsg)
10691069
10701070 ifdef NO_INSTALL
10711071 install-local::
10881088 endif
10891089
10901090 ###############################################################################
1091 # Object Build Rules: Build object files based on sources
1091 # Object Build Rules: Build object files based on sources
10921092 ###############################################################################
10931093
10941094 # FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
11451145 $< -o $@ -S -emit-llvm ; \
11461146 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
11471147 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1148 $(call UPGRADE_MSG,$@)
1148 $(call UPGRADE_MSG,$@)
11491149 $(call UPGRADE_LL,$@)
11501150
11511151 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX)
11541154 $< -o $@ -S -emit-llvm ; \
11551155 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
11561156 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
1157 $(call UPGRADE_MSG,$@)
1157 $(call UPGRADE_MSG,$@)
11581158 $(call UPGRADE_LL,$@)
11591159
11601160 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC)
11631163 $< -o $@ -S -emit-llvm ; \
11641164 then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
11651165 else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
1166 $(call UPGRADE_MSG,$@)
1166 $(call UPGRADE_MSG,$@)
11671167 $(call UPGRADE_LL,$@)
11681168
11691169 # Provide alternate rule sets if dependencies are disabled
11711171
11721172 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
11731173 $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG)
1174 $(MAYBE_PIC_Compile.CXX) $< -o $@
1174 $(MAYBE_PIC_Compile.CXX) $< -o $@
11751175
11761176 $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
11771177 $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG)
1178 $(MAYBE_PIC_Compile.CXX) $< -o $@
1178 $(MAYBE_PIC_Compile.CXX) $< -o $@
11791179
11801180 $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
11811181 $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG)
1182 $(MAYBE_PIC_Compile.C) $< -o $@
1182 $(MAYBE_PIC_Compile.C) $< -o $@
11831183
11841184 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX)
11851185 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
11861186 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1187 $(call UPGRADE_MSG,$@)
1187 $(call UPGRADE_MSG,$@)
11881188 $(call UPGRADE_LL,$@)
11891189
11901190 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX)
11911191 $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
11921192 $(BCCompile.CXX) $< -o $@ -S -emit-llvm
1193 $(call UPGRADE_MSG,$@)
1193 $(call UPGRADE_MSG,$@)
11941194 $(call UPGRADE_LL,$@)
11951195
11961196 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC)
11971197 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
11981198 $(BCCompile.C) $< -o $@ -S -emit-llvm
1199 $(call UPGRADE_MSG,@)
1199 $(call UPGRADE_MSG,@)
12001200 $(call UPGRADE_LL,@)
12011201
12021202 endif
12701270 # All of these files depend on tblgen and the .td files.
12711271 $(INCTMPFiles) : $(TBLGEN) $(TDFiles)
12721272
1273 # INCFiles rule: All of the tblgen generated files are emitted to
1273 # INCFiles rule: All of the tblgen generated files are emitted to
12741274 # $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows
12751275 # us to only "touch" the real file if the contents of it change. IOW, if
12761276 # tblgen is modified, all of the .inc.tmp files are regenerated, but no
13121312 $(TARGET:%=$(ObjDir)/%GenAsmWriter1.inc.tmp): \
13131313 $(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir
13141314 $(Echo) "Building $(
1315 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $(call SYSPATH, $@) $<
1315 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $(call SYSPATH, $@) $<
13161316
13171317 $(TARGET:%=$(ObjDir)/%GenCodeEmitter.inc.tmp): \
13181318 $(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir
13641364 %.hpp:: ;
13651365
13661366 # Define clean-local to clean the current directory. Note that this uses a
1367 # very conservative approach ensuring that empty variables do not cause
1367 # very conservative approach ensuring that empty variables do not cause
13681368 # errors or disastrous removal.
13691369 clean-local::
13701370 ifneq ($(strip $(ObjRootDir)),)
13951395
13961396 endif
13971397
1398 endif
1398 endif
13991399
14001400 ###############################################################################
14011401 # CHECK: Running the test suite
14981498 $(Verb) rm -f $(DistZip)
14991499 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
15001500
1501 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
1501 dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
15021502 $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
15031503
15041504 DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir
15471547 $(MAKE) ENABLE_OPTIMIZED=1 all ; \
15481548 fi
15491549 $(Echo) Building Distribution Directory $(DistDir)
1550 $(Verb) $(MKDIR) $(DistDir)
1550 $(Verb) $(MKDIR) $(DistDir)
15511551 $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \
15521552 srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \
15531553 for file in $(DistFiles) ; do \