X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCompilerDriver%2FMakefile;h=66c6d11552fc74667a4881e5484c0becc3908ce5;hb=170f06ebe2e80ce8bda87425081541493056fb10;hp=bbef2e34a14127530c430b5fc6c3d93fe9ca71ce;hpb=95c1f5ba64e7ad505781235839b65a2a8f64a733;p=oota-llvm.git diff --git a/lib/CompilerDriver/Makefile b/lib/CompilerDriver/Makefile index bbef2e34a14..66c6d11552f 100644 --- a/lib/CompilerDriver/Makefile +++ b/lib/CompilerDriver/Makefile @@ -12,22 +12,37 @@ LEVEL = ../.. # We don't want this library to appear in `llvm-config --libs` output, so its # name doesn't start with "LLVM". -LIBRARYNAME = libCompilerDriver -LLVMLIBS = LLVMSupport.a LLVMSystem.a -LOADABLE_MODULE := 1 +ifeq ($(ENABLE_LLVMC_DYNAMIC),1) + LIBRARYNAME = libCompilerDriver + LLVMLIBS = LLVMSupport.a LLVMSystem.a + LOADABLE_MODULE := 1 +else + LIBRARYNAME = CompilerDriver + LINK_COMPONENTS = support system +endif + REQUIRES_EH := 1 +REQUIRES_RTTI := 1 include $(LEVEL)/Makefile.common +ifeq ($(ENABLE_LLVMC_DYNAMIC_PLUGINS), 1) + CPP.Flags += -DENABLE_LLVMC_DYNAMIC_PLUGINS +endif + +# Copy libCompilerDriver to the bin dir so that llvmc can find it. +ifeq ($(ENABLE_LLVMC_DYNAMIC),1) + FullLibName = $(LIBRARYNAME)$(SHLIBEXT) -# Copy the library to the bin dir so that llvmc can find it. -all-local:: - $(Echo) Copying $(BuildMode) Shared Library $(FullLibName) \ - to $(ToolDir) - -$(Verb) $(CP) $(LibDir)/$(FullLibName) $(ToolDir)/ +all-local:: $(ToolDir)/$(FullLibName) + +$(ToolDir)/$(FullLibName): $(LibDir)/$(FullLibName) $(ToolDir)/.dir + $(Echo) Copying $(BuildMode) Shared Library $(FullLibName) to $@ + -$(Verb) $(CP) $< $@ clean-local:: $(Echo) Removing $(BuildMode) Shared Library $(FullLibName) \ from $(ToolDir) -$(Verb) $(RM) -f $(ToolDir)/$(FullLibName) +endif