nmake is a Unix program that builds other programs. It began over a decade ago as an improved make, and it has evolved steadily over the years. Today's version is powerful and sophisticated, and gives you lots of help building software and keeping everything up to date. nmake is popular, but getting started can be difficult; all too often it ends up as a big black box that's documented by a mysterious manual. But nmake is the best build engine you can find - spend some time learning how it works and you will be amply rewarded.
This paper is aimed at beginners, but everyone has to bring some baggage. We'll assume you can program the shell, that you can read and write simple C programs, and that you know something about building software. The bottom line is you need to be a programmer; if you're not you won't get much out of this paper. We'll try to teach you things about nmake, and your job, at least at the start, is to believe you can learn something important from our trivial examples. In fact, we won't build a program until late in the paper, and by that time you will have learned a great deal.
It's important that you trust our examples, so we automated whenever possible. Makefiles included in this paper are, for the most part, separate files. Most results were automatically generated by running nmake on the example makefile, capturing the output in a file, and then including that file in the paper. We managed everything with nmake - you'll find some of the details in Appendix A.
We're almost ready, but first a warning: what you read here shouldn't be viewed as gospel, and our examples, even simple ones, won't always be completely correct. We've taken liberties when we felt the full truth would complicate matters. If you notice omissions, particularly early in the paper, you're probably not in our target audience. On the other hand, if everything seems fine remember you only have part of the story, so don't toss your manual.