Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 1 | # |
Stephen Hines | 7cd4c49 | 2012-03-13 19:57:37 -0700 | [diff] [blame] | 2 | # Copyright (C) 2011-2012 The Android Open Source Project |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 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 | |
Tim Murray | 6297382 | 2013-02-06 17:22:23 -0800 | [diff] [blame] | 17 | # Don't build for unbundled branches |
| 18 | ifeq (,$(TARGET_BUILD_APPS)) |
| 19 | |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 20 | local_cflags_for_libbcinfo := -Wall -Wno-unused-parameter -Werror |
| 21 | ifneq ($(TARGET_BUILD_VARIANT),eng) |
| 22 | local_cflags_for_libbcinfo += -D__DISABLE_ASSERTS |
| 23 | endif |
| 24 | |
| 25 | LOCAL_PATH := $(call my-dir) |
| 26 | |
Stephen Hines | e109434 | 2014-05-13 17:55:49 -0700 | [diff] [blame] | 27 | include frameworks/compile/slang/rs_version.mk |
| 28 | local_cflags_for_libbcinfo += $(RS_VERSION_DEFINE) |
| 29 | |
Stephen Hines | 932bc6e | 2011-07-27 16:26:26 -0700 | [diff] [blame] | 30 | libbcinfo_SRC_FILES := \ |
| 31 | BitcodeTranslator.cpp \ |
Stephen Hines | 825b9ae | 2011-11-22 19:43:31 -0800 | [diff] [blame] | 32 | BitcodeWrapper.cpp \ |
Stephen Hines | 932bc6e | 2011-07-27 16:26:26 -0700 | [diff] [blame] | 33 | MetadataExtractor.cpp |
| 34 | |
Stephen Hines | 8dbca8e | 2013-06-21 16:30:26 -0700 | [diff] [blame] | 35 | libbcinfo_C_INCLUDES := \ |
| 36 | $(LOCAL_PATH)/../include \ |
| 37 | $(LOCAL_PATH)/../../slang |
| 38 | |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 39 | libbcinfo_STATIC_LIBRARIES := \ |
Stephen Hines | 7cd4c49 | 2012-03-13 19:57:37 -0700 | [diff] [blame] | 40 | libLLVMWrap \ |
Stephen Hines | 932bc6e | 2011-07-27 16:26:26 -0700 | [diff] [blame] | 41 | libLLVMBitReader_2_7 \ |
Stephen Hines | 8dbca8e | 2013-06-21 16:30:26 -0700 | [diff] [blame] | 42 | libLLVMBitReader_3_0 \ |
| 43 | libLLVMBitWriter_3_2 |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 44 | |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 45 | LLVM_ROOT_PATH := external/llvm |
| 46 | |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 47 | ifeq ($(TARGET_ARCH),arm64) |
| 48 | $(info TODOArm64: $(LOCAL_PATH)/Android.mk Enable build of libbcinfo device shared library) |
| 49 | endif |
| 50 | |
| 51 | ifeq ($(TARGET_ARCH),mips64) |
| 52 | $(info TODOMips64: $(LOCAL_PATH)/Android.mk Enable build of libbcinfo device shared library) |
| 53 | endif |
Ashok Bhat | ad7d4c3 | 2013-11-22 13:29:44 +0000 | [diff] [blame] | 54 | |
Tim Murray | c6e6ee4 | 2014-04-07 14:13:26 -0700 | [diff] [blame] | 55 | ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS)) |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 56 | include $(CLEAR_VARS) |
| 57 | |
| 58 | LOCAL_MODULE := libbcinfo |
| 59 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 60 | LOCAL_MODULE_TAGS := optional |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 61 | |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 62 | LOCAL_SRC_FILES := $(libbcinfo_SRC_FILES) |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 63 | |
| 64 | LOCAL_CFLAGS += $(local_cflags_for_libbcinfo) |
| 65 | |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 66 | LOCAL_C_INCLUDES := $(libbcinfo_C_INCLUDES) |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 67 | |
Stephen Hines | 4b77872 | 2013-02-27 23:22:45 -0800 | [diff] [blame] | 68 | LOCAL_STATIC_LIBRARIES := $(libbcinfo_STATIC_LIBRARIES) |
Stephen Hines | 52031f2 | 2014-06-05 14:29:44 -0700 | [diff] [blame^] | 69 | LOCAL_SHARED_LIBRARIES := libLLVM libcutils liblog |
Stephen Hines | 150a70b | 2011-07-18 17:21:46 -0700 | [diff] [blame] | 70 | |
| 71 | include $(LLVM_ROOT_PATH)/llvm-device-build.mk |
| 72 | include $(BUILD_SHARED_LIBRARY) |
Tim Murray | c6e6ee4 | 2014-04-07 14:13:26 -0700 | [diff] [blame] | 73 | endif |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 74 | |
| 75 | include $(CLEAR_VARS) |
| 76 | |
| 77 | LOCAL_MODULE := libbcinfo |
| 78 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 79 | LOCAL_MODULE_TAGS := optional |
| 80 | LOCAL_IS_HOST_MODULE := true |
| 81 | |
| 82 | LOCAL_SRC_FILES := $(libbcinfo_SRC_FILES) |
| 83 | |
| 84 | LOCAL_CFLAGS += $(local_cflags_for_libbcinfo) |
| 85 | |
| 86 | LOCAL_C_INCLUDES := $(libbcinfo_C_INCLUDES) |
| 87 | |
| 88 | LOCAL_STATIC_LIBRARIES += $(libbcinfo_STATIC_LIBRARIES) |
Ying Wang | 2edf6d6 | 2013-04-09 21:54:38 -0700 | [diff] [blame] | 89 | LOCAL_STATIC_LIBRARIES += libcutils liblog |
Stephen Hines | ba8d7ce | 2013-02-27 00:40:04 -0800 | [diff] [blame] | 90 | LOCAL_SHARED_LIBRARIES += libLLVM |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 91 | |
Stephen Hines | 48cd745 | 2013-07-30 22:33:44 -0700 | [diff] [blame] | 92 | ifndef USE_MINGW |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 93 | LOCAL_LDLIBS := -ldl -lpthread |
Stephen Hines | 48cd745 | 2013-07-30 22:33:44 -0700 | [diff] [blame] | 94 | endif |
Stephen Hines | 16c9b36 | 2011-07-18 18:22:16 -0700 | [diff] [blame] | 95 | |
| 96 | include $(LLVM_ROOT_PATH)/llvm-host-build.mk |
| 97 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 98 | |
Tim Murray | 6297382 | 2013-02-06 17:22:23 -0800 | [diff] [blame] | 99 | endif # don't build for unbundled branches |
| 100 | |
Stephen Hines | 932bc6e | 2011-07-27 16:26:26 -0700 | [diff] [blame] | 101 | #===================================================================== |
| 102 | # Include Subdirectories |
| 103 | #===================================================================== |
| 104 | include $(call all-makefiles-under,$(LOCAL_PATH)) |