Mikhail Glushenkov | f188178 | 2009-03-02 09:01:14 +0000 | [diff] [blame] | 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 | |
Mikhail Glushenkov | 2373c99 | 2009-07-03 03:52:47 +0000 | [diff] [blame] | 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 | |
Mikhail Glushenkov | f188178 | 2009-03-02 09:01:14 +0000 | [diff] [blame] | 24 | REQUIRES_EH := 1 |
Chris Lattner | c0f8a36 | 2010-01-24 20:22:08 +0000 | [diff] [blame] | 25 | REQUIRES_RTTI := 1 |
Mikhail Glushenkov | f188178 | 2009-03-02 09:01:14 +0000 | [diff] [blame] | 26 | |
| 27 | include $(LEVEL)/Makefile.common |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 28 | |
Mikhail Glushenkov | cc4f8bc | 2009-07-04 03:55:25 +0000 | [diff] [blame] | 29 | ifeq ($(ENABLE_LLVMC_DYNAMIC_PLUGINS), 1) |
| 30 | CPP.Flags += -DENABLE_LLVMC_DYNAMIC_PLUGINS |
| 31 | endif |
| 32 | |
Mikhail Glushenkov | 2373c99 | 2009-07-03 03:52:47 +0000 | [diff] [blame] | 33 | # Copy libCompilerDriver to the bin dir so that llvmc can find it. |
| 34 | ifeq ($(ENABLE_LLVMC_DYNAMIC),1) |
| 35 | |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 36 | FullLibName = $(LIBRARYNAME)$(SHLIBEXT) |
| 37 | |
Daniel Dunbar | 0faea04 | 2009-06-29 22:59:36 +0000 | [diff] [blame] | 38 | all-local:: $(ToolDir)/$(FullLibName) |
| 39 | |
Daniel Dunbar | 0faea04 | 2009-06-29 22:59:36 +0000 | [diff] [blame] | 40 | $(ToolDir)/$(FullLibName): $(LibDir)/$(FullLibName) $(ToolDir)/.dir |
| 41 | $(Echo) Copying $(BuildMode) Shared Library $(FullLibName) to $@ |
| 42 | -$(Verb) $(CP) $< $@ |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 43 | |
| 44 | clean-local:: |
| 45 | $(Echo) Removing $(BuildMode) Shared Library $(FullLibName) \ |
| 46 | from $(ToolDir) |
| 47 | -$(Verb) $(RM) -f $(ToolDir)/$(FullLibName) |
Mikhail Glushenkov | 2373c99 | 2009-07-03 03:52:47 +0000 | [diff] [blame] | 48 | endif |