xref: /freebsd/stand/liblua/Makefile (revision 506f36402925a87ed1d1483189ba07cd42f27a3d)
17cafeaa1SWarner Losh# $FreeBSD$
27cafeaa1SWarner Losh
37cafeaa1SWarner Losh.include <bsd.init.mk>
47cafeaa1SWarner Losh
57cafeaa1SWarner Losh.PATH:		${LUASRC}
67cafeaa1SWarner Losh.PATH:		${LIBLUASRC}
77cafeaa1SWarner Losh
8ff4cd9bfSWarner Losh.include	"${BOOTSRC}/lua.mk"
9ff4cd9bfSWarner Losh
107cafeaa1SWarner LoshLIB=		lua
117cafeaa1SWarner LoshINTERNALLIB=
127cafeaa1SWarner Losh
137cafeaa1SWarner Losh# Core Lua.
147cafeaa1SWarner LoshSRCS=	lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c \
157cafeaa1SWarner Losh	lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c \
167cafeaa1SWarner Losh        ltm.c lundump.c lvm.c lzio.c
177cafeaa1SWarner LoshSRCS+=	lauxlib.c lbaselib.c lstrlib.c loadlib.c
187cafeaa1SWarner Losh
197cafeaa1SWarner Losh# These aren't yet included, but link now, omitting them saves 15k
207cafeaa1SWarner Losh#SRCS+=	lcorolib.c ldblib.c lutf8lib.c
217cafeaa1SWarner Losh
227cafeaa1SWarner Losh# These aren't yet compatible with the boot environment, and some may never be
237cafeaa1SWarner Losh#SRCS+=	lbitlib.c liolib.c lmathlib.c loslib.c ltablib.c
247cafeaa1SWarner Losh
257cafeaa1SWarner Losh# Our utilities.
26*506f3640SKyle EvansSRCS+=	lerrno.c lstd.c lutils.c
27*506f3640SKyle Evans
28*506f3640SKyle Evans.PATH:	${FLUASRC}/modules
29*506f3640SKyle EvansSRCS+=	lfs.c
307cafeaa1SWarner Losh
317cafeaa1SWarner LoshWARNS=	3
327cafeaa1SWarner Losh
33ee74c236SKyle EvansCFLAGS+= -DLUA_PATH=\"${LUAPATH}\" -DLUA_PATH_DEFAULT=\"${LUAPATH}/\?.lua\"
34ff4cd9bfSWarner LoshCFLAGS+= -ffreestanding -nostdlib -DLUA_USE_POSIX
357cafeaa1SWarner LoshCFLAGS+= -fno-stack-protector -D__BSD_VISIBLE
367cafeaa1SWarner LoshCFLAGS+= -I${BOOTSRC}/include -I${LIBLUASRC} -I${LUASRC} -I${LDRSRC}
377cafeaa1SWarner Losh
387cafeaa1SWarner Losh.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 0
397cafeaa1SWarner LoshCFLAGS+=	-fPIC
407cafeaa1SWarner Losh.endif
418df8b2d3SSimon J. Gerraty.if ${MK_LOADER_VERIEXEC} == "yes"
428df8b2d3SSimon J. GerratyCFLAGS+= -I${SRCTOP}/lib/libsecureboot/h -DLOADER_VERIEXEC
438df8b2d3SSimon J. Gerraty.endif
447cafeaa1SWarner Losh
457cafeaa1SWarner Losh.include <bsd.lib.mk>
46