I redesigned the entire XWP sources structure with V0.9.0 and made some more changes with V0.9.12. The sources were supposed to be structured so that the following was possible:
bin\ directory.
XFLDR.DLL and
the .EXE files) and just restart the WPS for the changes to take effect.
#include statements were changed in the sources.
So nmake dep support had to be introduced.
setup.in in the main directory, which is included from all
makefiles via the nmake !include directive.
bin\
directory, which is created if it doesn't exist.
To rebuild the entire thing, one can simply delete the entire bin\ tree.
MAINMAKERUNNING=YES defined. This way the sub-makefile knows that
it's started from the main makefile. Otherwise the sub-makefile calls the main makefile
(which in turn calls the sub-makefile) so that the entire thing always gets rebuilt.
nmake dep is supported through a new makefile in src\
which calls all makefiles in the subdirectories of src\ with either
the "all" or the "dep" target. A "dep" target was then added to all the makefiles
in src\ which invokes fastdep on all C files to produce
the .depend file... which is in turn included in the makefiles.
This invokes fastdep.exe from the XWP Helpers directory, which I stole from
the Odin sources. fastdep was written by Knut Stange Osmundsen and
creates a .depend file in each source directory
with all the includes which are retrieved directly from the C sources.