Using nmake, is it possible to have the makefile build all the .cpp files in the current directory automatically, without having to specify them individually?
So, instea
You can run a shell command during nmakefile preprocessing, and then !include
the output. Naturally the output needs to be in nmake format. Something like:
!if [bash -c "echo O = *.cpp" >sources.mak]
!error Failed to generate source list
!endif
!include sources.mak
all: $(O:.cpp=.obj)
.cpp.obj:
---COMPILE $< HERE---
I suspect that most people would not use bash to create sources.mak
, but you get the idea.