2019-11-18 23:21:13 +00:00
|
|
|
#! $FreeBSD$
|
|
|
|
|
|
|
|
.include <src.lua.mk>
|
|
|
|
|
|
|
|
LUASRC?= ${SRCTOP}/contrib/lua/src
|
|
|
|
.PATH: ${LUASRC}
|
|
|
|
|
|
|
|
PROG= flua
|
|
|
|
WARNS?= 2
|
|
|
|
MAN= # No manpage; this is internal.
|
|
|
|
|
2019-11-19 00:02:56 +00:00
|
|
|
CWARNFLAGS.gcc+= -Wno-format-nonliteral
|
|
|
|
|
2020-03-17 17:28:12 +00:00
|
|
|
LIBADD= lua
|
2019-11-18 23:21:13 +00:00
|
|
|
|
|
|
|
# Entry point
|
|
|
|
SRCS+= lua.c
|
|
|
|
|
|
|
|
# FreeBSD Extensions
|
|
|
|
.PATH: ${.CURDIR}/modules
|
|
|
|
SRCS+= linit_flua.c
|
|
|
|
SRCS+= lfs.c lposix.c
|
|
|
|
|
2020-03-17 17:28:12 +00:00
|
|
|
CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC}
|
2019-11-18 23:21:13 +00:00
|
|
|
CFLAGS+= -DLUA_PROGNAME="\"${PROG}\""
|
|
|
|
|
2020-03-30 20:01:44 +00:00
|
|
|
# readline bits; these aren't needed if we're building a bootstrap flua, as we
|
|
|
|
# don't expect that one to see any REPL usage.
|
|
|
|
.if !defined(BOOTSTRAPPING)
|
2020-03-30 18:43:05 +00:00
|
|
|
CFLAGS+= -DLUA_USE_READLINE
|
|
|
|
CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit
|
|
|
|
LIBADD+= edit
|
2020-08-14 02:22:19 +00:00
|
|
|
LDFLAGS+= -Wl,-E
|
2020-03-30 20:01:44 +00:00
|
|
|
.endif
|
2020-03-30 18:43:05 +00:00
|
|
|
|
2020-06-22 03:14:43 +00:00
|
|
|
UCLSRC?= ${SRCTOP}/contrib/libucl
|
|
|
|
.PATH: ${UCLSRC}/lua
|
|
|
|
SRCS+= lua_ucl.c
|
|
|
|
CFLAGS+= -I${UCLSRC}/include -I${UCLSRC}/src -I${UCLSRC}/uthash
|
|
|
|
LIBADD+= ucl
|
|
|
|
|
2019-11-18 23:21:13 +00:00
|
|
|
.include <bsd.prog.mk>
|