xref: /freebsd/lib/liblua/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1564b9ff2SBrooks DavisLUASRC?=	${SRCTOP}/contrib/lua/src
2564b9ff2SBrooks Davis.PATH: ${LUASRC}
3564b9ff2SBrooks Davis
4564b9ff2SBrooks DavisLIB=	lua
5564b9ff2SBrooks DavisINTERNALLIB=
6564b9ff2SBrooks DavisWARNS?=	2
7564b9ff2SBrooks DavisMAN=	# No manpage; this is internal.
8564b9ff2SBrooks Davis
9564b9ff2SBrooks DavisCWARNFLAGS.gcc+=	-Wno-format-nonliteral
10564b9ff2SBrooks Davis
11564b9ff2SBrooks DavisLIBADD=	m
12564b9ff2SBrooks Davis
13564b9ff2SBrooks Davis# Core functions
14564b9ff2SBrooks DavisSRCS=	lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c \
15564b9ff2SBrooks Davis	llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c \
16564b9ff2SBrooks Davis	ltable.c ltm.c lundump.c lvm.c lzio.c
17564b9ff2SBrooks Davis
18564b9ff2SBrooks Davis# Library functions; any change to these likely needs an accompanying change
19564b9ff2SBrooks Davis# in our custom linit_flua.c.  We use our custom linit.c to make it easier to
20564b9ff2SBrooks Davis# support bootstrap flua that may not have supporting local libraries.
21*0495ed39SKyle EvansSRCS+=	lauxlib.c lbaselib.c lcorolib.c ldblib.c liolib.c \
22564b9ff2SBrooks Davis	lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c
23564b9ff2SBrooks Davis
24564b9ff2SBrooks DavisCFLAGS+=	-I${.CURDIR} -I${.CURDIR}/modules -I${LUASRC}
25564b9ff2SBrooks DavisCFLAGS+=	-DLUA_PROGNAME="\"${PROG}\""
26564b9ff2SBrooks Davis
27be99f886SEd Maste.if defined(BOOTSTRAPPING)
28be99f886SEd MasteCFLAGS+=	-DLUA_PATH_DEFAULT="\"/nonexistent/?.lua\""
29be99f886SEd MasteCFLAGS+=	-DLUA_CPATH_DEFAULT="\"/nonexistent/?.so\""
30967fbfd9SKyle Evans# We don't support dynamic libs on bootstrap builds.
31967fbfd9SKyle EvansCFLAGS+=	-DBOOTSTRAPPING
32be99f886SEd Maste.endif
33be99f886SEd Maste
34564b9ff2SBrooks Davis.include <bsd.lib.mk>
35