mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
lbutils: portable options in Makefile
add options for building with urandom+openat and arc4+openat. useful for emulating a bsd / old linux environment in modern linux distros, for portability testing. these options are not recommended for everyday use. just use make without any special options, and the code has build-time OS detection for features like randomisation/openat2. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -14,6 +14,12 @@ DESTDIR =
|
||||
PREFIX = /usr/local
|
||||
INSTALL = install
|
||||
|
||||
# used for portability testing on linux:
|
||||
#
|
||||
PORT_OPENAT = -DUSE_OPENAT=1
|
||||
PORT_ARC4 = -DUSE_ARC4=1
|
||||
PORT_URANDOM = -DUSE_URANDOM=1
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
LDIR =
|
||||
@@ -149,3 +155,12 @@ distclean: clean
|
||||
|
||||
strict:
|
||||
$(MAKE) CFLAGS="$(CFLAGS) $(HELLFLAGS)" CC_MODE="$(HELLCC)"
|
||||
|
||||
# BSD-like portability test (openat + arc4random)
|
||||
portable-bsd:
|
||||
$(MAKE) CFLAGS="$(CFLAGS) $(PORT_OPENAT) $(PORT_ARC4)" CC_MODE="$(CC)"
|
||||
|
||||
# fallback portability test (openat + urandom -- old linux mostly)
|
||||
portable-urandom:
|
||||
$(MAKE) CFLAGS="$(CFLAGS) $(PORT_OPENAT) $(PORT_URANDOM)" \
|
||||
CC_MODE="$(CC)"
|
||||
|
||||
Reference in New Issue
Block a user