2018-05-21 19:22:30 -07:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
#
|
|
|
|
|
# Makefile for the Linux BPFILTER layer.
|
|
|
|
|
#
|
|
|
|
|
|
2020-04-29 12:45:15 +09:00
|
|
|
userprogs := bpfilter_umh
|
2018-05-21 19:22:30 -07:00
|
|
|
bpfilter_umh-objs := main.o
|
2020-04-29 12:45:15 +09:00
|
|
|
userccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi
|
2018-06-04 19:53:41 -07:00
|
|
|
|
2020-07-01 18:26:44 +09:00
|
|
|
ifeq ($(CONFIG_BPFILTER_UMH), y)
|
2020-04-29 12:45:15 +09:00
|
|
|
# builtin bpfilter_umh should be linked with -static
|
2018-05-21 19:22:30 -07:00
|
|
|
# since rootfs isn't mounted at the time of __init
|
|
|
|
|
# function is called and do_execv won't find elf interpreter
|
2020-04-29 12:45:15 +09:00
|
|
|
userldflags += -static
|
2020-07-01 18:26:44 +09:00
|
|
|
endif
|
2018-05-21 19:22:30 -07:00
|
|
|
|
2018-06-26 20:13:48 -07:00
|
|
|
$(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh
|
2018-05-21 19:22:30 -07:00
|
|
|
|
|
|
|
|
obj-$(CONFIG_BPFILTER_UMH) += bpfilter.o
|
2018-06-26 20:13:48 -07:00
|
|
|
bpfilter-objs += bpfilter_kern.o bpfilter_umh_blob.o
|