1
2LUASRC?=	${SRCTOP}/contrib/lua/src
3.PATH: ${LUASRC}
4
5LIB=	lua
6INTERNALLIB=
7WARNS?=	2
8MAN=	# No manpage; this is internal.
9
10CWARNFLAGS.gcc+=	-Wno-format-nonliteral
11
12LIBADD=	m
13
14# Core functions
15SRCS=	lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c \
16	llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c \
17	ltable.c ltm.c lundump.c lvm.c lzio.c
18
19# Library functions; any change to these likely needs an accompanying change
20# in our custom linit_flua.c.  We use our custom linit.c to make it easier to
21# support bootstrap flua that may not have supporting local libraries.
22SRCS+=	lauxlib.c lbaselib.c lcorolib.c ldblib.c liolib.c \
23	lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c
24
25CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/modules -I${LUASRC}
26CFLAGS+=	-DLUA_PROGNAME="\"${PROG}\""
27
28.if defined(BOOTSTRAPPING)
29CFLAGS+=	-DLUA_PATH_DEFAULT="\"/nonexistent/?.lua\""
30CFLAGS+=	-DLUA_CPATH_DEFAULT="\"/nonexistent/?.so\""
31# We don't support dynamic libs on bootstrap builds.
32CFLAGS+=	-DBOOTSTRAPPING
33.endif
34
35.include <bsd.lib.mk>
36