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