2018-05-22 10:22:30 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
#
|
|
|
|
# Makefile for the Linux BPFILTER layer.
|
|
|
|
#
|
|
|
|
|
|
|
|
hostprogs-y := bpfilter_umh
|
|
|
|
bpfilter_umh-objs := main.o
|
2018-05-25 18:17:57 +08:00
|
|
|
HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
|
2018-06-05 10:53:41 +08:00
|
|
|
HOSTCC := $(CC)
|
|
|
|
|
2018-05-22 10:22:30 +08: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
|
|
|
|
HOSTLDFLAGS += -static
|
|
|
|
endif
|
|
|
|
|
2018-06-27 11:13:48 +08:00
|
|
|
$(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh
|
2018-05-22 10:22:30 +08:00
|
|
|
|
|
|
|
obj-$(CONFIG_BPFILTER_UMH) += bpfilter.o
|
2018-06-27 11:13:48 +08:00
|
|
|
bpfilter-objs += bpfilter_kern.o bpfilter_umh_blob.o
|