LOCAL_PATH := $(call my-dir)
LOCAL_PATH_SMALL = $(shell echo $(LOCAL_PATH) | tr A-Z a-z)
CYGDRIVE_FLAG = $(shell echo $(LOCAL_PATH_SMALL) | grep -c '/cygdrive')
ifeq ($(CYGDRIVE_FLAG), 0)
LOCAL_PATH_WINDOWNS = $(LOCAL_PATH_SMALL)
else
LOCAL_PATH_DRIVE = $(shell echo $(LOCAL_PATH_SMALL) |cut -d '/' -f 3)
LOCAL_PATH_SHARE = $(shell echo $(LOCAL_PATH_SMALL) |cut -d '/' -f 4-)
LOCAL_PATH_WINDOWNS = $(shell echo $(LOCAL_PATH_DRIVE):/$(LOCAL_PATH_SHARE))
endif
include $(CLEAR_VARS)
LOCAL_MODULE := libxxx
LOCAL_SRC_FILES := libxxx.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libxxx
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_TAGS := optional
ifeq ($(shell echo $(CYGWIN)), tty)
ANDROID_INCLUDE_TOP := /cygdrive/E/shanghai/header/hisi-froyo-headers
LOCAL_LDLIBS := -L"$(LOCAL_PATH_WINDOWNS)/android/lib" \
-llog -lnativehelper -landroid_runtime
else
ANDROID_INCLUDE_TOP :=
LOCAL_SHARED_LIBRARIES := \
liblog
endif
LOCAL_SRC_FILES := \
xxx.c \
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/android/include \
$(ANDROID_INCLUDE_TOP)/dalvik/libnativehelper/include \
$(ANDROID_INCLUDE_TOP)/frameworks/base/include \
$(ANDROID_INCLUDE_TOP)/system/core/include \
$(ANDROID_INCLUDE_TOP)/hardware/libhardware/include \
$(ANDROID_INCLUDE_TOP)/external/skia/include \
$(ANDROID_INCLUDE_TOP)/frameworks/base/native/include \
$(ANDROID_INCLUDE_TOP)/frameworks/base/opengl/include\
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
ifeq ($(shell echo $(CYGWIN)), tty)
ANDROID_INCLUDE_TOP := /cygdrive/E/shanghai/header/hisi-froyo-headers
LOCAL_LDLIBS := -L"$(LOCAL_PATH_WINDOWNS)/android/lib" \
-llog -lnativehelper -lsurfaceflinger_client -lmedia\
-lskia -lcutils -lui -landroid_runtime -lbinder -lutils \
else
ANDROID_INCLUDE_TOP :=
LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils \
libnativehelper \
libsurfaceflinger_client \
libskia \
libui \
libandroid_runtime
endif
LOCAL_MODULE := libxxxx
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES = libxxx
LOCAL_SRC_FILES := \
xxxx.c \
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/android/include \
$(ANDROID_INCLUDE_TOP)/dalvik/libnativehelper/include \
$(ANDROID_INCLUDE_TOP)/frameworks/base/include \
$(ANDROID_INCLUDE_TOP)/system/core/include \
$(ANDROID_INCLUDE_TOP)/hardware/libhardware/include \
$(ANDROID_INCLUDE_TOP)/external/skia/include \
$(ANDROID_INCLUDE_TOP)/frameworks/base/native/include \
$(ANDROID_INCLUDE_TOP)/frameworks/base/opengl/include
LOCAL_CFLAGS += -D__ANDROID__
LOCAL_CPPFLAGS += -D_cplusplus -D__ANDROID__
include $(BUILD_SHARED_LIBRARY)
--login -c "cd '${project_loc}'&& $NDK/ndk-build -j 2"