xref: /freebsd/libexec/flua/Makefile (revision bb2d016afb009920f4bb2400c15a86e557b2d55a)
1.include <src.lua.mk>
2
3LUASRC?=	${SRCTOP}/contrib/lua/src
4.PATH: ${LUASRC}
5
6PROG=	flua
7WARNS?=	3
8MAN=	# No manpage; this is internal.
9
10CWARNFLAGS.gcc+=	-Wno-format-nonliteral
11
12LIBADD=	lua
13
14# Entry point
15SRCS+=	lua.c
16
17# FreeBSD Extensions
18.PATH: ${.CURDIR}/modules
19SRCS+=	linit_flua.c
20SRCS+=	lfs.c lposix.c lfbsd.c
21
22CFLAGS+=	-I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC}
23CFLAGS+=	-DLUA_PROGNAME="\"${PROG}\""
24
25# readline bits; these aren't needed if we're building a bootstrap flua, as we
26# don't expect that one to see any REPL usage.
27.if !defined(BOOTSTRAPPING)
28CFLAGS+=	-DLUA_USE_READLINE
29CFLAGS+=	-I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit
30LIBADD+=	edit
31LDFLAGS+=	-Wl,-E
32.endif
33
34.include <bsd.prog.mk>
35