Home | History | Annotate | Download | only in libnativehelper
      1 # Copyright (C) 2009 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 
     16 LOCAL_PATH := $(call my-dir)
     17 
     18 local_src_files := \
     19     JNIHelp.cpp \
     20     JniConstants.cpp \
     21     toStringArray.cpp
     22 
     23 
     24 #
     25 # Build for the target (device).
     26 #
     27 
     28 include $(CLEAR_VARS)
     29 LOCAL_SRC_FILES := \
     30     $(local_src_files) \
     31     JniInvocation.cpp
     32 LOCAL_SHARED_LIBRARIES := liblog
     33 LOCAL_MODULE_TAGS := optional
     34 LOCAL_MODULE := libnativehelper
     35 LOCAL_CLANG := true
     36 LOCAL_CFLAGS := -Werror -fvisibility=protected
     37 LOCAL_C_INCLUDES := external/stlport/stlport bionic/ bionic/libstdc++/include libcore/include
     38 LOCAL_SHARED_LIBRARIES += libcutils libstlport libdl
     39 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     40 include $(BUILD_SHARED_LIBRARY)
     41 
     42 
     43 #
     44 # NDK-only build for the target (device), using libc++.
     45 # - Relies only on NDK exposed functionality.
     46 # - This doesn't include JniInvocation.
     47 #
     48 
     49 include $(CLEAR_VARS)
     50 LOCAL_MODULE_TAGS := optional
     51 LOCAL_MODULE := libnativehelper_compat_libc++
     52 LOCAL_CLANG := true
     53 LOCAL_C_INCLUDES := \
     54     $(LOCAL_PATH)/include/nativehelper
     55 LOCAL_EXPORT_C_INCLUDE_DIRS := \
     56     $(LOCAL_PATH)/include/nativehelper
     57 LOCAL_CFLAGS := -Werror
     58 LOCAL_SRC_FILES := $(local_src_files)
     59 LOCAL_LDFLAGS := -llog -ldl
     60 LOCAL_SDK_VERSION := 19
     61 LOCAL_NDK_STL_VARIANT := c++_static
     62 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     63 include $(BUILD_SHARED_LIBRARY)
     64 
     65 
     66 #
     67 # Build for the host.
     68 #
     69 
     70 include $(CLEAR_VARS)
     71 LOCAL_MODULE := libnativehelper
     72 LOCAL_MODULE_TAGS := optional
     73 LOCAL_CLANG := true
     74 LOCAL_SRC_FILES := \
     75     $(local_src_files) \
     76     JniInvocation.cpp
     77 LOCAL_CFLAGS := -Werror -fvisibility=protected
     78 LOCAL_C_INCLUDES := libcore/include
     79 LOCAL_SHARED_LIBRARIES := liblog
     80 LOCAL_LDFLAGS := -ldl
     81 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     82 LOCAL_MULTILIB := both
     83 include $(BUILD_HOST_SHARED_LIBRARY)
     84