Makemake is used to make makefile of tiny project - 用于小型项目的 Makefile 生成器
$ makemake init
It will generate an makemake.json
template. It will name target same as the directory name, set default compiler and flags, and include all source file (.c
, .cpp
) of the directory.
它将生成 makemake.json
的模板,它将目标命名为目录名,设置默认的编译器和编译选项,并包含当前目录下的所有源文件(.c
,.cpp
)。
$ makemake refresh
It will refresh the sources
of the first target in the makemake.json
. And other fileds will keep the same.
它将刷新 makemake.json
中第一个目标的源文件列表,并保持其它字段不变。
$ makemake
If there is a makemake.json
in the working directory, it will generate a Makefile
according to the makemake.json
. Otherwise, it will generate a default Makefile
, that will compile all source file (.c
, .cpp
) of the directory and target is an executable file with same name of the directory.
如果工作目录下存在 makemake.json
,将根据该文件生成一个 Makefile
。否则将生成一个默认的 Makefile
,这个默认的 Makefile
会使用 GCC 编译目录下的所有源文件(.c
,.cpp
),最终生成一个与目录同名的可执行文件。
{
"targets" : [
{
"name" : "<target name>",
"type" : "[executable | shared | archive | other]",
"cc" : "<C compiler>",
"cxx" : "<C++ compiler>",
"cflags" : "<C compiling flags>",
"cxxflags" : "<C++ compiling flags>",
"ar" : "<archive tool>",
"arflags" : "<archive flags>",
"libs" : "<link libs>",
"install" : "<install command>",
"uninstall" : "<uninstall command>",
"cmd" : "<command, only for type other>",
"sources" : [
// source files or directories
],
"depends" : [
// other targets
]
}
]
}