Makefile: pass CPPFLAGS to the compiler

Distro tools like dpkg-buildpackage use the preprocessor flags to pass
important flags, like hardening features. Pass CPPFLAGS to CC.

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
This commit is contained in:
Luca Boccassi
2019-03-28 19:33:17 +00:00
committed by Andrii Nakryiko
parent 93bc1d03f4
commit e31e1a5a3f

View File

@@ -63,7 +63,7 @@ $(OBJDIR)/libbpf.pc:
< libbpf.pc.template > $@
$(OBJDIR)/%.o: %.c
$(CC) $(ALL_CFLAGS) -c $< -o $@
$(CC) $(ALL_CFLAGS) $(CPPFLAGS) -c $< -o $@
define do_install
if [ ! -d '$(DESTDIR)$2' ]; then \