From 4791a4fc68c681a45bcdc5660c6e96af607fab27 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 12 Feb 2023 13:12:23 +0100 Subject: [PATCH] makefiles: allow using configure cppflags Configure defines 'CPPFLAGS' and we should use defined value for compilation. Reported-by: debian --- libdm/make.tmpl.in | 5 +++-- make.tmpl.in | 5 +++-- tools/Makefile.in | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in index 92dc715d2..fb8973b6b 100644 --- a/libdm/make.tmpl.in +++ b/libdm/make.tmpl.in @@ -59,6 +59,7 @@ DEFS += @DEFS@ # FIXME set this only where it's needed, not globally? CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ LDFLAGS ?= @LDFLAGS@ +CPPFLAGS ?= @CPPFLAGS@ CLDFLAGS += @CLDFLAGS@ ELDFLAGS += @ELDFLAGS@ LDDEPS += @LDDEPS@ @@ -412,7 +413,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64 %.o: %.c $(DEPS) @echo " [CC] $($@ + $(Q) $(CC) -E $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) -include $(top_builddir)/po/pogen.h $(DEFS) $(WFLAGS) $(CFLAGS) $(CPPFLAGS) $< >$@ %.so: %.o @echo " [CC] $($@ + $(Q) $(CC) -E $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) -include $(top_builddir)/po/pogen.h $(DEFS) $(WFLAGS) $(CFLAGS) $(CPPFLAGS) $< >$@ %.so: %.o @echo " [CC] $(