blob: 4aa6a3f354eef5c67b26b3478ffd43a4a970ddbd [file] [log] [blame]
Logan Chien74396852011-07-12 15:50:26 +08001#
2# Copyright (C) 2011 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16#
17
18LOCAL_PATH := $(call my-dir)
19include $(LOCAL_PATH)/../../libbcc-config.mk
20
21#=====================================================================
22# Common: libbccExecutionEngine
23#=====================================================================
24
25libbcc_executionengine_SRC_FILES := \
Logan Chien74396852011-07-12 15:50:26 +080026 Compiler.cpp \
Logan Chien74396852011-07-12 15:50:26 +080027 FileHandle.cpp \
Daniel Malea094881f2011-12-14 17:39:16 -050028 GDBJIT.cpp \
29 GDBJITRegistrar.cpp \
Logan Chien74396852011-07-12 15:50:26 +080030 Runtime.c \
31 RuntimeStub.c \
32 Script.cpp \
33 ScriptCompiled.cpp \
34 SourceInfo.cpp
35
Logan Chiend2a5f302011-07-19 20:32:25 +080036ifeq ($(libbcc_USE_OLD_JIT),1)
Logan Chien74396852011-07-12 15:50:26 +080037libbcc_executionengine_SRC_FILES += \
Logan Chiend2a5f302011-07-19 20:32:25 +080038 OldJIT/ContextManager.cpp
39endif
40
41ifeq ($(libbcc_USE_CACHE),1)
42ifeq ($(libbcc_USE_OLD_JIT),1)
43libbcc_executionengine_SRC_FILES += \
44 OldJIT/CacheReader.cpp \
45 OldJIT/CacheWriter.cpp
46endif
47
48ifeq ($(libbcc_USE_MCJIT),1)
49libbcc_executionengine_SRC_FILES += \
Logan Chien74396852011-07-12 15:50:26 +080050 MCCacheWriter.cpp \
51 MCCacheReader.cpp
52endif
53
Logan Chiend2a5f302011-07-19 20:32:25 +080054libbcc_executionengine_SRC_FILES += \
55 ScriptCached.cpp \
56 Sha1Helper.cpp
57endif
58
Logan Chien74396852011-07-12 15:50:26 +080059
60#=====================================================================
61# Device Static Library: libbccExecutionEngine
62#=====================================================================
63
64include $(CLEAR_VARS)
65
66LOCAL_MODULE := libbccExecutionEngine
67LOCAL_MODULE_TAGS := optional
68LOCAL_MODULE_CLASS := STATIC_LIBRARIES
Logan Chien67005272011-07-14 19:51:54 +080069
70LOCAL_CFLAGS += $(libbcc_CFLAGS)
Logan Chien74396852011-07-12 15:50:26 +080071LOCAL_CFLAGS += -DTARGET_BUILD
Logan Chien67005272011-07-14 19:51:54 +080072
Logan Chien74396852011-07-12 15:50:26 +080073LOCAL_C_INCLUDES := $(libbcc_C_INCLUDES)
74LOCAL_SRC_FILES := $(libbcc_executionengine_SRC_FILES)
75
Logan Chieneb567842011-07-14 19:58:42 +080076include $(LIBBCC_ROOT_PATH)/libbcc-gen-config-from-mk.mk
Logan Chien3bb77072011-09-17 16:53:53 +080077include $(LIBBCC_ROOT_PATH)/libbcc-build-rules.mk
Logan Chien74396852011-07-12 15:50:26 +080078include $(LLVM_ROOT_PATH)/llvm-device-build.mk
79include $(BUILD_STATIC_LIBRARY)
80
81
82#=====================================================================
83# Host Static Library: libbccExecutionEngine
84#=====================================================================
85
86include $(CLEAR_VARS)
87
88LOCAL_MODULE := libbccExecutionEngine
89LOCAL_MODULE_TAGS := optional
90LOCAL_MODULE_CLASS := STATIC_LIBRARIES
Logan Chien57991d72011-07-14 19:57:14 +080091LOCAL_IS_HOST_MODULE := true
Logan Chien67005272011-07-14 19:51:54 +080092
93LOCAL_CFLAGS += $(libbcc_CFLAGS)
Logan Chien74396852011-07-12 15:50:26 +080094LOCAL_C_INCLUDES := $(libbcc_C_INCLUDES)
Logan Chien67005272011-07-14 19:51:54 +080095
Logan Chien74396852011-07-12 15:50:26 +080096LOCAL_SRC_FILES := $(libbcc_executionengine_SRC_FILES)
97
Logan Chieneb567842011-07-14 19:58:42 +080098include $(LIBBCC_ROOT_PATH)/libbcc-gen-config-from-mk.mk
Logan Chien3bb77072011-09-17 16:53:53 +080099include $(LIBBCC_ROOT_PATH)/libbcc-build-rules.mk
Logan Chien74396852011-07-12 15:50:26 +0800100include $(LLVM_ROOT_PATH)/llvm-host-build.mk
101include $(BUILD_HOST_STATIC_LIBRARY)