summaryrefslogtreecommitdiff
path: root/make.tmpl.in
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 /make.tmpl.in
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 'make.tmpl.in')
-rw-r--r--make.tmpl.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/make.tmpl.in b/make.tmpl.in
index 222ed671a..9f4ecc33f 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -63,6 +63,7 @@ STATIC_LIBS = $(PTHREAD_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+CPPFLAGS ?= @CPPFLAGS@
LDFLAGS ?= @LDFLAGS@
CLDFLAGS += @CLDFLAGS@
ELDFLAGS += @ELDFLAGS@
@@ -477,7 +478,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)"
@@ -487,7 +488,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
%.pot: %.c $(DEPS)
@echo " [CC] $(<F)"
@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)"