1999-11-14 13:54:44 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2006-03-17 18:54:44 +00:00
|
|
|
|
2018-03-01 19:50:55 +00:00
|
|
|
# For amd64 we have to build 32 and 64 bit versions of things. For
|
|
|
|
# others we don't. LIB32LIST is a list of libraries, which if
|
|
|
|
# included, need to be built 32-bit as well.
|
|
|
|
.if ${MACHINE_ARCH} == "amd64"
|
2018-07-08 07:42:49 +00:00
|
|
|
LIB32LIST=libsa ficl liblua
|
Add Lua as a scripting langauge to /boot/loader
liblua glues the lua run time into the boot loader. It implements all
the runtime routines that lua expects. In addition, it has a few
standard 'C' headers that nueter various aspects of the LUA build that
are too specific to lua to be in libsa. Many refinements from the
original code to improve implementation and the number of included lua
libraries. Use int64_t for lua_Number. Have "/boot/lua" be the default
module path. Numerous cleanups from the original GSoC project,
including hacking libsa to allow lua to be built with only one change
outside luaconf.h.
Add the final bit of lua glue to bring in liblua and plug into the
multiple interpreter framework, previously committed.
Add LOADER_LUA option, currently off by default.
Presently, this is an experimental option. One must opt-in to using
this by defining WITH_LOADER_LUA and WITHOUT_FORTH. It's been
lightly tested, so keep a backup copy of your old loader handy.
The menu code, coming in the next commit, hasn't been exhaustively
tested. A LUA boot loader is 60k larger than a FORTH one, which is
80k larger than a no-interpreter one. Subtle changes in size
may tip things past some subtle limit (the binary is ~430k now
when built with LUA). A future version may offer coexistance.
Bump FreeBSD version to 1200058 to mark the milestone.
Pedro Souza's 2014 Summer of Code project. Rui Paulo, Pedro Arthur,
Zakary Nafziger and Wojciech A. Koszek also contributed. Warner Losh
reworked it extensively into its current form.
Obtained from: https://wiki.freebsd.org/SummerOfCode2014/LuaLoader
Sponsored by: Google Summer of Code
Relnotes: Yes
MFC After: 1 month
Differential Review: https://reviews.freebsd.org/D14295
2018-02-12 15:31:53 +00:00
|
|
|
.endif
|
1998-11-03 06:11:35 +00:00
|
|
|
|
2018-03-01 19:50:55 +00:00
|
|
|
S.yes+= libsa
|
|
|
|
|
|
|
|
S.${MK_FORTH}+= ficl
|
|
|
|
S.${MK_FORTH}+= forth
|
|
|
|
S.${MK_LOADER_LUA}+= liblua
|
|
|
|
S.${MK_LOADER_LUA}+= lua
|
|
|
|
S.${MK_FDT}+= fdt
|
2020-01-02 04:34:22 +00:00
|
|
|
S.${MK_LOADER_OFW}+= libofw
|
2018-03-01 19:50:55 +00:00
|
|
|
S.yes+= defaults
|
|
|
|
S.yes+= man
|
|
|
|
|
2015-03-29 15:43:24 +00:00
|
|
|
.include <bsd.arch.inc.mk>
|
|
|
|
|
2018-03-01 19:50:55 +00:00
|
|
|
S.${MK_EFI}+= efi
|
|
|
|
S.${MK_LOADER_UBOOT}+= uboot
|
2018-02-27 17:35:29 +00:00
|
|
|
|
2017-11-06 15:22:11 +00:00
|
|
|
.if exists(${.CURDIR}/${MACHINE}/.)
|
2018-03-01 19:50:55 +00:00
|
|
|
S.yes+= ${MACHINE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Build the actual subdir list from S.yes, adding in the 32-bit
|
|
|
|
# variant if necessary.
|
|
|
|
.for _x in ${S.yes}
|
|
|
|
SUBDIR+=${_x}
|
|
|
|
.if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
|
|
|
|
SUBDIR+=${_x}32
|
2008-07-23 07:23:33 +00:00
|
|
|
.endif
|
2018-03-01 19:50:55 +00:00
|
|
|
.endfor
|
1998-08-21 03:17:42 +00:00
|
|
|
|
|
|
|
.include <bsd.subdir.mk>
|