... it compiles under MSVC++ and under MingW (if I run it 'manually' instead of via the 'nmake' Makefile)I don't see why LockWorkStation.o fails to be built by the Makefile .... it's a bit weird.
But that old version of nmake that you're using is known to be flakey. Try getting a newer version of nmake, or (better still, imo) install dmake from
CPAN.
If you do want to switch to dmake, you may need to make sure that nmake is hidden from view - by (eg) removing it from the path, or deleting it. (Otherwise, perl might still continue to generate the Makefile for nmake, instead of for dmake.)
Cheers,
Rob