2018-05-22 02:22:30 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
#
|
|
|
|
# Makefile for the Linux BPFILTER layer.
|
|
|
|
#
|
|
|
|
|
2020-02-01 16:49:24 +00:00
|
|
|
hostprogs := bpfilter_umh
|
2018-05-22 02:22:30 +00:00
|
|
|
bpfilter_umh-objs := main.o
|
2019-05-13 06:22:16 +00:00
|
|
|
KBUILD_HOSTCFLAGS += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi
|
2018-06-05 02:53:41 +00:00
|
|
|
HOSTCC := $(CC)
|
|
|
|
|
2018-05-22 02:22:30 +00:00
|
|
|
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
|
2018-07-10 00:46:00 +00:00
|
|
|
KBUILD_HOSTLDFLAGS += -static
|
2018-05-22 02:22:30 +00:00
|
|
|
endif
|
|
|
|
|
2018-06-27 03:13:48 +00:00
|
|
|
$(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh
|
2018-05-22 02:22:30 +00:00
|
|
|
|
|
|
|
obj-$(CONFIG_BPFILTER_UMH) += bpfilter.o
|
2018-06-27 03:13:48 +00:00
|
|
|
bpfilter-objs += bpfilter_kern.o bpfilter_umh_blob.o
|