I have a makefile (using nmake & VC++ 2005):
CPP_OBJS = $(CPP_SOURCE:.cpp=.obj)
$(TARGET) : $(CPP_OBJS)
$(link) $(ldebug) $(lflags) /DLL \
$(LIBPATHS) \
$out:$@ $(CPP_OBJS) $(conlibs)
The problem is link step fails because $(CPP_OBJS) are expanded into the list of files where each filename is prepended with a folder name (that way it was generated from CPP_SOURCE) . And since all of the .obj files are in the current folder (results of the compilation) - the link.exe fails to locate .objs.
I need something like: (I found it here: http://uw714doc.sco.com/cgi-bin/info2html?%28make.info%29File%2520Name%2520Functions&lang=en)
`$(notdir NAMES...)' Extracts all but the directory-part of each file name in NAMES. If the file name contains no slash, it is left unchanged. Otherwise, everything through the last slash is removed from it.
but that thing does not seem to be working for NMAKE which comes with VC++ 2005.
Any ideas how to overcome this issue are greatly appreciated. Thank you.