xref: /freebsd/libexec/flua/Makefile (revision 28d832f993304707c58ce052ba4dd374de52e0b8)
1506f3640SKyle Evans#! $FreeBSD$
2506f3640SKyle Evans
3506f3640SKyle Evans.include <src.lua.mk>
4506f3640SKyle Evans
5506f3640SKyle EvansLUASRC?=	${SRCTOP}/contrib/lua/src
6506f3640SKyle Evans.PATH: ${LUASRC}
7506f3640SKyle Evans
8506f3640SKyle EvansPROG=	flua
9506f3640SKyle EvansWARNS?=	2
10506f3640SKyle EvansMAN=	# No manpage; this is internal.
11506f3640SKyle Evans
12061f7e2fSKyle EvansCWARNFLAGS.gcc+=	-Wno-format-nonliteral
13061f7e2fSKyle Evans
14564b9ff2SBrooks DavisLIBADD=	lua
15506f3640SKyle Evans
16506f3640SKyle Evans# Entry point
17506f3640SKyle EvansSRCS+=	lua.c
18506f3640SKyle Evans
19506f3640SKyle Evans# FreeBSD Extensions
20506f3640SKyle Evans.PATH: ${.CURDIR}/modules
21506f3640SKyle EvansSRCS+=	linit_flua.c
22506f3640SKyle EvansSRCS+=	lfs.c lposix.c
23506f3640SKyle Evans
24564b9ff2SBrooks DavisCFLAGS+=	-I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC}
25506f3640SKyle EvansCFLAGS+=	-DLUA_PROGNAME="\"${PROG}\""
26506f3640SKyle Evans
27*28d832f9SKyle Evans# readline bits; these aren't needed if we're building a bootstrap flua, as we
28*28d832f9SKyle Evans# don't expect that one to see any REPL usage.
29*28d832f9SKyle Evans.if !defined(BOOTSTRAPPING)
30b4a19ee2SKyle EvansCFLAGS+=	-DLUA_USE_READLINE
31b4a19ee2SKyle EvansCFLAGS+=	-I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit
32b4a19ee2SKyle EvansLIBADD+=	edit
33*28d832f9SKyle Evans.endif
34b4a19ee2SKyle Evans
35506f3640SKyle Evans.include <bsd.prog.mk>
36