xref: /freebsd/lib/liblua/Makefile (revision c7a063741720ef81d4caa4613242579d12f1d605)
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 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# We don't support dynamic libs on bootstrap builds.
33CFLAGS+=	-DBOOTSTRAPPING
34.endif
35
36.include <bsd.lib.mk>
37