1 LOCAL_PATH := $(call my-dir) 2 3 ifndef FOO_PATH 4 # We may reach here running this test from run-tests.sh 5 # when it Android.mk is included in make -f $NDK/build/core/build-local.mk DUMP_* 6 # to determin ABIs. In this case FOO_PATH isn't set and doesn't matter. 7 # For normal build, empty FOO_PATH causes make to find /foo.c and /main.c 8 # and fail to build. 9 $(info FOO_PATH should be defined before including this file!) 10 endif 11 12 ifeq (,$(call host-path-is-absolute,$(FOO_PATH))) 13 $(info FOO_PATH should be defined to an absolute path!) 14 endif 15 16 include $(CLEAR_VARS) 17 LOCAL_MODULE := libfoo 18 LOCAL_SRC_FILES := $(FOO_PATH)/foo.c 19 include $(BUILD_SHARED_LIBRARY) 20 21 include $(CLEAR_VARS) 22 LOCAL_MODULE := test_absolute_src_file_path 23 LOCAL_SRC_FILES := $(FOO_PATH)/main.c 24 LOCAL_SHARED_LIBRARIES := libfoo 25 include $(BUILD_EXECUTABLE) 26