xref: /freebsd-14.2/stand/liblua/Makefile (revision 78f58500)
17cafeaa1SWarner Losh
27cafeaa1SWarner Losh.include <bsd.init.mk>
37cafeaa1SWarner Losh
47cafeaa1SWarner Losh.PATH:		${LUASRC}
57cafeaa1SWarner Losh.PATH:		${LIBLUASRC}
67cafeaa1SWarner Losh
7ff4cd9bfSWarner Losh.include	"${BOOTSRC}/lua.mk"
8ff4cd9bfSWarner Losh
97cafeaa1SWarner LoshLIB=		lua
107cafeaa1SWarner LoshINTERNALLIB=
117cafeaa1SWarner Losh
127cafeaa1SWarner Losh# Core Lua.
137cafeaa1SWarner LoshSRCS=	lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c \
147cafeaa1SWarner Losh	lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c \
157cafeaa1SWarner Losh        ltm.c lundump.c lvm.c lzio.c
167cafeaa1SWarner LoshSRCS+=	lauxlib.c lbaselib.c lstrlib.c loadlib.c
177cafeaa1SWarner Losh
187cafeaa1SWarner Losh# These aren't yet included, but link now, omitting them saves 15k
197cafeaa1SWarner Losh#SRCS+=	lcorolib.c ldblib.c lutf8lib.c
207cafeaa1SWarner Losh
217cafeaa1SWarner Losh# These aren't yet compatible with the boot environment, and some may never be
227cafeaa1SWarner Losh#SRCS+=	lbitlib.c liolib.c lmathlib.c loslib.c ltablib.c
237cafeaa1SWarner Losh
247cafeaa1SWarner Losh# Our utilities.
250a0d522bSKyle EvansSRCS+=	lerrno.c lpager.c lstd.c lutils.c
268929f845SWarner LoshSRCS+=	gfx_utils.c
27506f3640SKyle Evans
28506f3640SKyle Evans.PATH:	${FLUASRC}/modules
29506f3640SKyle EvansSRCS+=	lfs.c
30*78f58500SWarner Losh.PATH:	${FLUALIB}/libhash
31*78f58500SWarner LoshSRCS+=	lhash.c
327cafeaa1SWarner Losh
33ecebb3ccSKyle EvansWARNS?=	3
347cafeaa1SWarner Losh
35ee74c236SKyle EvansCFLAGS+= -DLUA_PATH=\"${LUAPATH}\" -DLUA_PATH_DEFAULT=\"${LUAPATH}/\?.lua\"
36ff4cd9bfSWarner LoshCFLAGS+= -ffreestanding -nostdlib -DLUA_USE_POSIX
377cafeaa1SWarner LoshCFLAGS+= -fno-stack-protector -D__BSD_VISIBLE
387cafeaa1SWarner LoshCFLAGS+= -I${BOOTSRC}/include -I${LIBLUASRC} -I${LUASRC} -I${LDRSRC}
397cafeaa1SWarner Losh
408929f845SWarner LoshCFLAGS.gfx_utils.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite
41*78f58500SWarner LoshCFLAGS.lhash.c+= -I${FLUALIB}/libhash -I${SRCTOP}/sys/crypto/sha2
423630506bSToomas Soome
437cafeaa1SWarner Losh.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 0
447cafeaa1SWarner LoshCFLAGS+=	-fPIC
457cafeaa1SWarner Losh.endif
46eda28febSEric van Gyzen
47eda28febSEric van Gyzen.include "${BOOTSRC}/veriexec.mk"
487cafeaa1SWarner Losh
497cafeaa1SWarner Losh.include <bsd.lib.mk>
50