From b25686103924a2b3df8dff489e8a614ca4d04781 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 15 Nov 2007 17:41:37 +0000 Subject: [PATCH] Allow insertion of pre-processor flags per target --- src/makefile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/makefile.c b/src/makefile.c index c918c5d..a8f176d 100644 --- a/src/makefile.c +++ b/src/makefile.c @@ -734,8 +734,10 @@ static void _flags_c(Configure * configure, FILE * fp, String * target) { String const * p; - fprintf(fp, "%s%s", target, "_CFLAGS = $(CPPFLAGS) $(CFLAGSF)" - " $(CFLAGS)"); + fprintf(fp, "%s%s", target, "_CFLAGS = $(CPPFLAGS)"); + if((p = config_get(configure->config, target, "cppflags")) != NULL) + fprintf(fp, " %s", p); + fprintf(fp, "%s", " $(CFLAGSF) $(CFLAGS)"); if((p = config_get(configure->config, target, "cflags")) != NULL) { fprintf(fp, " %s", p);