Get rid of exceptions in llvmc.
[oota-llvm.git] / lib / CompilerDriver / Makefile
1 ##===- lib/CompilerDriver/Makefile -------------------------*- Makefile -*-===##
2 #
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file is distributed under the University of Illinois Open
6 # Source License. See LICENSE.TXT for details.
7 #
8 ##===----------------------------------------------------------------------===##
9
10 LEVEL = ../..
11
12 # We don't want this library to appear in `llvm-config --libs` output, so its
13 # name doesn't start with "LLVM".
14
15 ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
16   LIBRARYNAME = libCompilerDriver
17   LLVMLIBS = LLVMSupport.a LLVMSystem.a
18   LOADABLE_MODULE := 1
19 else
20   LIBRARYNAME = CompilerDriver
21   LINK_COMPONENTS = support system
22 endif
23
24 include $(LEVEL)/Makefile.common
25
26 ifeq ($(ENABLE_LLVMC_DYNAMIC_PLUGINS), 1)
27     CPP.Flags += -DENABLE_LLVMC_DYNAMIC_PLUGINS
28 endif
29
30 # Copy libCompilerDriver to the bin dir so that llvmc can find it.
31 ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
32
33 FullLibName = $(LIBRARYNAME)$(SHLIBEXT)
34
35 all-local:: $(ToolDir)/$(FullLibName)
36
37 $(ToolDir)/$(FullLibName): $(LibDir)/$(FullLibName) $(ToolDir)/.dir
38         $(Echo) Copying $(BuildMode) Shared Library $(FullLibName) to $@
39         -$(Verb) $(CP) $< $@
40
41 clean-local::
42         $(Echo) Removing $(BuildMode) Shared Library $(FullLibName) \
43         from $(ToolDir)
44         -$(Verb) $(RM) -f $(ToolDir)/$(FullLibName)
45 endif