xref: /freebsd/stand/liblua/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1.include <bsd.init.mk>
2
3.PATH:		${LUASRC}
4.PATH:		${LIBLUASRC}
5
6.include	"${BOOTSRC}/lua.mk"
7
8LIB=		lua
9INTERNALLIB=
10
11# Core Lua.
12SRCS=	lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c \
13	lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c \
14        ltm.c lundump.c lvm.c lzio.c
15SRCS+=	lauxlib.c lbaselib.c lstrlib.c loadlib.c
16
17# These aren't yet included, but link now, omitting them saves 15k
18#SRCS+=	lcorolib.c ldblib.c lutf8lib.c
19
20# These aren't yet compatible with the boot environment, and some may never be
21#SRCS+=	lbitlib.c liolib.c lmathlib.c loslib.c ltablib.c
22
23# Our utilities.
24SRCS+=	lerrno.c lpager.c lstd.c lutils.c
25SRCS+=	gfx_utils.c
26
27.PATH:	${FLUASRC}/modules
28SRCS+=	lfs.c
29.PATH:	${FLUALIB}/libhash
30SRCS+=	lhash.c
31
32WARNS?=	3
33
34CFLAGS+= -DLUA_PATH=\"${LUAPATH}\" -DLUA_PATH_DEFAULT=\"${LUAPATH}/\?.lua\"
35CFLAGS+= -ffreestanding -nostdlib -DLUA_USE_POSIX
36CFLAGS+= -fno-stack-protector -D__BSD_VISIBLE
37CFLAGS+= -I${BOOTSRC}/include -I${LIBLUASRC} -I${LUASRC} -I${LDRSRC}
38
39CFLAGS.gfx_utils.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite
40CFLAGS.lhash.c+= -I${FLUALIB}/libhash -I${SRCTOP}/sys/crypto/sha2
41
42.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 0
43CFLAGS+=	-fPIC
44.endif
45
46.include "${BOOTSRC}/veriexec.mk"
47
48.include <bsd.lib.mk>
49