Go to the first, previous, next, last section, table of contents.

A Simple Makefile

Here is a simple m3makefile:

The first line is a comment. Text after % is ignored in m3makefiles.

The import command tells the compiler that the program uses routines in the library libm3. This import command is present in most m3makefiles. If you use routines from other libraries, you must include other import commands that tell the compiler which libraries to include.

There must be one implementation command for each .m3 file in your program. In this case, there was only one such file: Main.m3.

Finally, the program command tells the compiler what to name the resulting executable file. The compiler will name this program's executable myprog.


Go to the first, previous, next, last section, table of contents.