When defining an inference rule, you can indicate to NMAKE where to look for target and dependent files. Use the following syntax:
{frompath}.fromext{topath}.toext
commands
:
NMAKE looks in the directory specified by frompath for files with the fromext extension. It executes the commands to build files with the toext extension in the directory specified by topath.