"Hrvoje Niksic" wrote:
Wouldn't you need to have separate targets for linking as well?
Sure. That target would simply depend on $(MSVC_OBJECTS) etc.:
wget-msvc.exe: $(MSVC_OBJECTS)
link $(MSVC_LDFLAGS) -out:$@ $^ $(MSVC_EXT_LIBS)
Possibly with an extra "mv -f $@ $(INSTALL_DIR)/wget.exe".
And
how would you handle the distinction between compilation flags,
optimization flags, link flags, and so on?
Not sure what you mean; I image windows/Makefile having sections
with
MSVC_CFLAGS = -nologo -MT -W2 -I../windows ...
...
MINGW_CFLAGS = -Wall -O2 -I../windows ...
same for $COMPILER_LDFLAGS.
I'm not sure how windows/Makefile should be invoked. Maybe the 'all'
target should tell user to invoke with targets 'msvc', 'mingw', 'watcom'
etc. E.g.
make -f ../windows/makefile mingw USE_OPENSSL=1
--gv