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 := \ 26 Compiler.cpp \ 27 FileHandle.cpp \ 28 Runtime.c \ 29 RuntimeStub.c \ 30 Script.cpp \ 31 ScriptCompiled.cpp \ 32 SourceInfo.cpp 33 34 ifeq ($(libbcc_USE_OLD_JIT),1) 35 libbcc_executionengine_SRC_FILES += \ 36 OldJIT/ContextManager.cpp 37 endif 38 39 ifeq ($(libbcc_USE_CACHE),1) 40 ifeq ($(libbcc_USE_OLD_JIT),1) 41 libbcc_executionengine_SRC_FILES += \ 42 OldJIT/CacheReader.cpp \ 43 OldJIT/CacheWriter.cpp 44 endif 45 46 ifeq ($(libbcc_USE_MCJIT),1) 47 libbcc_executionengine_SRC_FILES += \ 48 MCCacheWriter.cpp \ 49 MCCacheReader.cpp 50 endif 51 52 libbcc_executionengine_SRC_FILES += \ 53 ScriptCached.cpp \ 54 Sha1Helper.cpp 55 endif 56 57 58 #===================================================================== 59 # Device Static Library: libbccExecutionEngine 60 #===================================================================== 61 62 include $(CLEAR_VARS) 63 64 LOCAL_MODULE := libbccExecutionEngine 65 LOCAL_MODULE_TAGS := optional 66 LOCAL_MODULE_CLASS := STATIC_LIBRARIES 67 68 LOCAL_CFLAGS += $(libbcc_CFLAGS) 69 LOCAL_CFLAGS += -DTARGET_BUILD 70 71 LOCAL_C_INCLUDES := $(libbcc_C_INCLUDES) 72 LOCAL_SRC_FILES := $(libbcc_executionengine_SRC_FILES) 73 74 include $(LIBBCC_ROOT_PATH)/libbcc-gen-config-from-mk.mk 75 include $(LLVM_ROOT_PATH)/llvm-device-build.mk 76 include $(BUILD_STATIC_LIBRARY) 77 78 79 #===================================================================== 80 # Host Static Library: libbccExecutionEngine 81 #===================================================================== 82 83 include $(CLEAR_VARS) 84 85 LOCAL_MODULE := libbccExecutionEngine 86 LOCAL_MODULE_TAGS := optional 87 LOCAL_MODULE_CLASS := STATIC_LIBRARIES 88 LOCAL_IS_HOST_MODULE := true 89 90 LOCAL_CFLAGS += $(libbcc_CFLAGS) 91 LOCAL_C_INCLUDES := $(libbcc_C_INCLUDES) 92 93 LOCAL_SRC_FILES := $(libbcc_executionengine_SRC_FILES) 94 95 include $(LIBBCC_ROOT_PATH)/libbcc-gen-config-from-mk.mk 96 include $(LLVM_ROOT_PATH)/llvm-host-build.mk 97 include $(BUILD_HOST_STATIC_LIBRARY) 98