blob: e3d9cb5497db6576bcab02506824a8faf7d1a104 [file] [log] [blame]
David 'Digit' Turnerf68d6af2010-07-09 09:56:31 -07001LOCAL_PATH := $(call my-dir)
2
3# Define BUILD_FOO=1 to rebuild libfoo.so from scratch, then
4# copy obj/local/armeabi/libfoo.so to jni/libfoo.so
5#
6ifneq ($(BUILD_FOO),)
7
8include $(CLEAR_VARS)
9LOCAL_MODULE := foo
10LOCAL_SRC_FILES := foo/foo.c
11LOCAL_C_INCLUDES := $(LOCAL_PATH)/foo
12LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/foo
13include $(BUILD_SHARED_LIBRARY)
14
15else # not build libfoo.so, trying to use PREBUILT_SHARED_LIBRARY instead.
16
17# Note: the module is named foo-prebuilt, but the library is libfool.so !
18#
19include $(CLEAR_VARS)
20LOCAL_MODULE := foo-prebuilt
David 'Digit' Turner2068cc32010-09-22 15:11:57 +020021LOCAL_SRC_FILES := libfoo.so
David 'Digit' Turnerf68d6af2010-07-09 09:56:31 -070022LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/foo
23include $(PREBUILT_SHARED_LIBRARY)
24
25include $(CLEAR_VARS)
26LOCAL_MODULE := foo-user
27LOCAL_SRC_FILES := foo-user.c
David 'Digit' Turner2068cc32010-09-22 15:11:57 +020028LOCAL_SHARED_LIBRARIES := foo-prebuilt
David 'Digit' Turnerf68d6af2010-07-09 09:56:31 -070029include $(BUILD_SHARED_LIBRARY)
30
31endif