• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# SPDX-License-Identifier: GPL-2.0
2ifndef CROSS_COMPILE
3hostprogs-y := bpf-fancy dropper bpf-direct user-trap
4
5HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
6HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include
7HOSTCFLAGS_bpf-helper.o += -I$(objtree)/usr/include
8HOSTCFLAGS_bpf-helper.o += -idirafter $(objtree)/include
9bpf-fancy-objs := bpf-fancy.o bpf-helper.o
10
11HOSTCFLAGS_dropper.o += -I$(objtree)/usr/include
12HOSTCFLAGS_dropper.o += -idirafter $(objtree)/include
13dropper-objs := dropper.o
14
15HOSTCFLAGS_bpf-direct.o += -I$(objtree)/usr/include
16HOSTCFLAGS_bpf-direct.o += -idirafter $(objtree)/include
17bpf-direct-objs := bpf-direct.o
18
19HOSTCFLAGS_user-trap.o += -I$(objtree)/usr/include
20HOSTCFLAGS_user-trap.o += -idirafter $(objtree)/include
21user-trap-objs := user-trap.o
22
23# Try to match the kernel target.
24ifndef CONFIG_64BIT
25
26# s390 has -m31 flag to build 31 bit binaries
27ifndef CONFIG_S390
28MFLAG = -m32
29else
30MFLAG = -m31
31endif
32
33HOSTCFLAGS_bpf-direct.o += $(MFLAG)
34HOSTCFLAGS_dropper.o += $(MFLAG)
35HOSTCFLAGS_bpf-helper.o += $(MFLAG)
36HOSTCFLAGS_bpf-fancy.o += $(MFLAG)
37HOSTCFLAGS_user-trap.o += $(MFLAG)
38HOSTLDLIBS_bpf-direct += $(MFLAG)
39HOSTLDLIBS_bpf-fancy += $(MFLAG)
40HOSTLDLIBS_dropper += $(MFLAG)
41HOSTLDLIBS_user-trap += $(MFLAG)
42endif
43always := $(hostprogs-y)
44endif
45