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