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