2009-03-02 10:01:14 +01:00
|
|
|
##===- lib/CompilerDriver/Makefile -------------------------*- Makefile -*-===##
|
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open
|
|
|
|
# Source License. See LICENSE.TXT for details.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
|
|
|
LEVEL = ../..
|
|
|
|
|
|
|
|
# We don't want this library to appear in `llvm-config --libs` output, so its
|
|
|
|
# name doesn't start with "LLVM".
|
|
|
|
|
2009-07-03 05:52:47 +02:00
|
|
|
ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
|
|
|
|
LIBRARYNAME = libCompilerDriver
|
|
|
|
LLVMLIBS = LLVMSupport.a LLVMSystem.a
|
|
|
|
LOADABLE_MODULE := 1
|
|
|
|
else
|
|
|
|
LIBRARYNAME = CompilerDriver
|
|
|
|
LINK_COMPONENTS = support system
|
|
|
|
endif
|
|
|
|
|
2009-03-02 10:01:14 +01:00
|
|
|
REQUIRES_EH := 1
|
|
|
|
|
|
|
|
include $(LEVEL)/Makefile.common
|
2009-06-29 05:09:15 +02:00
|
|
|
|
2009-07-04 05:55:25 +02:00
|
|
|
ifeq ($(ENABLE_LLVMC_DYNAMIC_PLUGINS), 1)
|
|
|
|
CPP.Flags += -DENABLE_LLVMC_DYNAMIC_PLUGINS
|
|
|
|
endif
|
|
|
|
|
2009-07-03 05:52:47 +02:00
|
|
|
# Copy libCompilerDriver to the bin dir so that llvmc can find it.
|
|
|
|
ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
|
|
|
|
|
2009-06-29 05:09:15 +02:00
|
|
|
FullLibName = $(LIBRARYNAME)$(SHLIBEXT)
|
|
|
|
|
2009-06-30 00:59:36 +02:00
|
|
|
all-local:: $(ToolDir)/$(FullLibName)
|
|
|
|
|
|
|
|
$(ToolDir)/$(FullLibName): $(LibDir)/$(FullLibName) $(ToolDir)/.dir
|
|
|
|
$(Echo) Copying $(BuildMode) Shared Library $(FullLibName) to $@
|
|
|
|
-$(Verb) $(CP) $< $@
|
2009-06-29 05:09:15 +02:00
|
|
|
|
|
|
|
clean-local::
|
|
|
|
$(Echo) Removing $(BuildMode) Shared Library $(FullLibName) \
|
|
|
|
from $(ToolDir)
|
|
|
|
-$(Verb) $(RM) -f $(ToolDir)/$(FullLibName)
|
2009-07-03 05:52:47 +02:00
|
|
|
endif
|