Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 1 | # |
| 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 | |
| 18 | LOCAL_PATH := $(call my-dir) |
| 19 | include $(LOCAL_PATH)/../../libbcc-config.mk |
| 20 | |
| 21 | #===================================================================== |
| 22 | # Common: libbccExecutionEngine |
| 23 | #===================================================================== |
| 24 | |
| 25 | libbcc_executionengine_SRC_FILES := \ |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 26 | Compiler.cpp \ |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 27 | FileHandle.cpp \ |
Daniel Malea | 094881f | 2011-12-14 17:39:16 -0500 | [diff] [blame^] | 28 | GDBJIT.cpp \ |
| 29 | GDBJITRegistrar.cpp \ |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 30 | Runtime.c \ |
| 31 | RuntimeStub.c \ |
| 32 | Script.cpp \ |
| 33 | ScriptCompiled.cpp \ |
| 34 | SourceInfo.cpp |
| 35 | |
Logan Chien | d2a5f30 | 2011-07-19 20:32:25 +0800 | [diff] [blame] | 36 | ifeq ($(libbcc_USE_OLD_JIT),1) |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 37 | libbcc_executionengine_SRC_FILES += \ |
Logan Chien | d2a5f30 | 2011-07-19 20:32:25 +0800 | [diff] [blame] | 38 | OldJIT/ContextManager.cpp |
| 39 | endif |
| 40 | |
| 41 | ifeq ($(libbcc_USE_CACHE),1) |
| 42 | ifeq ($(libbcc_USE_OLD_JIT),1) |
| 43 | libbcc_executionengine_SRC_FILES += \ |
| 44 | OldJIT/CacheReader.cpp \ |
| 45 | OldJIT/CacheWriter.cpp |
| 46 | endif |
| 47 | |
| 48 | ifeq ($(libbcc_USE_MCJIT),1) |
| 49 | libbcc_executionengine_SRC_FILES += \ |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 50 | MCCacheWriter.cpp \ |
| 51 | MCCacheReader.cpp |
| 52 | endif |
| 53 | |
Logan Chien | d2a5f30 | 2011-07-19 20:32:25 +0800 | [diff] [blame] | 54 | libbcc_executionengine_SRC_FILES += \ |
| 55 | ScriptCached.cpp \ |
| 56 | Sha1Helper.cpp |
| 57 | endif |
| 58 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 59 | |
| 60 | #===================================================================== |
| 61 | # Device Static Library: libbccExecutionEngine |
| 62 | #===================================================================== |
| 63 | |
| 64 | include $(CLEAR_VARS) |
| 65 | |
| 66 | LOCAL_MODULE := libbccExecutionEngine |
| 67 | LOCAL_MODULE_TAGS := optional |
| 68 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Logan Chien | 6700527 | 2011-07-14 19:51:54 +0800 | [diff] [blame] | 69 | |
| 70 | LOCAL_CFLAGS += $(libbcc_CFLAGS) |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 71 | LOCAL_CFLAGS += -DTARGET_BUILD |
Logan Chien | 6700527 | 2011-07-14 19:51:54 +0800 | [diff] [blame] | 72 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 73 | LOCAL_C_INCLUDES := $(libbcc_C_INCLUDES) |
| 74 | LOCAL_SRC_FILES := $(libbcc_executionengine_SRC_FILES) |
| 75 | |
Logan Chien | eb56784 | 2011-07-14 19:58:42 +0800 | [diff] [blame] | 76 | include $(LIBBCC_ROOT_PATH)/libbcc-gen-config-from-mk.mk |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 77 | include $(LIBBCC_ROOT_PATH)/libbcc-build-rules.mk |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 78 | include $(LLVM_ROOT_PATH)/llvm-device-build.mk |
| 79 | include $(BUILD_STATIC_LIBRARY) |
| 80 | |
| 81 | |
| 82 | #===================================================================== |
| 83 | # Host Static Library: libbccExecutionEngine |
| 84 | #===================================================================== |
| 85 | |
| 86 | include $(CLEAR_VARS) |
| 87 | |
| 88 | LOCAL_MODULE := libbccExecutionEngine |
| 89 | LOCAL_MODULE_TAGS := optional |
| 90 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Logan Chien | 57991d7 | 2011-07-14 19:57:14 +0800 | [diff] [blame] | 91 | LOCAL_IS_HOST_MODULE := true |
Logan Chien | 6700527 | 2011-07-14 19:51:54 +0800 | [diff] [blame] | 92 | |
| 93 | LOCAL_CFLAGS += $(libbcc_CFLAGS) |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 94 | LOCAL_C_INCLUDES := $(libbcc_C_INCLUDES) |
Logan Chien | 6700527 | 2011-07-14 19:51:54 +0800 | [diff] [blame] | 95 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 96 | LOCAL_SRC_FILES := $(libbcc_executionengine_SRC_FILES) |
| 97 | |
Logan Chien | eb56784 | 2011-07-14 19:58:42 +0800 | [diff] [blame] | 98 | include $(LIBBCC_ROOT_PATH)/libbcc-gen-config-from-mk.mk |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 99 | include $(LIBBCC_ROOT_PATH)/libbcc-build-rules.mk |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 100 | include $(LLVM_ROOT_PATH)/llvm-host-build.mk |
| 101 | include $(BUILD_HOST_STATIC_LIBRARY) |