blob: 67fc996ba6f4c061b2dc8df0341b0130a6efaca5 [file] [log] [blame]
Mikhail Glushenkov113ec352008-11-25 21:38:12 +00001##===- tools/llvmc/driver/Makefile -------------------------*- Makefile -*-===##
Mikhail Glushenkov9d1b6962008-10-03 09:09:34 +00002#
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 = ../../..
Mikhail Glushenkovd80d8692009-06-23 20:46:48 +000011include $(LEVEL)/Makefile.config
Mikhail Glushenkovf1881782009-03-02 09:01:14 +000012
13TOOLNAME = $(LLVMC_BASED_DRIVER_NAME)
Chris Lattner6be92662009-06-16 23:00:42 +000014LLVMLIBS = CompilerDriver.a
Mikhail Glushenkov9d1b6962008-10-03 09:09:34 +000015LINK_COMPONENTS = support system
16REQUIRES_EH := 1
17
Mikhail Glushenkovd80d8692009-06-23 20:46:48 +000018# Preprocessor magic that generates references to static variables in built-in
19# plugins.
20# TODO: Move this to Makefile.rules? (also used by examples/{Skeleton, mcc16})
21ifneq ($(LLVMC_BUILTIN_PLUGINS),)
22
23USEDLIBS += $(patsubst %,plugin_llvmc_%.a,$(LLVMC_BUILTIN_PLUGINS))
24
25LLVMC_BUILTIN_PLUGIN_1 = $(word 1, $(LLVMC_BUILTIN_PLUGINS))
26LLVMC_BUILTIN_PLUGIN_2 = $(word 2, $(LLVMC_BUILTIN_PLUGINS))
27LLVMC_BUILTIN_PLUGIN_3 = $(word 3, $(LLVMC_BUILTIN_PLUGINS))
28LLVMC_BUILTIN_PLUGIN_4 = $(word 4, $(LLVMC_BUILTIN_PLUGINS))
29LLVMC_BUILTIN_PLUGIN_5 = $(word 5, $(LLVMC_BUILTIN_PLUGINS))
30
31ifneq ($(LLVMC_BUILTIN_PLUGIN_1),)
32CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_1=$(LLVMC_BUILTIN_PLUGIN_1)
33endif
34
35ifneq ($(LLVMC_BUILTIN_PLUGIN_2),)
36CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_2=$(LLVMC_BUILTIN_PLUGIN_2)
37endif
38
39ifneq ($(LLVMC_BUILTIN_PLUGIN_3),)
40CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_3=$(LLVMC_BUILTIN_PLUGIN_3)
41endif
42
43ifneq ($(LLVMC_BUILTIN_PLUGIN_4),)
44CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_4=$(LLVMC_BUILTIN_PLUGIN_4)
45endif
46
47ifneq ($(LLVMC_BUILTIN_PLUGIN_5),)
48CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_5)
49endif
50
51endif
52
Mikhail Glushenkov9d1b6962008-10-03 09:09:34 +000053include $(LEVEL)/Makefile.common