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 local_cflags_for_libbcinfo := -Wall -Wno-unused-parameter -Werror 18 ifneq ($(TARGET_BUILD_VARIANT),eng) 19 local_cflags_for_libbcinfo += -D__DISABLE_ASSERTS 20 endif 21 22 ifeq "REL" "$(PLATFORM_VERSION_CODENAME)" 23 BCINFO_API_VERSION := $(PLATFORM_SDK_VERSION) 24 else 25 # Increment by 1 whenever this is not a final release build, since we want to 26 # be able to see the RS version number change during development. 27 # See build/core/version_defaults.mk for more information about this. 28 BCINFO_API_VERSION := "(1 + $(PLATFORM_SDK_VERSION))" 29 endif 30 local_cflags_for_libbcinfo += -DBCINFO_API_VERSION=$(BCINFO_API_VERSION) 31 32 LOCAL_PATH := $(call my-dir) 33 34 libbcinfo_SRC_FILES := \ 35 BitcodeTranslator.cpp \ 36 BitcodeWrapper.cpp \ 37 MetadataExtractor.cpp 38 39 libbcinfo_C_INCLUDES := $(LOCAL_PATH)/../include 40 libbcinfo_STATIC_LIBRARIES := \ 41 libLLVMBitReader \ 42 libLLVMBitWriter \ 43 libLLVMCore \ 44 libLLVMSupport \ 45 libLLVMBitReader_2_7 \ 46 47 LLVM_ROOT_PATH := external/llvm 48 49 include $(CLEAR_VARS) 50 51 LOCAL_MODULE := libbcinfo 52 LOCAL_MODULE_CLASS := SHARED_LIBRARIES 53 LOCAL_MODULE_TAGS := optional 54 intermediates := $(local-intermediates-dir) 55 56 LOCAL_SRC_FILES := $(libbcinfo_SRC_FILES) 57 58 LOCAL_CFLAGS += $(local_cflags_for_libbcinfo) 59 60 LOCAL_C_INCLUDES := $(libbcinfo_C_INCLUDES) 61 62 LOCAL_STATIC_LIBRARIES := $(libbcinfo_STATIC_LIBRARIES) 63 LOCAL_SHARED_LIBRARIES := libcutils libstlport 64 65 include $(LLVM_ROOT_PATH)/llvm-device-build.mk 66 include $(BUILD_SHARED_LIBRARY) 67 68 include $(CLEAR_VARS) 69 70 LOCAL_MODULE := libbcinfo 71 LOCAL_MODULE_CLASS := SHARED_LIBRARIES 72 LOCAL_MODULE_TAGS := optional 73 LOCAL_IS_HOST_MODULE := true 74 75 LOCAL_SRC_FILES := $(libbcinfo_SRC_FILES) 76 77 LOCAL_CFLAGS += $(local_cflags_for_libbcinfo) 78 79 LOCAL_C_INCLUDES := $(libbcinfo_C_INCLUDES) 80 81 LOCAL_STATIC_LIBRARIES += $(libbcinfo_STATIC_LIBRARIES) 82 LOCAL_STATIC_LIBRARIES += libcutils 83 84 LOCAL_LDLIBS := -ldl -lpthread 85 86 include $(LLVM_ROOT_PATH)/llvm-host-build.mk 87 include $(BUILD_HOST_SHARED_LIBRARY) 88 89 #===================================================================== 90 # Include Subdirectories 91 #===================================================================== 92 include $(call all-makefiles-under,$(LOCAL_PATH)) 93