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