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