Makefile 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. # kbuild trick to avoid linker error. Can be omitted if a module is built.
  2. obj- := dummy.o
  3. hostprogs-$(CONFIG_SECCOMP_FILTER) := bpf-fancy dropper bpf-direct
  4. HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
  5. HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include
  6. HOSTCFLAGS_bpf-helper.o += -I$(objtree)/usr/include
  7. HOSTCFLAGS_bpf-helper.o += -idirafter $(objtree)/include
  8. bpf-fancy-objs := bpf-fancy.o bpf-helper.o
  9. HOSTCFLAGS_dropper.o += -I$(objtree)/usr/include
  10. HOSTCFLAGS_dropper.o += -idirafter $(objtree)/include
  11. dropper-objs := dropper.o
  12. HOSTCFLAGS_bpf-direct.o += -I$(objtree)/usr/include
  13. HOSTCFLAGS_bpf-direct.o += -idirafter $(objtree)/include
  14. bpf-direct-objs := bpf-direct.o
  15. # Try to match the kernel target.
  16. ifeq ($(CONFIG_64BIT),)
  17. HOSTCFLAGS_bpf-direct.o += -m32
  18. HOSTCFLAGS_dropper.o += -m32
  19. HOSTCFLAGS_bpf-helper.o += -m32
  20. HOSTCFLAGS_bpf-fancy.o += -m32
  21. HOSTLOADLIBES_bpf-direct += -m32
  22. HOSTLOADLIBES_bpf-fancy += -m32
  23. HOSTLOADLIBES_dropper += -m32
  24. endif
  25. # Tell kbuild to always build the programs
  26. always := $(hostprogs-y)