blob: 16aa2d424985fa524e4eb8a60122be8d7ad817b0 [file] [log] [blame]
Will Drewry8ac270d2012-04-12 16:48:04 -05001# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
Will Drewry561381a2012-04-18 19:50:25 -05004hostprogs-$(CONFIG_SECCOMP_FILTER) := bpf-fancy dropper bpf-direct
Will Drewry8ac270d2012-04-12 16:48:04 -05005
6HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
7HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include
8HOSTCFLAGS_bpf-helper.o += -I$(objtree)/usr/include
9HOSTCFLAGS_bpf-helper.o += -idirafter $(objtree)/include
Will Drewry561381a2012-04-18 19:50:25 -050010bpf-fancy-objs := bpf-fancy.o bpf-helper.o
Will Drewry8ac270d2012-04-12 16:48:04 -050011
12HOSTCFLAGS_dropper.o += -I$(objtree)/usr/include
13HOSTCFLAGS_dropper.o += -idirafter $(objtree)/include
14dropper-objs := dropper.o
15
Will Drewry8ac270d2012-04-12 16:48:04 -050016HOSTCFLAGS_bpf-direct.o += -I$(objtree)/usr/include
17HOSTCFLAGS_bpf-direct.o += -idirafter $(objtree)/include
Will Drewry561381a2012-04-18 19:50:25 -050018bpf-direct-objs := bpf-direct.o
Will Drewry8ac270d2012-04-12 16:48:04 -050019
20# Try to match the kernel target.
21ifeq ($(CONFIG_64BIT),)
22HOSTCFLAGS_bpf-direct.o += -m32
23HOSTCFLAGS_dropper.o += -m32
24HOSTCFLAGS_bpf-helper.o += -m32
25HOSTCFLAGS_bpf-fancy.o += -m32
26HOSTLOADLIBES_bpf-direct += -m32
27HOSTLOADLIBES_bpf-fancy += -m32
28HOSTLOADLIBES_dropper += -m32
29endif
30
31# Tell kbuild to always build the programs
32always := $(hostprogs-y)