1LOCAL_PATH := $(call my-dir) 2 3ifndef 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!) 10endif 11 12ifeq (,$(call host-path-is-absolute,$(FOO_PATH))) 13$(info FOO_PATH should be defined to an absolute path!) 14endif 15 16include $(CLEAR_VARS) 17LOCAL_MODULE := libfoo 18LOCAL_SRC_FILES := $(FOO_PATH)/foo.c 19include $(BUILD_SHARED_LIBRARY) 20 21include $(CLEAR_VARS) 22LOCAL_MODULE := test_absolute_src_file_path 23LOCAL_SRC_FILES := $(FOO_PATH)/main.c 24LOCAL_SHARED_LIBRARIES := libfoo 25include $(BUILD_EXECUTABLE) 26