Makefile 简明教程

Unix Makefile Tutorial

Makefile 是一种程序构建工具,它在 Unix、Linux 及其各种版本上运行。它有助于简化构建可能需要各种模块的程序可执行文件。为了确定如何将模块编译或重新编译在一起, make 利用用户定义的 makefile。本教程将增强你对 makefile 结构和效用的了解。

Makefile is a program building tool which runs on Unix, Linux, and their flavors. It aids in simplifying building program executables that may need various modules. To determine how the modules need to be compiled or recompiled together, make takes the help of user-defined makefiles. This tutorial should enhance your knowledge about the structure and utility of makefile.

Audience

Makefile 在编译和链接程序模块时指导 make 实用程序。任何想使用 make 实用程序编译其程序并想了解 makefile 的人都应该阅读本教程。

Makefile guides the make utility while compiling and linking program modules. Anyone who wants to compile their programs using the make utility and wants to gain knowledge on makefile should read this tutorial.

Prerequisites

本教程要求很好地理解编程语言,如 C 和 C++。读者应了解链接、加载概念,以及如何在 Unix/Linux 环境中编译和执行程序。

This tutorial expects good understanding of programming language such as C and C++. The reader is expected to have knowledge of linking, loading concepts, and how to compile and execute programs in Unix/Linux environment.