Lines Matching +full:local +full:- +full:dir

1 #===-- Makefile.rules - Common make rules for LLVM ---------*- Makefile -*--===#
8 #===------------------------------------------------------------------------===#
13 #===-----------------------------------------------------------------------====#
19 #--------------------------------------------------------------------
21 #--------------------------------------------------------------------
22 RecursiveTargets := all clean clean-all install uninstall install-bytecode \
24 LocalTargets := all-local clean-local clean-all-local check-local \
25 install-local printvars uninstall-local \
26 install-bytecode-local
27 TopLevelTargets := check dist dist-check dist-clean dist-gzip dist-bzip2 \
28 dist-zip unittests
30 InternalTargets := preconditions distdir dist-hook
36 #--------------------------------------------------------------------
38 #--------------------------------------------------------------------
41 #--------------------------------------------------------------------
43 #--------------------------------------------------------------------
48 #--------------------------------------------------------------------
50 #--------------------------------------------------------------------
53 #--------------------------------------------------------------------
54 # Make sure all the user-target rules are double colon rules and
56 #--------------------------------------------------------------------
84 #------------------------------------------------------------------------
86 #------------------------------------------------------------------------
87 $(filter-out clean clean-local,$(UserTargets)):: $(BUILT_SOURCES)
89 clean-all-local::
91 -$(Verb) $(RM) -f $(BUILT_SOURCES)
96 $(Verb) if test -x config.status ; then \
102 $(RM) -rf * ; \
106 $(RM) -rf .spotless.save ; \
108 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
120 #------------------------------------------------------------------------
122 #------------------------------------------------------------------------
126 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
133 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
136 #------------------------------------------------------------------------
138 #------------------------------------------------------------------------
151 #------------------------------------------------------------------------
154 #------------------------------------------------------------------------
164 $(Verb) $(CP) -f $< $@
175 $(CP) -f $< $@ ;; \
180 #------------------------------------------------------------------------
182 #------------------------------------------------------------------------
185 all:: all-local
186 clean:: clean-local
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
198 ifneq ($(strip $(filter clean clean-local dist-clean,$(MAKECMDGOALS))),)
202 #--------------------------------------------------------------------
204 #--------------------------------------------------------------------
209 # Don't use -fomit-frame-pointer on Darwin or FreeBSD.
212 OmitFramePointer := -fomit-frame-pointer
216 # Darwin requires -fstrict-aliasing to be explicitly enabled.
217 # Avoid -fstrict-aliasing on Darwin for now, there are unresolved issues
218 # with -fstrict-aliasing and ipa-type-escape radr://6756684
220 # EXTRA_OPTIONS += -fstrict-aliasing -Wstrict-aliasing
227 CXX.Flags += -g
228 C.Flags += -g
229 LD.Flags += -g
241 CXX.Flags += -g
242 C.Flags += -g
243 LD.Flags += -g
250 CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags)) -pg -g
251 C.Flags := $(filter-out -fomit-frame-pointer,$(C.Flags)) -pg -g
252 LD.Flags := $(filter-out -fomit-frame-pointer,$(LD.Flags)) -pg -g
257 # CXX.Flags += -fvisibility-inlines-hidden
268 CXX.Flags += -fno-exceptions
275 CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags))
276 C.Flags := $(filter-out -fomit-frame-pointer,$(C.Flags))
277 LD.Flags := $(filter-out -fomit-frame-pointer,$(LD.Flags))
280 # If REQUIRES_RTTI=1 is specified then don't disable run-time type id.
282 CXX.Flags += -fno-rtti
287 CXX.Flags += -ftest-coverage -fprofile-arcs
288 C.Flags += -ftest-coverage -fprofile-arcs
294 CPP.Defines += -DNDEBUG
297 CPP.Defines += -D_DEBUG
305 CPP.Defines += -D_GLIBCXX_DEBUG -DXDEBUG
322 # Nothing. Win32 defaults to PIC and warns when given -fPIC
326 CXX.Flags += -fno-common
327 C.Flags += -fno-common
329 # Linux and others; pass -fPIC
330 CXX.Flags += -fPIC
331 C.Flags += -fPIC
336 CXX.Flags += -mdynamic-no-pic
337 C.Flags += -mdynamic-no-pic
341 # Support makefile variable to disable any kind of timestamp/non-deterministic
351 CPP.Defines += -D__NO_CTYPE_INLINE
353 # Work around http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525016
355 LD.Flags += -Wl,--allow-multiple-definition
360 CXX.Flags += -Woverloaded-virtual
366 CXX.Flags += -mieee
367 CPP.BaseFlags += -mieee
369 CXX.Flags += -fPIC
370 CPP.BaseFlags += -fPIC
373 LD.Flags += -Wl,--no-relax
377 # --version-script
378 # --export-dynamic
379 # --rpath
384 RDYNAMIC := -Wl,--export-all-symbols
387 #--------------------------------------------------------------------
389 #--------------------------------------------------------------------
404 #--------------------------------------------------------------------
406 #--------------------------------------------------------------------
424 #--------------------------------------------------------------------
426 #--------------------------------------------------------------------
428 ifneq ($(findstring llvm-gcc,$(LLVMCC_OPTION)),)
445 #--------------------------------------------------------------------
447 #--------------------------------------------------------------------
451 LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
455 LLVM_TBLGEN := $(BuildLLVMToolDir)/llvm-tblgen$(BUILD_EXEEXT)
457 LLVM_TBLGEN := $(LLVMToolDir)/llvm-tblgen$(EXEEXT)
460 LLVM_CONFIG := $(LLVMToolDir)/llvm-config
462 LLVMLD := $(LLVMToolDir)/llvm-ld$(EXEEXT)
465 LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
480 #--------------------------------------------------------------------
482 #--------------------------------------------------------------------
485 DARWIN_VERSION := `sw_vers -productVersion`
487 DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]).*/\1/')
489 DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/')
491 LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
492 SharedLinkOptions := -dynamiclib
494 SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
497 SharedLinkOptions=-shared
502 TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
509 LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
515 C.Flags += -v
516 CXX.Flags += -v
517 LD.Flags += -v
534 Install.StripFlag += -s
547 LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
549 LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
551 LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag)
556 LD.Flags += $(RPATH) -Wl,@executable_path/../lib
562 #----------------------------------------------------------
564 #----------------------------------------------------------
571 CompileCommonOpts += -pedantic -Wno-long-long
573 CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \
575 # Enable cast-qual for C++; the workaround is to use const_cast.
576 CXX.Flags += -Wcast-qual
578 ifeq ($(HOST_OS),HP-UX)
579 CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
597 UNIVERSAL_ARCH_OPTIONS := $(UNIVERSAL_ARCH:%=-arch %)
600 CompileCommonOpts += -isysroot $(UNIVERSAL_SDK_PATH)
608 TargetCommonOpts = -m64
611 TargetCommonOpts = -m32
618 CPP.BaseFlags += -include llvm/Support/Solaris.h
622 CPP.BaseFlags += -include llvm/Support/Solaris.h
623 endif # !HOST_OS - AuroraUX.
625 LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
626 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
627 # All -I flags should go here, so that they don't confuse llvm-config.
628 CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
629 $(patsubst %,-I%/include,\
645 $(TargetCommonOpts) $(CompileCommonOpts) -c
649 $(TargetCommonOpts) $(CompileCommonOpts) -c
652 $(CompileCommonOpts) $(CXX.Flags) -E
660 $(TargetCommonOpts) $(CompileCommonOpts) -c
663 $(TargetCommonOpts) $(CompileCommonOpts) -c
666 $(CompileCommonOpts) $(CXX.Flags) -E
675 $(TargetCommonOpts) $(CompileCommonOpts) -E
680 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
681 ScriptInstall = $(INSTALL) -m 0755
682 DataInstall = $(INSTALL) -m 0644
687 TableGen.Flags= -I $(call SYSPATH, $(PROJ_SRC_DIR)) \
688 -I $(call SYSPATH, $(LLVM_SRC_ROOT)/include) \
689 -I $(call SYSPATH, $(PROJ_SRC_ROOT)/include) \
690 -I $(call SYSPATH, $(PROJ_SRC_ROOT)/lib/Target)
694 LArchive = $(LLVMToolDir)/llvm-ar rcsf
701 AliasTool = ln -s
703 #----------------------------------------------------------
706 #----------------------------------------------------------
724 #----------------------------------------------------------
729 # --> C:/mingw/include/sys/types.h
730 # built-in "echo" does not transform path to DOSish path.
734 #----------------------------------------------------------
736 ifeq (-mingw32,$(findstring -mingw32,$(BUILD_TRIPLE)))
737 ECHOPATH := $(Verb)python -u -c "import sys;print ' '.join(sys.argv[1:])"
746 #---------------------------------------------------------
749 #---------------------------------------------------------
755 %/.dir:
759 .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
760 .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
762 #---------------------------------------------------------
764 #---------------------------------------------------------
772 $(Verb) for dir in $(DIRS); do \
773 if ([ ! -f $$dir/Makefile ] || \
774 command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \
775 $(MKDIR) $$dir; \
776 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
778 ($(MAKE) -C $$dir $@ ) || exit 1; \
782 $(Verb) for dir in $(DIRS); do \
783 ($(MAKE) -C $$dir $@ ) || exit 1; \
789 #---------------------------------------------------------
792 #---------------------------------------------------------
795 $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
796 if ([ ! -f $$dir/Makefile ] || \
797 command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \
798 $(MKDIR) $$dir; \
799 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
801 ($(MAKE) -C $$dir $@ ) || exit 0; \
805 #-----------------------------------------------------------
807 #-----------------------------------------------------------
809 …PARALLEL_DIRS += $(foreach T,$(OPTIONAL_PARALLEL_DIRS),$(shell test -d $(PROJ_SRC_DIR)/$(T) && ech…
812 #-----------------------------------------------------------
814 #-----------------------------------------------------------
822 clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
825 install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS))
831 $(Verb) if ([ ! -f $(@D)/Makefile ] || \
832 command test $(@D)/Makefile -ot \
837 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@)
840 #---------------------------------------------------------
843 #---------------------------------------------------------
850 $(Verb) for dir in $(OPTIONAL_DIRS); do \
851 if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
852 if ([ ! -f $$dir/Makefile ] || \
853 command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \
854 $(MKDIR) $$dir; \
855 $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
857 ($(MAKE) -C$$dir $@ ) || exit 1; \
862 $(Verb) for dir in $(OPTIONAL_DIRS); do \
863 if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
864 ($(MAKE) -C$$dir $@ ) || exit 1; \
870 #---------------------------------------------------------
872 #---------------------------------------------------------
876 install-local::
878 uninstall-local::
881 install-local:: $(DESTDIR)$(PROJ_etcdir) $(CONFIG_FILES)
884 if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
886 elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
893 uninstall-local::
896 $(RM) -f $(DESTDIR)$(PROJ_etcdir)/$${file} ; \
906 #---------------------------------------------------------
911 #---------------------------------------------------------
914 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
921 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
943 @echo "*** llvm-config doesn't exist - rebuilding it."
944 @$(MAKE) -C $(PROJ_OBJ_ROOT)/tools/llvm-config
949 # We can take the "auto-import" feature to get rid of using dllimport.
951 LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \
952 -L $(SharedLibDir)
954 LLVMLibsOptions += -lLLVM-$(LLVMVersion)
955 LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT)
959 LLVMConfigLibs := $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS) || echo Error)
961 $(error llvm-config --libs failed)
964 LLVMConfigLibfiles := $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS) || echo Error)
966 $(error llvm-config --libfiles failed)
984 $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir
985 $(Verb) sed -e 's/^/_/' < $< > $@
986 clean-local::
987 -$(Verb) $(RM) -f $(NativeExportsFile)
992 $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir
994 $(Verb) grep -q "\<" $< && echo " global:" >> $@ || :
995 $(Verb) sed -e 's/$$/;/' -e 's/^/ /' < $< >> $@
997 $(Verb) echo " local: *;" >> $@
1000 clean-local::
1001 -$(Verb) $(RM) -f $(NativeExportsFile)
1006 $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir
1010 clean-local::
1011 -$(Verb) $(RM) -f $(NativeExportsFile)
1019 # Now add the linker command-line options to use the native export file.
1023 LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile)
1028 LLVMLibsOptions += -Wl,--version-script,$(NativeExportsFile)
1033 # LLVMLibsOptions is invalidated at processing tools/llvm-shlib.
1043 #---------------------------------------------------------
1049 #---------------------------------------------------------
1057 LinkModule := $(LLVMLD) -r
1061 LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
1064 $(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(LLVMLD)
1066 $(Verb) $(LinkModule) -o $@ $(ObjectsBC)
1068 all-local:: $(Module)
1070 clean-local::
1072 -$(Verb) $(RM) -f $(Module)
1082 install-local::
1084 uninstall-local::
1089 install-module:: $(DestModule)
1090 install-local:: $(DestModule)
1096 uninstall-local::
1098 -$(Verb) $(RM) -f $(DestModule)
1121 #---------------------------------------------------------
1126 #---------------------------------------------------------
1129 all-local:: $(LibName.SO)
1142 $(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(SharedLibDir)/.dir
1145 $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) \
1148 $(LibName.SO): $(ObjectsO) $(SharedLibDir)/.dir
1150 $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO)
1153 clean-local::
1155 -$(Verb) $(RM) -f $(LibName.SO)
1159 install-local::
1161 uninstall-local::
1173 install-local:: $(DestSharedLib)
1179 uninstall-local::
1181 -$(Verb) $(RM) -f $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME).*
1185 #---------------------------------------------------------
1190 #---------------------------------------------------------
1196 all-local:: $(LibName.BCA)
1199 BCLinkLib = $(LLVMLD) -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
1201 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(LLVMLD) \
1202 $(LLVMToolDir)/llvm-ar
1205 $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).internalize $(ObjectsBC)
1206 $(Verb) $(RM) -f $@
1209 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir \
1210 $(LLVMToolDir)/llvm-ar
1212 $(Verb) $(RM) -f $@
1217 clean-local::
1219 -$(Verb) $(RM) -f $(LibName.BCA)
1230 install-bytecode-local:: $(DestBytecodeLib)
1233 install-local::
1235 uninstall-local::
1238 install-local:: $(DestBytecodeLib)
1244 uninstall-local::
1246 -$(Verb) $(RM) -f $(DestBytecodeLib)
1251 #---------------------------------------------------------
1255 #---------------------------------------------------------
1264 #---------------------------------------------------------
1268 #---------------------------------------------------------
1271 all-local:: $(LibName.A)
1273 $(LibName.A): $(ObjectsO) $(LibDir)/.dir
1275 -$(Verb) $(RM) -f $@
1279 clean-local::
1281 -$(Verb) $(RM) -f $(LibName.A)
1285 install-local::
1287 uninstall-local::
1291 install-local::
1293 uninstall-local::
1298 install-local:: $(DestArchiveLib)
1305 uninstall-local::
1307 -$(Verb) $(RM) -f $(DestArchiveLib)
1321 #---------------------------------------------------------
1323 #---------------------------------------------------------
1340 #---------------------------------------------------------
1342 #---------------------------------------------------------
1352 LD.Flags += -Wl,-exported_symbol,_main
1358 LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
1363 #---------------------------------------------------------
1365 #---------------------------------------------------------
1370 LD.Flags += -Wl,-order_file,$(TOOL_ORDER_FILE)
1375 #---------------------------------------------------------
1377 #---------------------------------------------------------
1382 LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,$(ObjDir)/$(TOOL_INFO_PLIST)
1386 $(ObjDir)/$(TOOL_INFO_PLIST): $(PROJ_SRC_DIR)/$(TOOL_INFO_PLIST).in $(ObjDir)/.dir
1388 $(Verb)sed -e "s#@TOOL_INFO_UTI@#$(TOOL_INFO_UTI)#g" \
1389 -e "s#@TOOL_INFO_NAME@#$(TOOL_INFO_NAME)#g" \
1390 -e "s#@TOOL_INFO_VERSION@#$(TOOL_INFO_VERSION)#g" \
1391 -e "s#@TOOL_INFO_BUILD_VERSION@#$(TOOL_INFO_BUILD_VERSION)#g" \
1397 #---------------------------------------------------------
1399 #---------------------------------------------------------
1400 all-local:: $(ToolBuildPath) $(ToolAliasBuildPath)
1402 clean-local::
1404 -$(Verb) $(RM) -f $(ToolBuildPath)
1407 -$(Verb) $(RM) -f $(ToolAliasBuildPath)
1411 $(ToolBuildPath): $(ExmplDir)/.dir
1413 $(ToolBuildPath): $(ToolDir)/.dir
1418 $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
1426 $(Verb) $(RM) -f $(ToolAliasBuildPath)
1433 install-local::
1435 uninstall-local::
1440 install-local:: $(DestTool)
1446 uninstall-local::
1448 -$(Verb) $(RM) -f $(DestTool)
1454 install-local:: $(DestToolAlias)
1458 $(Verb) $(RM) -f $(DestToolAlias)
1461 uninstall-local::
1463 -$(Verb) $(RM) -f $(DestToolAlias)
1473 # FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
1474 ifeq ($(HOST_OS),HP-UX)
1481 #---------------------------------------------------------
1483 #---------------------------------------------------------
1485 DEPEND_OPTIONS = -MMD -MP -MF "$(ObjDir)/$*.d.tmp" \
1486 -MT "$(ObjDir)/$*.o" -MT "$(ObjDir)/$*.d"
1490 DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.d.tmp" "$(ObjDir)/$*.d"; \
1493 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_MAKEFILE)
1495 $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \
1498 $(ObjDir)/%.o: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_MAKEFILE)
1500 $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \
1503 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_MAKEFILE)
1505 $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \
1508 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_MAKEFILE)
1510 $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \
1513 $(ObjDir)/%.o: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_MAKEFILE)
1515 $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \
1518 #---------------------------------------------------------
1520 #---------------------------------------------------------
1522 BC_DEPEND_OPTIONS = -MMD -MP -MF "$(ObjDir)/$*.bc.d.tmp" \
1523 -MT "$(ObjDir)/$*.ll" -MT "$(ObjDir)/$*.bc.d"
1527 BC_DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.bc.d.tmp" "$(ObjDir)/$*.bc.d"; \
1530 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX)
1533 $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \
1536 $(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX)
1539 $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \
1542 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX)
1545 $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \
1548 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC)
1551 $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \
1554 $(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC)
1557 $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \
1563 $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1565 $(Compile.CXX) $< -o $@
1567 $(ObjDir)/%.o: %.mm $(ObjDir)/.dir $(BUILT_SOURCES)
1569 $(Compile.CXX) $< -o $@
1571 $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1573 $(Compile.CXX) $< -o $@
1575 $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1577 $(Compile.C) $< -o $@
1579 $(ObjDir)/%.o: %.m $(ObjDir)/.dir $(BUILT_SOURCES)
1581 $(Compile.C) $< -o $@
1583 $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX)
1585 $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG)
1587 $(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX)
1589 $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG)
1591 $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX)
1593 $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG)
1595 $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC)
1597 $(BCCompile.C) $< -o $@ -S $(LLVMCC_EMITIR_FLAG)
1599 $(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC)
1601 $(BCCompile.C) $< -o $@ -S $(LLVMCC_EMITIR_FLAG)
1607 $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1609 $(Verb) $(Preprocess.CXX) $< -o $@
1611 $(BuildMode)/%.ii: %.mm $(ObjDir)/.dir $(BUILT_SOURCES)
1613 $(Verb) $(Preprocess.CXX) $< -o $@
1615 $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1617 $(Verb) $(Preprocess.CXX) $< -o $@
1619 $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1621 $(Verb) $(Preprocess.C) $< -o $@
1623 $(BuildMode)/%.i: %.m $(ObjDir)/.dir $(BUILT_SOURCES)
1625 $(Verb) $(Preprocess.C) $< -o $@
1628 $(ObjDir)/%.s: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
1630 $(Compile.CXX) $< -o $@ -S
1632 $(ObjDir)/%.s: %.mm $(ObjDir)/.dir $(BUILT_SOURCES)
1634 $(Compile.CXX) $< -o $@ -S
1636 $(ObjDir)/%.s: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
1638 $(Compile.CXX) $< -o $@ -S
1640 $(ObjDir)/%.s: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
1642 $(Compile.C) $< -o $@ -S
1644 $(ObjDir)/%.s: %.m $(ObjDir)/.dir $(BUILT_SOURCES)
1646 $(Compile.C) $< -o $@ -S
1653 $(Verb) $(LOPT) $< -std-compile-opts -o $@
1657 $(Verb) $(LOPT) $< -std-compile-opts -strip-debug -o $@
1661 #---------------------------------------------------------
1664 #---------------------------------------------------------
1665 $(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS)
1667 $(Verb) $(LLVMAS) $< -f -o $@
1690 $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
1708 $(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1710 $(Verb) $(LLVMTableGen) -gen-register-info -o $(call SYSPATH, $@) $<
1713 $(ObjDir)/%GenInstrInfo.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1715 $(Verb) $(LLVMTableGen) -gen-instr-info -o $(call SYSPATH, $@) $<
1718 $(ObjDir)/%GenAsmWriter.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1720 $(Verb) $(LLVMTableGen) -gen-asm-writer -o $(call SYSPATH, $@) $<
1723 $(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1725 $(Verb) $(LLVMTableGen) -gen-asm-writer -asmwriternum=1 -o $(call SYSPATH, $@) $<
1728 $(ObjDir)/%GenAsmMatcher.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1730 $(Verb) $(LLVMTableGen) -gen-asm-matcher -o $(call SYSPATH, $@) $<
1733 $(ObjDir)/%GenMCCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1735 $(Verb) $(LLVMTableGen) -gen-emitter -mc-emitter -o $(call SYSPATH, $@) $<
1738 $(ObjDir)/%GenMCPseudoLowering.inc.tmp: %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1740 $(Verb) $(LLVMTableGen) -gen-pseudo-lowering -o $(call SYSPATH, $@) $<
1743 $(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1745 $(Verb) $(LLVMTableGen) -gen-emitter -o $(call SYSPATH, $@) $<
1748 $(ObjDir)/%GenDAGISel.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1750 $(Verb) $(LLVMTableGen) -gen-dag-isel -o $(call SYSPATH, $@) $<
1753 $(ObjDir)/%GenDisassemblerTables.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1755 $(Verb) $(LLVMTableGen) -gen-disassembler -o $(call SYSPATH, $@) $<
1758 $(ObjDir)/%GenEDInfo.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1760 $(Verb) $(LLVMTableGen) -gen-enhanced-disassembly-info -o $(call SYSPATH, $@) $<
1763 $(ObjDir)/%GenFastISel.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1765 $(Verb) $(LLVMTableGen) -gen-fast-isel -o $(call SYSPATH, $@) $<
1768 $(ObjDir)/%GenSubtargetInfo.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1770 $(Verb) $(LLVMTableGen) -gen-subtarget -o $(call SYSPATH, $@) $<
1773 $(ObjDir)/%GenCallingConv.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1775 $(Verb) $(LLVMTableGen) -gen-callingconv -o $(call SYSPATH, $@) $<
1778 $(ObjDir)/%GenIntrinsics.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1780 $(Verb) $(LLVMTableGen) -gen-tgt-intrinsic -o $(call SYSPATH, $@) $<
1782 $(ObjDir)/ARMGenDecoderTables.inc.tmp : ARM.td $(ObjDir)/.dir $(LLVM_TBLGEN)
1784 $(Verb) $(LLVMTableGen) -gen-arm-decoder -o $(call SYSPATH, $@) $<
1787 clean-local::
1788 -$(Verb) $(RM) -f $(INCFiles)
1799 $(DOT) -Tps < $< > $@
1811 # Define clean-local to clean the current directory. Note that this uses a
1814 clean-local::
1816 -$(Verb) $(RM) -rf $(ObjRootDir)
1818 -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
1819 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
1820 -$(Verb) $(RM) -f *$(SHLIBEXT)
1823 clean-all-local::
1824 -$(Verb) $(RM) -rf Debug Release Profile
1844 -include $(DependFiles) ""
1855 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1856 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1858 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local \
1867 check-lit:: check
1869 check-dg::
1870 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1871 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1873 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-dg ; \
1881 check-all::
1882 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \
1883 if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \
1885 $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-all ; \
1898 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/unittests" ; then \
1899 if test -f "$(PROJ_OBJ_ROOT)/unittests/Makefile" ; then \
1901 $(MAKE) -C $(PROJ_OBJ_ROOT)/unittests unitcheck; \
1913 #------------------------------------------------------------------------
1915 #------------------------------------------------------------------------
1916 DistName := $(PROJECT_NAME)-$(PROJ_VERSION)
1935 #------------------------------------------------------------------------
1937 #------------------------------------------------------------------------
1939 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1944 #------------------------------------------------------------------------
1946 #------------------------------------------------------------------------
1948 dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
1952 #------------------------------------------------------------------------
1954 #------------------------------------------------------------------------
1956 dist-gzip:: $(DistTarGZip)
1960 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \
1961 $(GZIP) -c > "$(DistTarGZip)"
1963 dist-bzip2:: $(DistTarBZ2)
1967 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \
1968 $(BZIP2) -c >$(DistTarBZ2)
1970 dist-zip:: $(DistZip)
1974 $(Verb) rm -f $(DistZip)
1975 $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
1982 dist-check:: $(DistTarGZip)
1984 $(Verb) if test -d $(DistCheckDir) ; then \
1985 $(RM) -rf $(DistCheckDir) ; \
1991 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
1993 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
1994 --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
2000 $(MAKE) dist-clean && \
2003 dist-clean::
2005 -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \
2010 #------------------------------------------------------------------------
2012 #------------------------------------------------------------------------
2016 if test -d "$(DistDir)" ; then \
2017 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
2021 $(RM) -rf $(DistDir); \
2039 if test -f "$(PROJ_SRC_DIR)/$$file" || \
2040 test -d "$(PROJ_SRC_DIR)/$$file" ; then \
2042 elif test -f "$$file" || test -d "$$file" ; then \
2045 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \
2047 to_dir="$(DistDir)/$$dir"; \
2052 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
2053 if test -n "$$mid_dir" ; then \
2056 if test -d "$$from_dir/$$file"; then \
2057 if test -d "$(PROJ_SRC_DIR)/$$file" && \
2060 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
2061 ( cd $$to_dir ; $(TAR) xf - ) ; \
2065 $(TAR) cf - $$file --exclude .svn --exclude CVS | \
2066 ( cd $$to_dir ; $(TAR) xf - ) ; \
2069 elif test -f "$$from_dir/$$file" ; then \
2070 $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
2071 elif test -L "$$from_dir/$$file" ; then \
2072 $(CP) -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
2073 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
2077 $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \
2083 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
2090 $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o \
2091 -name .svn \) -print` ;\
2092 $(MAKE) dist-hook ; \
2093 $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \
2094 -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \
2095 -o ! -type d ! -perm -400 -exec chmod a+r {} \; \
2096 -o ! -type d ! -perm -444 -exec \
2097 $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
2098 || chmod -R a+r $(DistDir) ; \
2101 # This is invoked by distdir target, define it as a no-op to avoid errors if not
2103 dist-hook::
2108 # TOP LEVEL - targets only to apply at the top level directory
2113 #------------------------------------------------------------------------
2115 #------------------------------------------------------------------------
2117 install-local::
2119 uninstall-local::
2122 install-local::
2125 $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
2127 for hdr in `find . -type f \
2128 '(' -name LICENSE.TXT \
2129 -o -name '*.def' \
2130 -o -name '*.h' \
2131 -o -name '*.inc' \
2132 -o -name '*.td' \
2133 ')' -print | grep -v CVS | \
2134 grep -v .svn` ; do \
2136 if test \! -d "$$instdir" ; then \
2144 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
2146 for hdr in `find . -type f \
2147 '(' -name LICENSE.TXT \
2148 -o -name '*.def' \
2149 -o -name '*.h' \
2150 -o -name '*.inc' \
2151 -o -name '*.td' \
2152 ')' -print | grep -v CVS | \
2153 grep -v .svn` ; do \
2155 if test \! -d "$$instdir" ; then \
2164 uninstall-local::
2166 $(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
2168 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
2169 '!' '(' -name '*~' -o -name '.#*' \
2170 -o -name '*.in' ')' -print ')' | \
2171 grep -v CVS | sed 's#^#$(DESTDIR)$(PROJ_includedir)/#'` ; \
2173 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
2174 -print ')' | sed 's#\.in$$##;s#^#$(DESTDIR)$(PROJ_includedir)/#'` ; \
2179 check-line-length:
2183 egrep -n '.{81}' $(Sources) /dev/null
2185 check-for-tabs:
2189 egrep -n ' ' $(Sources) /dev/null
2191 check-footprint:
2192 @ls -l $(LibDir) | awk '\
2196 @ls -l $(ToolDir) | awk '\
2200 #------------------------------------------------------------------------
2202 #------------------------------------------------------------------------
2242 # General debugging rule, use 'make dbg-print-XXX' to print the
2244 make-print-%: