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