blob: 92508d8e708235de4785cc3e9ef960608e90cb56 [file] [log] [blame]
Stephen Hines7cd4c492012-03-13 19:57:37 -07001#
2# Copyright (C) 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
17LOCAL_PATH:= $(call my-dir)
18
Dan Willemsenadfbff42015-08-06 15:26:54 -070019LLVM_ROOT_PATH := external/llvm
Stephen Hines7cd4c492012-03-13 19:57:37 -070020include $(LLVM_ROOT_PATH)/llvm.mk
21
22llvm_wrap_SRC_FILES := \
23 bitcode_wrapperer.cpp \
24 file_wrapper_input.cpp \
25 file_wrapper_output.cpp \
26 in_memory_wrapper_input.cpp \
27 wrapper_output.cpp
28
29llvm_wrap_C_INCLUDES := $(LOCAL_PATH)/../../include
30
31# For the host
32# =====================================================
33include $(CLEAR_VARS)
34
35LOCAL_MODULE:= libLLVMWrap
Dan Willemsen6af50b72015-08-18 16:52:32 -070036LOCAL_MODULE_HOST_OS := darwin linux windows
Stephen Hines7cd4c492012-03-13 19:57:37 -070037
38LOCAL_SRC_FILES := $(llvm_wrap_SRC_FILES)
39LOCAL_CFLAGS += -D__HOST__
40LOCAL_C_INCLUDES := $(llvm_wrap_C_INCLUDES)
41
42include $(LLVM_HOST_BUILD_MK)
43include $(LLVM_GEN_INTRINSICS_MK)
44include $(BUILD_HOST_STATIC_LIBRARY)
45
46# For the device
47# =====================================================
Tim Murrayc6e6ee42014-04-07 14:13:26 -070048ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
Stephen Hines7cd4c492012-03-13 19:57:37 -070049include $(CLEAR_VARS)
50
51LOCAL_MODULE:= libLLVMWrap
Stephen Hines7cd4c492012-03-13 19:57:37 -070052
53LOCAL_SRC_FILES := $(llvm_wrap_SRC_FILES)
54LOCAL_C_INCLUDES := $(llvm_wrap_C_INCLUDES)
55
56include $(LLVM_DEVICE_BUILD_MK)
57include $(LLVM_GEN_INTRINSICS_MK)
58include $(BUILD_STATIC_LIBRARY)
Dan Willemsen6af50b72015-08-18 16:52:32 -070059endif