blob: 617518c7c1d06c62efdae13aa578bbe9be471550 [file] [log] [blame]
John Criswelle2fab732003-10-20 22:29:16 +00001##===- 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##===----------------------------------------------------------------------===##
Chris Lattner92101ac2001-08-23 17:05:04 +00009LEVEL = ../..
Chris Lattnerc9744e72001-09-07 22:59:25 +000010TOOLNAME = lli
Chris Lattnerfe11a972002-12-23 23:59:41 +000011
Misha Brukman82742912003-07-02 17:53:19 +000012# Get the $(ARCH) setting
John Criswell7a73b802003-06-30 21:59:07 +000013include $(LEVEL)/Makefile.config
Chris Lattnerd5624362003-06-17 17:53:35 +000014
Chris Lattner7a5500e2003-06-17 15:46:34 +000015# Generic JIT libraries
Brian Gaeked1cab3e2003-09-05 19:42:34 +000016JITLIBS = lli-jit codegen executionengine
Chris Lattner7a5500e2003-06-17 15:46:34 +000017ARCHLIBS =
18
Misha Brukman82742912003-07-02 17:53:19 +000019# 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.
22ifeq ($(ARCH), x86)
23 ENABLE_X86_JIT = 1
24endif
25
Chris Lattner7a5500e2003-06-17 15:46:34 +000026# What the X86 JIT requires
Misha Brukman82742912003-07-02 17:53:19 +000027ifdef ENABLE_X86_JIT
28 CPPFLAGS += -DENABLE_X86_JIT
Chris Lattner80df4632003-08-15 04:56:09 +000029 JITLIBS += x86 selectiondag
Misha Brukman82742912003-07-02 17:53:19 +000030 # X86 doesn't require any ARCHLIBS
31endif
Chris Lattner7a5500e2003-06-17 15:46:34 +000032
Misha Brukman82742912003-07-02 17:53:19 +000033# 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.
36ifeq ($(ARCH), Sparc)
37 ENABLE_SPARC_JIT = 1
38endif
Chris Lattnerd5624362003-06-17 17:53:35 +000039
Chris Lattner7a5500e2003-06-17 15:46:34 +000040# What the Sparc JIT requires
Misha Brukman82742912003-07-02 17:53:19 +000041ifdef ENABLE_SPARC_JIT
42 CPPFLAGS += -DENABLE_SPARC_JIT
Brian Gaeke150666f2004-02-25 19:08:12 +000043 JITLIBS += sparcv9
44 ARCHLIBS += sched sparcv9livevar instrument.a profpaths \
45 bcwriter transforms.a ipo.a ipa.a datastructure.a \
46 sparcv9regalloc sparcv9select
Chris Lattner2bf4c612003-06-17 15:54:52 +000047endif
48
Chris Lattnerf25b7722003-06-17 19:14:59 +000049USEDLIBS = lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \
Misha Brukman248ea322003-07-28 19:06:19 +000050 transformutils.a bcreader vmcore support target.a
Chris Lattnerb7764012002-09-13 22:20:19 +000051
52# Have gcc tell the linker to export symbols from the program so that
53# dynamically loaded modules can be linked against them.
54#
Brian Gaeke52852702003-06-17 20:09:18 +000055TOOLLINKOPTS = $(PLATFORMLIBDL)
Chris Lattnerc9744e72001-09-07 22:59:25 +000056
Chris Lattner92101ac2001-08-23 17:05:04 +000057include $(LEVEL)/Makefile.common