summaryrefslogtreecommitdiff
path: root/Ports/lua/patches/0001-Add-a-serenity-target-to-the-makefile.patch
blob: bac8d92ed3093583ef1fc7a587ae6c636ec2dee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 0000000000000000000000000000000000000000 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 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/Makefile b/src/Makefile
index 1907381..04beda5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -30,7 +30,7 @@ CMCFLAGS=
 
 # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
 
-PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
+PLATS= guess aix bsd c89 freebsd generic linux linux-readline 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 lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
@@ -140,6 +140,13 @@ posix:
 SunOS 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"
+
 # Targets that do not create files (not all makes understand .PHONY).
 .PHONY: all $(PLATS) help test clean default o a depend echo