The meaning of android.mk

Source: Internet
Author: User

local_path:=$ (call My-dir)

Local_path is the directory in which the source files are defined.

My-dir is a defined macro method, the $ (call My-dir) is called the macro method called My-dir, the return value of this method is

directory where the Android.mk file resides

Include $ (clear_vars)

The clear_bars variable is a variable inside the build system

This variable points to all the local_xxx-like variables,

After executing this sentence, this compilation system puts all the similar

Local_module,_src_filelocals,local_static_libraries,... Such variables are cleared out.

But it won't erase the local_path.

Local_module is the name of the library you want to generate, and the name is the only one. There can be no spaces.

After compiling, the system will automatically precede the Lib header, for example, our Hello is compiled into a libhello.so

Another feature is that if you get your name Libhello, the NDK will not add Lib to your module name before it is compiled.

But the last time you call it, you call the Hello Library.

Local_src_files =: hello.c

This is specifying which files you want to compile

You do not need to specify a header file to reference which dependencies, because the compiler will automatically find these dependencies automatically compiled

Include $ (build_shared_library) build_static_library

. So

The type of library generated after compilation, if it is a static library. A configuration include $ (build_static_library)

Other parameters

Local_cpp_extension: = CC//Specify extension of C + + file

Local_module: = Ndkfoo

Local_src_files: = ndkfoo.cc

Local_ldlibs + =-llog-lvmsagent-lmpnet-lmpxml-lh264android

Specifies what other libraries need to be loaded.

The meaning of android.mk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.