summaryrefslogtreecommitdiff
path: root/libdm
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2023-02-12 13:12:23 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2023-02-13 13:41:59 +0100
commit4791a4fc68c681a45bcdc5660c6e96af607fab27 (patch)
treebd500679dc12c0dbe2e1e2230fee561141778df2 /libdm
parent50f73de4b27c11c810c8f7aea3e36a5c947408af (diff)
downloadlvm2-4791a4fc68c681a45bcdc5660c6e96af607fab27.tar.gz
makefiles: allow using configure cppflags
Configure defines 'CPPFLAGS' and we should use defined value for compilation. Reported-by: debian
Diffstat (limited to 'libdm')
-rw-r--r--libdm/make.tmpl.in5
1 files changed, 3 insertions, 2 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] $(<F)"
@mkdir -p $(@D)
- $(Q) $(CC) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
+ $(Q) $(CC) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $(CPPFLAGS) $< -o $@
%.o: %.cpp $(DEPS)
@echo " [CXX] $(<F)"
@@ -422,7 +423,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
%.pot: %.c $(DEPS)
@echo " [CC] $@"
@mkdir -p $(@D)
- $(Q) $(CC) -E $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) -include $(top_builddir)/po/pogen.h $(DEFS) $(WFLAGS) $(CFLAGS) $< >$@
+ $(Q) $(CC) -E $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) -include $(top_builddir)/po/pogen.h $(DEFS) $(WFLAGS) $(CFLAGS) $(CPPFLAGS) $< >$@
%.so: %.o
@echo " [CC] $(<F)"