Makefile 597 B

12345678910111213141516171819202122
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Makefile for the Linux BPFILTER layer.
  4. #
  5. hostprogs-y := bpfilter_umh
  6. bpfilter_umh-objs := main.o
  7. KBUILD_HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
  8. HOSTCC := $(CC)
  9. ifeq ($(CONFIG_BPFILTER_UMH), y)
  10. # builtin bpfilter_umh should be compiled with -static
  11. # since rootfs isn't mounted at the time of __init
  12. # function is called and do_execv won't find elf interpreter
  13. KBUILD_HOSTLDFLAGS += -static
  14. endif
  15. $(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh
  16. obj-$(CONFIG_BPFILTER_UMH) += bpfilter.o
  17. bpfilter-objs += bpfilter_kern.o bpfilter_umh_blob.o