xref: /freebsd/lib/liblua/Makefile (revision e17f5b1d307b7b8910d67883e57a9604305906d5)
1#! $FreeBSD$
2
3LUASRC?=	${SRCTOP}/contrib/lua/src
4.PATH: ${LUASRC}
5
6LIB=	lua
7INTERNALLIB=
8WARNS?=	2
9MAN=	# No manpage; this is internal.
10
11CWARNFLAGS.gcc+=	-Wno-format-nonliteral
12
13LIBADD=	m
14
15# Core functions
16SRCS=	lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c \
17	llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c \
18	ltable.c ltm.c lundump.c lvm.c lzio.c
19
20# Library functions; any change to these likely needs an accompanying change
21# in our custom linit_flua.c.  We use our custom linit.c to make it easier to
22# support bootstrap flua that may not have supporting local libraries.
23SRCS+=	lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c \
24	lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c
25
26CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/modules -I${LUASRC}
27CFLAGS+=	-DLUA_PROGNAME="\"${PROG}\""
28
29.if defined(BOOTSTRAPPING)
30CFLAGS+=	-DLUA_PATH_DEFAULT="\"/nonexistent/?.lua\""
31CFLAGS+=	-DLUA_CPATH_DEFAULT="\"/nonexistent/?.so\""
32.endif
33
34.include <bsd.lib.mk>
35