Makefile 597 Bytes
Newer Older
1 2 3 4 5 6 7
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the Linux BPFILTER layer.
#

hostprogs-y := bpfilter_umh
bpfilter_umh-objs := main.o
8
KBUILD_HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
9 10
HOSTCC := $(CC)

11 12 13 14
ifeq ($(CONFIG_BPFILTER_UMH), y)
# builtin bpfilter_umh should be compiled with -static
# since rootfs isn't mounted at the time of __init
# function is called and do_execv won't find elf interpreter
15
KBUILD_HOSTLDFLAGS += -static
16 17
endif

18
$(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh
19 20

obj-$(CONFIG_BPFILTER_UMH) += bpfilter.o
21
bpfilter-objs += bpfilter_kern.o bpfilter_umh_blob.o