android mk文件export的作用,Android.mk中LOCAL_EXPORT_C_INCLUDES的功用

  • Post author:
  • Post category:其他


Android.mk中LOCAL_EXPORT_C_INCLUDES的作用

NDK中的说明是这样说明的:

III. Exporting headers for prebuilt libraries:

———————————————-

The example above was called ‘naive’ because, in practice, the code in

foo-user.c is going to depend on specific declarations that are normally

found in a header file distributed with the prebuilt library (e.g. “foo.h”).

In other words, foo-user.c is going to have a line like:

#include

And you need to provide the header and its include path to the compiler

when building the foo-user module.

A simple way to deal with that is to use exports in the prebuilt module

definition. For example, assuming that a file “foo.h” is located under

the ‘include’ directory relative to the prebuilt module, we can write:

include $(CLEAR_VARS)

LOCAL_MODULE