ladybird/Ports/lua/patches/0001-Add-a-serenity-target-to-the-makefile.patch
2022-05-19 20:17:10 +04:30

53 lines
1.7 KiB
Diff

From ffc3fc84ac65d2d1af7faff95e633710aad988ec Mon Sep 17 00:00:00 2001
From: Daniel Lemos <xspager@gmail.com>
Date: Tue, 15 Mar 2022 13:30:11 -0300
Subject: [PATCH] Add a serenity target to the makefile
Co-Authored-By: Gunnar Beutner <gbeutner@serenityos.org>
Co-Authored-By: Javier Alvarez <javier.alvarez@allthingsembedded.net>
Co-Authored-By: Larkin <45925460+larb0b@users.noreply.github.com>
Co-Authored-By: Linus Groh <mail@linusgroh.de>
Co-Authored-By: Noah Rosamilia <ivoahivoah@gmail.com>
---
src/Makefile | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index a13afb9..c54c7bd 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -26,7 +26,7 @@ MYOBJS=
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
+PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris serenity
LUA_A= liblua.a
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
@@ -100,7 +100,6 @@ c89:
@echo '*** C89 does not guarantee 64-bit integers for Lua.'
@echo ''
-
freebsd:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc"
@@ -124,6 +123,13 @@ posix:
solaris:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl"
+serenity:
+ $(MAKE) $(ALL) \
+ CC="$(CC) -std=gnu99" \
+ AR="$(AR) rcu" \
+ SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE" \
+ SYSLIBS="-ldl -lreadline"
+
# list targets that do not create files (but not all makes understand .PHONY)
.PHONY: all $(PLATS) default o a clean depend echo none
--
2.36.1