Mikhail Glushenkov | 113ec35 | 2008-11-25 21:38:12 +0000 | [diff] [blame] | 1 | ##===- tools/llvmc/driver/Makefile -------------------------*- Makefile -*-===## |
Mikhail Glushenkov | 9d1b696 | 2008-10-03 09:09:34 +0000 | [diff] [blame] | 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 = ../../.. |
Mikhail Glushenkov | d80d869 | 2009-06-23 20:46:48 +0000 | [diff] [blame^] | 11 | include $(LEVEL)/Makefile.config |
Mikhail Glushenkov | f188178 | 2009-03-02 09:01:14 +0000 | [diff] [blame] | 12 | |
| 13 | TOOLNAME = $(LLVMC_BASED_DRIVER_NAME) |
Chris Lattner | 6be9266 | 2009-06-16 23:00:42 +0000 | [diff] [blame] | 14 | LLVMLIBS = CompilerDriver.a |
Mikhail Glushenkov | 9d1b696 | 2008-10-03 09:09:34 +0000 | [diff] [blame] | 15 | LINK_COMPONENTS = support system |
| 16 | REQUIRES_EH := 1 |
| 17 | |
Mikhail Glushenkov | d80d869 | 2009-06-23 20:46:48 +0000 | [diff] [blame^] | 18 | # 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}) |
| 21 | ifneq ($(LLVMC_BUILTIN_PLUGINS),) |
| 22 | |
| 23 | USEDLIBS += $(patsubst %,plugin_llvmc_%.a,$(LLVMC_BUILTIN_PLUGINS)) |
| 24 | |
| 25 | LLVMC_BUILTIN_PLUGIN_1 = $(word 1, $(LLVMC_BUILTIN_PLUGINS)) |
| 26 | LLVMC_BUILTIN_PLUGIN_2 = $(word 2, $(LLVMC_BUILTIN_PLUGINS)) |
| 27 | LLVMC_BUILTIN_PLUGIN_3 = $(word 3, $(LLVMC_BUILTIN_PLUGINS)) |
| 28 | LLVMC_BUILTIN_PLUGIN_4 = $(word 4, $(LLVMC_BUILTIN_PLUGINS)) |
| 29 | LLVMC_BUILTIN_PLUGIN_5 = $(word 5, $(LLVMC_BUILTIN_PLUGINS)) |
| 30 | |
| 31 | ifneq ($(LLVMC_BUILTIN_PLUGIN_1),) |
| 32 | CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_1=$(LLVMC_BUILTIN_PLUGIN_1) |
| 33 | endif |
| 34 | |
| 35 | ifneq ($(LLVMC_BUILTIN_PLUGIN_2),) |
| 36 | CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_2=$(LLVMC_BUILTIN_PLUGIN_2) |
| 37 | endif |
| 38 | |
| 39 | ifneq ($(LLVMC_BUILTIN_PLUGIN_3),) |
| 40 | CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_3=$(LLVMC_BUILTIN_PLUGIN_3) |
| 41 | endif |
| 42 | |
| 43 | ifneq ($(LLVMC_BUILTIN_PLUGIN_4),) |
| 44 | CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_4=$(LLVMC_BUILTIN_PLUGIN_4) |
| 45 | endif |
| 46 | |
| 47 | ifneq ($(LLVMC_BUILTIN_PLUGIN_5),) |
| 48 | CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_5) |
| 49 | endif |
| 50 | |
| 51 | endif |
| 52 | |
Mikhail Glushenkov | 9d1b696 | 2008-10-03 09:09:34 +0000 | [diff] [blame] | 53 | include $(LEVEL)/Makefile.common |