Home | History | Annotate | Download | only in Wrap
      1 #
      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 
     17 LOCAL_PATH:= $(call my-dir)
     18 
     19 LLVM_ROOT_PATH := external/llvm
     20 include $(LLVM_ROOT_PATH)/llvm.mk
     21 
     22 llvm_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 
     29 llvm_wrap_C_INCLUDES := $(LOCAL_PATH)/../../include
     30 
     31 # For the host
     32 # =====================================================
     33 include $(CLEAR_VARS)
     34 
     35 LOCAL_MODULE:= libLLVMWrap
     36 LOCAL_MODULE_HOST_OS := darwin linux windows
     37 
     38 LOCAL_SRC_FILES := $(llvm_wrap_SRC_FILES)
     39 LOCAL_CFLAGS += -D__HOST__
     40 LOCAL_C_INCLUDES := $(llvm_wrap_C_INCLUDES)
     41 
     42 include $(LLVM_HOST_BUILD_MK)
     43 include $(LLVM_GEN_INTRINSICS_MK)
     44 include $(BUILD_HOST_STATIC_LIBRARY)
     45 
     46 # For the device
     47 # =====================================================
     48 ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
     49 include $(CLEAR_VARS)
     50 
     51 LOCAL_MODULE:= libLLVMWrap
     52 
     53 LOCAL_SRC_FILES := $(llvm_wrap_SRC_FILES)
     54 LOCAL_C_INCLUDES := $(llvm_wrap_C_INCLUDES)
     55 
     56 include $(LLVM_DEVICE_BUILD_MK)
     57 include $(LLVM_GEN_INTRINSICS_MK)
     58 include $(BUILD_STATIC_LIBRARY)
     59 endif
     60