On Thu, Aug 16, 2012 at 08:36:31PM +0200, Kaspar Brand wrote: > I wonder if we should add support for module-specific CFLAGS etc., > which would always appear before the EXTRA_XXX stuff in the compile > and link commands, i.e. in rules.mk we would have: > > ALL_CFLAGS = $(MOD_CFLAGS) $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS) > ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(MOD_CPPFLAGS) $(EXTRA_CPPFLAGS) > $(NOTEST_CPPFLAGS) $(CPPFLAGS) > ALL_INCLUDES = $(INCLUDES) $(MOD_INCLUDES) $(EXTRA_INCLUDES) > > ALL_LDFLAGS = $(MOD_LDFLAGS) $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS) > > A particular module could then set its specific MOD_CFLAGS etc. in > modules.mk, and these would always have priority over those possibly > inserted by other modules.
Doing CFLAGS et al like that doesn't generalise brilliantly, because they are per-directory (modules/xxx) not strictly per-module, but it could be done anyway, and that wouldn't matter for mod_ssl. Yeah, probably a good idea. It should be possible to override LDFLAGS truly per-module by tweaking the SH_LINK line generated in modules.mk. Regards, Joe