I've just begun to study Porting Android. And I come across a new type of file which is .mk file. It's is an extension of Makefile but I don't know what it is different from a Makefile ? So, can somebody help you clarify them. Thanks very much !
Makefile used by software compilers and linkers for building program executable from source files; may be a full Makefile or may contain additional rules referenced by a Makefile. Open .MK files with File Viewer for Android.
Script written as a Makefile, a developer file type that is used for compiling and linking programs from source code files; stores instructions using the GNU make standard. NOTE: Makefiles more commonly are created with the filename Makefile, which does not have a file extension.
Make is Unix utility that is designed to start execution of a makefile. A makefile is a special file, containing shell commands, that you create and name makefile (or Makefile depending upon the system).
= defines a recursively-expanded variable. := defines a simply-expanded variable.
A make
file can have any name. The -f
option of make
is used to specify which file to use:
make -f foobar
You can even use -f
several times:
make -f foo -f bar
In which case make
processes the files in order (or, equivalently, concatenates the files and processes the result).
makefile
and Makefile
are special names because if make
is called without the -f
option it automatically searches for them, in this order, and use the first it finds. Note that GNU make
also considers GNUmakefile
, and prefers it over makefile
and Makefile
. Other make
implementations can have other default names.
The .mk
extension is a more or less standard extension for make files that have other names than the defaults. It is a reasonable extension if you want humans to quickly understand what these files are: convert.mk
is more informative than foobar
. Some editors use this extension to identify the file type and apply syntax coloring. They usually apply the same syntax coloring to makefile
and Makefile
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With