xref: /freebsd/libexec/flua/Makefile (revision c2a2b4f3cf11e770892a524df637f671f5989719)
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
2728d832f9SKyle Evans# readline bits; these aren't needed if we're building a bootstrap flua, as we
2828d832f9SKyle Evans# don't expect that one to see any REPL usage.
2928d832f9SKyle Evans.if !defined(BOOTSTRAPPING)
30b4a19ee2SKyle EvansCFLAGS+=	-DLUA_USE_READLINE
31b4a19ee2SKyle EvansCFLAGS+=	-I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit
32b4a19ee2SKyle EvansLIBADD+=	edit
33*c2a2b4f3SKyle EvansLDFLAGS+=	-Wl,-E
34*c2a2b4f3SKyle Evans.else
35*c2a2b4f3SKyle Evans# We don't support dynamic libs on bootstrap builds.
36*c2a2b4f3SKyle EvansCFLAGS+=	-DBOOTSTRAPPING
3728d832f9SKyle Evans.endif
38b4a19ee2SKyle Evans
3994a82666SRyan MoellerUCLSRC?=	${SRCTOP}/contrib/libucl
4094a82666SRyan Moeller.PATH: ${UCLSRC}/lua
4194a82666SRyan MoellerSRCS+=	lua_ucl.c
4294a82666SRyan MoellerCFLAGS+=	-I${UCLSRC}/include -I${UCLSRC}/src -I${UCLSRC}/uthash
4394a82666SRyan MoellerLIBADD+=	ucl
4494a82666SRyan Moeller
45506f3640SKyle Evans.include <bsd.prog.mk>
46