2020-03-17 17:28:12 +00:00
|
|
|
#! $FreeBSD$
|
|
|
|
|
|
|
|
LUASRC?= ${SRCTOP}/contrib/lua/src
|
|
|
|
.PATH: ${LUASRC}
|
|
|
|
|
|
|
|
LIB= lua
|
|
|
|
INTERNALLIB=
|
|
|
|
WARNS?= 2
|
|
|
|
MAN= # No manpage; this is internal.
|
|
|
|
|
|
|
|
CWARNFLAGS.gcc+= -Wno-format-nonliteral
|
|
|
|
|
|
|
|
LIBADD= m
|
|
|
|
|
|
|
|
# Core functions
|
|
|
|
SRCS= lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c \
|
|
|
|
llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c \
|
|
|
|
ltable.c ltm.c lundump.c lvm.c lzio.c
|
|
|
|
|
|
|
|
# Library functions; any change to these likely needs an accompanying change
|
|
|
|
# in our custom linit_flua.c. We use our custom linit.c to make it easier to
|
|
|
|
# support bootstrap flua that may not have supporting local libraries.
|
2021-01-14 05:56:18 +00:00
|
|
|
SRCS+= lauxlib.c lbaselib.c lcorolib.c ldblib.c liolib.c \
|
2020-03-17 17:28:12 +00:00
|
|
|
lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c
|
|
|
|
|
|
|
|
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/modules -I${LUASRC}
|
|
|
|
CFLAGS+= -DLUA_PROGNAME="\"${PROG}\""
|
|
|
|
|
2020-04-29 13:41:32 +00:00
|
|
|
.if defined(BOOTSTRAPPING)
|
|
|
|
CFLAGS+= -DLUA_PATH_DEFAULT="\"/nonexistent/?.lua\""
|
|
|
|
CFLAGS+= -DLUA_CPATH_DEFAULT="\"/nonexistent/?.so\""
|
2020-08-14 02:40:17 +00:00
|
|
|
# We don't support dynamic libs on bootstrap builds.
|
|
|
|
CFLAGS+= -DBOOTSTRAPPING
|
2020-04-29 13:41:32 +00:00
|
|
|
.endif
|
|
|
|
|
2020-03-17 17:28:12 +00:00
|
|
|
.include <bsd.lib.mk>
|