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