samples/bpf: Don't try to remove user's homedir on clean
[sfrench/cifs-2.6.git] / samples / bpf / Makefile
index 1fc42ad8ff49bd3859a6f5d04481d6211a724a30..f86d713a17a5bcf3230744eebb8d163bb00e3b72 100644 (file)
@@ -38,6 +38,8 @@ tprogs-y += tc_l2_redirect
 tprogs-y += lwt_len_hist
 tprogs-y += xdp_tx_iptunnel
 tprogs-y += test_map_in_map
+tprogs-y += per_socket_stats_example
+tprogs-y += xdp_redirect
 tprogs-y += xdp_redirect_map
 tprogs-y += xdp_redirect_cpu
 tprogs-y += xdp_monitor
@@ -196,7 +198,7 @@ endif
 
 TPROGCFLAGS_bpf_load.o += -Wno-unused-variable
 
-TPROGS_LDLIBS                  += $(LIBBPF) -lelf
+TPROGS_LDLIBS                  += $(LIBBPF) -lelf -lz
 TPROGLDLIBS_tracex4            += -lrt
 TPROGLDLIBS_trace_output       += -lrt
 TPROGLDLIBS_map_perf_test      += -lrt
@@ -234,6 +236,7 @@ BTF_LLVM_PROBE := $(shell echo "int main() { return 0; }" | \
                          readelf -S ./llvm_btf_verify.o | grep BTF; \
                          /bin/rm -f ./llvm_btf_verify.o)
 
+BPF_EXTRA_CFLAGS += -fno-stack-protector
 ifneq ($(BTF_LLVM_PROBE),)
        BPF_EXTRA_CFLAGS += -g
 else
@@ -251,7 +254,7 @@ all:
 
 clean:
        $(MAKE) -C ../../ M=$(CURDIR) clean
-       @rm -f *~
+       @find $(CURDIR) -type f -name '*~' -delete
 
 $(LIBBPF): FORCE
 # Fix up variables inherited from Kbuild that tools/ build system won't like