blob: 66c6d11552fc74667a4881e5484c0becc3908ce5 [file] [log] [blame]
Mikhail Glushenkovf1881782009-03-02 09:01:14 +00001##===- 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
10LEVEL = ../..
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 Glushenkov2373c992009-07-03 03:52:47 +000015ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
16 LIBRARYNAME = libCompilerDriver
17 LLVMLIBS = LLVMSupport.a LLVMSystem.a
18 LOADABLE_MODULE := 1
19else
20 LIBRARYNAME = CompilerDriver
21 LINK_COMPONENTS = support system
22endif
23
Mikhail Glushenkovf1881782009-03-02 09:01:14 +000024REQUIRES_EH := 1
Chris Lattnerc0f8a362010-01-24 20:22:08 +000025REQUIRES_RTTI := 1
Mikhail Glushenkovf1881782009-03-02 09:01:14 +000026
27include $(LEVEL)/Makefile.common
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +000028
Mikhail Glushenkovcc4f8bc2009-07-04 03:55:25 +000029ifeq ($(ENABLE_LLVMC_DYNAMIC_PLUGINS), 1)
30 CPP.Flags += -DENABLE_LLVMC_DYNAMIC_PLUGINS
31endif
32
Mikhail Glushenkov2373c992009-07-03 03:52:47 +000033# Copy libCompilerDriver to the bin dir so that llvmc can find it.
34ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
35
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +000036FullLibName = $(LIBRARYNAME)$(SHLIBEXT)
37
Daniel Dunbar0faea042009-06-29 22:59:36 +000038all-local:: $(ToolDir)/$(FullLibName)
39
Daniel Dunbar0faea042009-06-29 22:59:36 +000040$(ToolDir)/$(FullLibName): $(LibDir)/$(FullLibName) $(ToolDir)/.dir
41 $(Echo) Copying $(BuildMode) Shared Library $(FullLibName) to $@
42 -$(Verb) $(CP) $< $@
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +000043
44clean-local::
45 $(Echo) Removing $(BuildMode) Shared Library $(FullLibName) \
46 from $(ToolDir)
47 -$(Verb) $(RM) -f $(ToolDir)/$(FullLibName)
Mikhail Glushenkov2373c992009-07-03 03:52:47 +000048endif