1#	$NetBSD: Makefile,v 1.6 2019/01/21 00:30:14 alnsn Exp $
2#
3# Public Domain.
4#
5
6.include <bsd.init.mk>
7
8.PATH:	${.CURDIR}/../../../../external/bsd/sljit/sljit \
9	${.CURDIR}/../../../../external/bsd/sljit/dist/sljit_src
10
11LIB=	rumpkern_sljit
12COMMENT=Stackless JIT compiler
13
14SRCS=	sljitLir.c sljit_mod.c
15
16# NOTE This is not the best place for icache sync routine but only
17# sljit uses it at the moment.
18# XXX Think about a good hypercall interface (hi, pooka!) and move
19# this stuff to rumpuser.
20.if !empty(MACHINE_ARCH:Mmips*)
21SRCS+=			cache.c
22RUMPCOMP_USER_SRCS=	sljit_rump.c
23.PATH:			${.CURDIR}/arch/mips
24
25RUMPCOMP_INCS_DIR:=	${.PARSEDIR}
26RUMPCOMP_USER_CPPFLAGS=-I${RUMPCOMP_INCS_DIR}
27.endif
28
29.if !empty(MACHINE_ARCH:Marm*) || !empty(MACHINE_ARCH:Mearm*)
30SRCS+=			cpufunc.c
31RUMPCOMP_USER_SRCS=	sljit_rump.c
32.PATH:			${.CURDIR}/arch/arm
33
34RUMPCOMP_INCS_DIR:=	${.PARSEDIR}
35RUMPCOMP_USER_CPPFLAGS=-I${RUMPCOMP_INCS_DIR}
36
37# Link to libarm to get arm_sync_icache(2)
38LIBDPLIBS+=	arm ${NETBSDSRCDIR}/lib/libarch
39.endif
40
41.if !empty(MACHINE_ARCH:Maarch64*)
42SRCS+=			cpufunc.c
43RUMPCOMP_USER_SRCS=	sljit_rump.c
44.PATH:			${.CURDIR}/arch/aarch64
45
46RUMPCOMP_INCS_DIR:=	${.PARSEDIR}
47RUMPCOMP_USER_CPPFLAGS=-I${RUMPCOMP_INCS_DIR}
48.endif
49
50.include <bsd.lib.mk>
51.include <bsd.klinks.mk>
52