Nachos Makefiles
Makefiles play an essential role in compiling the Nachos project. There are Makefiles in the Nachos root directory, as well as an individual Makefile within each assignment subdirectory. The Makefiles in the Nachos root directory and their purpose are
Makefile
gmake depend and a gmake nachos.
Makefile.common
Makefile.dep
include ../Makefile.common include ../Makefile.dep #----------------------------------------------------------------- # DO NOT DELETE THIS LINE -- make depend uses it # DEPENDENCIES MUST END AT END OF FILEshould not be modified. These are used when a
gmake
depend is run. However, those preceding can be modified at your own
risk.
When running gmake, there are four cases that will occur. Those
are
gmake from the main nachos directory, the system
will change to each assignment directory and attempt to run gmake
depend and then gmake within the directory.
gmake clean from the main nachos directory will cause all
.o, nachos, core, DISK, and other files created by compiling nachos.
gmake when run from one of the assignment directories will
compile and build the nachos executable for that assignment.
gmake depend run from one of the assignment directories will
rebuild the file dependencies (determine which .h files are required
by each .cc file) for that assignment. This is usefule when the
#include files have been added to or removed from source files.