Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [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 | 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 | |
Stephen Hines | 932bc6e | 2011-07-27 16:26:26 -0700 | [diff] [blame^] | 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 | |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 32 | LOCAL_PATH := $(call my-dir) |
| 33 | |
Stephen Hines | 932bc6e | 2011-07-27 16:26:26 -0700 | [diff] [blame^] | 34 | libbcinfo_SRC_FILES := \ |
| 35 | BitcodeTranslator.cpp \ |
| 36 | MetadataExtractor.cpp |
| 37 | |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 38 | libbcinfo_C_INCLUDES := $(LOCAL_PATH)/../include |
| 39 | libbcinfo_STATIC_LIBRARIES := \ |
| 40 | libLLVMBitReader \ |
| 41 | libLLVMBitWriter \ |
| 42 | libLLVMCore \ |
| 43 | libLLVMSupport \ |
Stephen Hines | 932bc6e | 2011-07-27 16:26:26 -0700 | [diff] [blame^] | 44 | libLLVMBitReader_2_7 \ |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 45 | |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 46 | LLVM_ROOT_PATH := external/llvm |
| 47 | |
| 48 | include $(CLEAR_VARS) |
| 49 | |
| 50 | LOCAL_MODULE := libbcinfo |
| 51 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 52 | LOCAL_MODULE_TAGS := optional |
| 53 | intermediates := $(local-intermediates-dir) |
| 54 | |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 55 | LOCAL_SRC_FILES := $(libbcinfo_SRC_FILES) |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 56 | |
| 57 | LOCAL_CFLAGS += $(local_cflags_for_libbcinfo) |
| 58 | |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 59 | LOCAL_C_INCLUDES := $(libbcinfo_C_INCLUDES) |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 60 | |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 61 | LOCAL_STATIC_LIBRARIES := $(libbcinfo_STATIC_LIBRARIES) |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 62 | LOCAL_SHARED_LIBRARIES := libcutils libstlport |
| 63 | |
| 64 | include $(LLVM_ROOT_PATH)/llvm-device-build.mk |
| 65 | include $(BUILD_SHARED_LIBRARY) |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 66 | |
| 67 | include $(CLEAR_VARS) |
| 68 | |
| 69 | LOCAL_MODULE := libbcinfo |
| 70 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 71 | LOCAL_MODULE_TAGS := optional |
| 72 | LOCAL_IS_HOST_MODULE := true |
| 73 | |
| 74 | LOCAL_SRC_FILES := $(libbcinfo_SRC_FILES) |
| 75 | |
| 76 | LOCAL_CFLAGS += $(local_cflags_for_libbcinfo) |
| 77 | |
| 78 | LOCAL_C_INCLUDES := $(libbcinfo_C_INCLUDES) |
| 79 | |
| 80 | LOCAL_STATIC_LIBRARIES += $(libbcinfo_STATIC_LIBRARIES) |
| 81 | LOCAL_STATIC_LIBRARIES += libcutils |
| 82 | |
| 83 | LOCAL_LDLIBS := -ldl -lpthread |
| 84 | |
| 85 | include $(LLVM_ROOT_PATH)/llvm-host-build.mk |
| 86 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 87 | |
Stephen Hines | 932bc6e | 2011-07-27 16:26:26 -0700 | [diff] [blame^] | 88 | #===================================================================== |
| 89 | # Include Subdirectories |
| 90 | #===================================================================== |
| 91 | include $(call all-makefiles-under,$(LOCAL_PATH)) |