Confusingly HEADERS is not headers that are shared between our various
binaries. Rather it's just the (non generated) headers for passt, plus
seccomp.h. This isn't particularly useful, just open code it in the
handful of places we need it.
Signed-off-by: David Gibson
---
Makefile | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 18343491..03113803 100644
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,6 @@ PASST_HEADERS = arch.h arp.h bitmap.h checksum.h conf.h dhcp.h dhcpv6.h \
siphash.h tap.h tcp.h tcp_buf.h tcp_conn.h tcp_internal.h tcp_splice.h \
tcp_vu.h udp.h udp_flow.h udp_internal.h udp_vu.h util.h vhost_user.h \
virtio.h vu_common.h
-HEADERS = $(PASST_HEADERS) seccomp.h
C := \#include \nint main(){int a=getrandom(0, 0, 0);}
ifeq ($(shell printf "$(C)" | $(CC) -S -xc - -o - >/dev/null 2>&1; echo $$?),0)
@@ -102,10 +101,10 @@ seccomp_repair.h: seccomp.sh $(PASST_REPAIR_SRCS)
$(BASEBIN): %:
$(CC) $(BASE_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(filter %.c,$^) -o $@
-passt: $(PASST_SRCS) $(HEADERS)
+passt: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h
passt.avx2: CFLAGS += -Ofast -mavx2 -ftree-vectorize -funroll-loops
-passt.avx2: $(PASST_SRCS) $(HEADERS)
+passt.avx2: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h
pasta.avx2 pasta.1 pasta: pasta%: passt%
ln -sf $< $@
@@ -198,5 +197,5 @@ CPPCHECK_FLAGS = --std=c11 --error-exitcode=1 --enable=all --force \
--suppress=unusedStructMember \
-D CPPCHECK_6936
-cppcheck: $(PASST_SRCS) $(HEADERS)
+cppcheck: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h
$(CPPCHECK) $(CPPCHECK_FLAGS) $(BASE_CPPFLAGS) $^
--
2.53.0