"Hrvoje Niksic" wrote:

3. Add the redundant #ifdefs to all compilation-dependent C files to
  make sure that they are ignored when the libraries they require are
  missing.  For example, openssl.c should be wrapped in #ifdef
HAVE_OPENSSL.

So should http-ntlm.c. But using GNU make it's pretty easy to avoid;
I use my homebrew makefile with things like:

USE_OPENSSL = 1
USE_GNUTLS = 1
...
ifeq ($(USE_OPENSSL),1)
 CFLAGS  += -DHAVE_OPENSSL -I$(OPENSSL_ROOT)/outinc
 SOURCE   = openssl.c http-ntlm.c
endif
....
SOURCE +=  cmpt.c connect.c ...

If you adopt this style, I urge you to reconsider the "#undef HAVE_OPENSSL" in 
config.h.
Instructing users (via windows/README) to change USE_OPENSSL in windows/Makefile is so much easier/cleaner.

5. Create windows/Makefile-$compiler for each $compiler we support,
  which contains the necessary CFLAGS, LDFLAGS, etc.  configure.bat
  --$compiler would copy both windows/Makefile and
  windows/Makefile-$compiler to src.

I think a single windows/makefile is enough. Instruct make to put objects for each target into separate sub-dirs. Along the lines of:

MSVC_OBJECTS = $(addprefix MSVC_obj/, $(SOURCE))
MINGW_OBJECTS = $(addprefix MingW_obj/, $(SOURCE))

MSVC_obj/%.obj: %.c
    cl -c $(MSVC_CFLAGS) -Fo$@ $<

MingW_obj/%.obj: %.c
    gcc -c $(MINGW_CFLAGS) -o $@ $<

-------

And issuing "make -f ../windowsMakefile msvc" would AFAICS remove the
need for a configure.bat file (add the rules for ./doc to the same 
windows/Makefile).

--gv

Reply via email to