summaryrefslogtreecommitdiff
path: root/sys/modules
diff options
context:
space:
mode:
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/bpf/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/modules/bpf/Makefile b/sys/modules/bpf/Makefile
index 742b6ae408e..a0e6df39eb2 100644
--- a/sys/modules/bpf/Makefile
+++ b/sys/modules/bpf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2010/01/25 22:21:28 pooka Exp $
+# $NetBSD: Makefile,v 1.2 2012/08/01 23:24:29 rmind Exp $
#
.include "../Makefile.inc"
@@ -10,4 +10,16 @@ KMOD= bpf
# inseparable from bpfilter?)
SRCS= bpf.c bpf_filter.c
+.PATH: ${S}/arch/${MACHINE}/${MACHINE}
+.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
+.PATH: ${S}/arch/${MACHINE_CPU}/${MACHINE_CPU}
+
+.if (exists(${S}/arch/${MACHINE}/${MACHINE}/bpf_jit_machdep.c)) || \
+ (exists(${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c) || \
+ (exists(${S}/arch/${MACHINE_CPU}/${MACHINE_CPU}/bpf_jit_machdep.c))
+SRCS+= bpf_jit.c
+SRCS+= bpf_jit_machdep.c
+CPPFLAGS+= -DBPF_JIT
+.endif
+
.include <bsd.kmodule.mk>