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 lstd.c lutils.c 27 28.PATH: ${FLUASRC}/modules 29SRCS+= lfs.c 30 31WARNS= 3 32 33CFLAGS+= -DLUA_PATH=\"${LUAPATH}\" -DLUA_PATH_DEFAULT=\"${LUAPATH}/\?.lua\" 34CFLAGS+= -ffreestanding -nostdlib -DLUA_USE_POSIX 35CFLAGS+= -fno-stack-protector -D__BSD_VISIBLE 36CFLAGS+= -I${BOOTSRC}/include -I${LIBLUASRC} -I${LUASRC} -I${LDRSRC} 37 38.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 0 39CFLAGS+= -fPIC 40.endif 41.if ${MK_LOADER_VERIEXEC} == "yes" 42CFLAGS+= -I${SRCTOP}/lib/libsecureboot/h -DLOADER_VERIEXEC 43.endif 44 45.include <bsd.lib.mk> 46