Add an assertion to make sure we are at least getting argv[0] right.
[oota-llvm.git] / tools / lli / Makefile
1 ##===- tools/lli/Makefile ------------------------------*- Makefile -*-===##
2
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
7
8 ##===----------------------------------------------------------------------===##
9 LEVEL = ../..
10 TOOLNAME = lli
11
12 # Get the $(ARCH) setting
13 include $(LEVEL)/Makefile.config
14
15 # Generic JIT libraries
16 JITLIBS   = lli-jit codegen executionengine
17 ARCHLIBS  =
18
19 # You can enable the X86 JIT on a non-X86 host by setting the flag
20 # ENABLE_X86_JIT on the make command line. If not, it will still be
21 # enabled automagically on an X86 host.
22 ifeq ($(ARCH), x86)
23   ENABLE_X86_JIT = 1
24 endif
25
26 # What the X86 JIT requires
27 ifdef ENABLE_X86_JIT
28   CPPFLAGS += -DENABLE_X86_JIT
29   JITLIBS  += x86 selectiondag
30   # X86 doesn't require any ARCHLIBS
31 endif
32
33 # You can enable the Sparc JIT on a non-Sparc host by setting the flag
34 # ENABLE_SPARC_JIT on the make command line. If not, it will still be
35 # enabled automagically on an Sparc host.
36 ifeq ($(ARCH), Sparc)
37   ENABLE_SPARC_JIT = 1
38 endif
39
40 # What the Sparc JIT requires
41 ifdef ENABLE_SPARC_JIT
42   CPPFLAGS += -DENABLE_SPARC_JIT
43   JITLIBS  += sparc 
44   ARCHLIBS += sched livevar instrument.a profpaths \
45               bcwriter transforms.a ipo.a ipa.a datastructure.a regalloc \
46               select
47 endif
48
49 USEDLIBS = lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \
50            transformutils.a bcreader vmcore support target.a
51
52 # Have gcc tell the linker to export symbols from the program so that
53 # dynamically loaded modules can be linked against them.
54 #
55 TOOLLINKOPTS = $(PLATFORMLIBDL)
56
57 include $(LEVEL)/Makefile.common