Compile from a Makefile

Use a makefile to organize the sequence of actions (such as compiling and linking) required to build your project. You can then invoke all the actions in one step. The make utility can save you time by performing actions on only the files that have changed, and on the files that incorporate or depend on the changed files.

You can also use the /qmakedep compiler option to create a dependencies file that can be used with the make utility.

For example, the following is a simple makefile that can be used with NMAKE to direct compilation of a simple project consisting of three source files (main.c, source1.c and source2.c) and one header file (global.h):

all: main.obj source1.obj source2.obj
icc main.obj source1.obj source2.obj
main: main.c global.h
icc -c main.c
source1: source1.c global.h
icc -c source1.c
source2: source2.c global.h
icc -c source2.c


Run the Make Utility
Start the Compiler


Summary of Compiler Options