blob: 6084e885184b9e5db9900ee499425ce7ce32fd4d [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
25
26include $(LEVEL)/Makefile.common
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +000027
Mikhail Glushenkov2373c992009-07-03 03:52:47 +000028# Copy libCompilerDriver to the bin dir so that llvmc can find it.
29ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
30
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +000031FullLibName = $(LIBRARYNAME)$(SHLIBEXT)
32
Daniel Dunbar0faea042009-06-29 22:59:36 +000033all-local:: $(ToolDir)/$(FullLibName)
34
Daniel Dunbar0faea042009-06-29 22:59:36 +000035$(ToolDir)/$(FullLibName): $(LibDir)/$(FullLibName) $(ToolDir)/.dir
36 $(Echo) Copying $(BuildMode) Shared Library $(FullLibName) to $@
37 -$(Verb) $(CP) $< $@
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +000038
39clean-local::
40 $(Echo) Removing $(BuildMode) Shared Library $(FullLibName) \
41 from $(ToolDir)
42 -$(Verb) $(RM) -f $(ToolDir)/$(FullLibName)
Mikhail Glushenkov2373c992009-07-03 03:52:47 +000043endif