1 ##===- llvmc/example/mcc16/driver/Makefile -----------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open
6 # Source License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
10 LEVEL = $(LLVMC_BASE_LEVEL)/..
11 include $(LEVEL)/Makefile.config
13 TOOLNAME = $(LLVMC_BASED_DRIVER_NAME)
14 LLVMLIBS = CompilerDriver.a
15 LINK_COMPONENTS = support system
18 # Preprocessor magic that generates references to static variables in built-in
20 # TODO: Move this to Makefile.rules? (also used by examples/{Skeleton, mcc16})
21 ifneq ($(LLVMC_BUILTIN_PLUGINS),)
23 USEDLIBS += $(patsubst %,plugin_llvmc_%.a,$(LLVMC_BUILTIN_PLUGINS))
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))
31 ifneq ($(LLVMC_BUILTIN_PLUGIN_1),)
32 CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_1=$(LLVMC_BUILTIN_PLUGIN_1)
35 ifneq ($(LLVMC_BUILTIN_PLUGIN_2),)
36 CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_2=$(LLVMC_BUILTIN_PLUGIN_2)
39 ifneq ($(LLVMC_BUILTIN_PLUGIN_3),)
40 CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_3=$(LLVMC_BUILTIN_PLUGIN_3)
43 ifneq ($(LLVMC_BUILTIN_PLUGIN_4),)
44 CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_4=$(LLVMC_BUILTIN_PLUGIN_4)
47 ifneq ($(LLVMC_BUILTIN_PLUGIN_5),)
48 CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_5)
53 include $(LEVEL)/Makefile.common