blob: 5a53e07cd1476d2b8708e19b97ab31cde861703a [file] [log] [blame]
Stephen Hines150a70b2011-07-18 17:21:46 -07001#
Stephen Hines7cd4c492012-03-13 19:57:37 -07002# Copyright (C) 2011-2012 The Android Open Source Project
Stephen Hines150a70b2011-07-18 17:21:46 -07003#
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
17local_cflags_for_libbcinfo := -Wall -Wno-unused-parameter -Werror
18ifneq ($(TARGET_BUILD_VARIANT),eng)
19local_cflags_for_libbcinfo += -D__DISABLE_ASSERTS
20endif
21
Stephen Hines932bc6e2011-07-27 16:26:26 -070022ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"
23 BCINFO_API_VERSION := $(PLATFORM_SDK_VERSION)
24else
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))"
29endif
30local_cflags_for_libbcinfo += -DBCINFO_API_VERSION=$(BCINFO_API_VERSION)
31
Stephen Hines150a70b2011-07-18 17:21:46 -070032LOCAL_PATH := $(call my-dir)
33
Stephen Hines932bc6e2011-07-27 16:26:26 -070034libbcinfo_SRC_FILES := \
35 BitcodeTranslator.cpp \
Stephen Hines825b9ae2011-11-22 19:43:31 -080036 BitcodeWrapper.cpp \
Stephen Hines932bc6e2011-07-27 16:26:26 -070037 MetadataExtractor.cpp
38
Stephen Hines16c9b362011-07-18 18:22:16 -070039libbcinfo_C_INCLUDES := $(LOCAL_PATH)/../include
40libbcinfo_STATIC_LIBRARIES := \
Stephen Hines7cd4c492012-03-13 19:57:37 -070041 libLLVMWrap \
Stephen Hines16c9b362011-07-18 18:22:16 -070042 libLLVMBitReader \
43 libLLVMBitWriter \
44 libLLVMCore \
45 libLLVMSupport \
Stephen Hines932bc6e2011-07-27 16:26:26 -070046 libLLVMBitReader_2_7 \
Logan Chienc7d67a72011-12-16 17:06:49 +080047 libLLVMBitReader_3_0
Stephen Hines16c9b362011-07-18 18:22:16 -070048
Stephen Hines150a70b2011-07-18 17:21:46 -070049LLVM_ROOT_PATH := external/llvm
50
51include $(CLEAR_VARS)
52
53LOCAL_MODULE := libbcinfo
54LOCAL_MODULE_CLASS := SHARED_LIBRARIES
55LOCAL_MODULE_TAGS := optional
56intermediates := $(local-intermediates-dir)
57
Stephen Hines16c9b362011-07-18 18:22:16 -070058LOCAL_SRC_FILES := $(libbcinfo_SRC_FILES)
Stephen Hines150a70b2011-07-18 17:21:46 -070059
60LOCAL_CFLAGS += $(local_cflags_for_libbcinfo)
61
Stephen Hines16c9b362011-07-18 18:22:16 -070062LOCAL_C_INCLUDES := $(libbcinfo_C_INCLUDES)
Stephen Hines150a70b2011-07-18 17:21:46 -070063
Stephen Hines16c9b362011-07-18 18:22:16 -070064LOCAL_STATIC_LIBRARIES := $(libbcinfo_STATIC_LIBRARIES)
Stephen Hines150a70b2011-07-18 17:21:46 -070065LOCAL_SHARED_LIBRARIES := libcutils libstlport
66
67include $(LLVM_ROOT_PATH)/llvm-device-build.mk
68include $(BUILD_SHARED_LIBRARY)
Stephen Hines16c9b362011-07-18 18:22:16 -070069
70include $(CLEAR_VARS)
71
72LOCAL_MODULE := libbcinfo
73LOCAL_MODULE_CLASS := SHARED_LIBRARIES
74LOCAL_MODULE_TAGS := optional
75LOCAL_IS_HOST_MODULE := true
76
77LOCAL_SRC_FILES := $(libbcinfo_SRC_FILES)
78
79LOCAL_CFLAGS += $(local_cflags_for_libbcinfo)
80
81LOCAL_C_INCLUDES := $(libbcinfo_C_INCLUDES)
82
83LOCAL_STATIC_LIBRARIES += $(libbcinfo_STATIC_LIBRARIES)
84LOCAL_STATIC_LIBRARIES += libcutils
85
86LOCAL_LDLIBS := -ldl -lpthread
87
88include $(LLVM_ROOT_PATH)/llvm-host-build.mk
89include $(BUILD_HOST_SHARED_LIBRARY)
90
Stephen Hines932bc6e2011-07-27 16:26:26 -070091#=====================================================================
92# Include Subdirectories
93#=====================================================================
94include $(call all-makefiles-under,$(LOCAL_PATH))