summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2020-05-02 23:35:40 +0200
committerAki <please@ignore.pl>2020-05-02 23:35:40 +0200
commit901c9ba27afd50d709a084f8c35cc208ac5b85be (patch)
treea109a008b3757a9df9849e9262f0ba5fdc56dc98
parent3a31c46c969067a1684de7f4a6611961f1fd69dd (diff)
downloadplop-901c9ba27afd50d709a084f8c35cc208ac5b85be.zip
plop-901c9ba27afd50d709a084f8c35cc208ac5b85be.tar.gz
plop-901c9ba27afd50d709a084f8c35cc208ac5b85be.tar.bz2
Added Lua with libraries and nothing else
-rw-r--r--Makefile2
-rw-r--r--plop.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e7cdeeb..7607452 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
CFLAGS+=-Wall -Wextra -Wpedantic
+CFLAGS+=-I/usr/include/lua5.3
+LDLIBS+=-llua5.3
plop: plop.o http.o http.h
http.o: http.h
diff --git a/plop.c b/plop.c
index 669ac1a..41449ab 100644
--- a/plop.c
+++ b/plop.c
@@ -1,5 +1,8 @@
#include <errno.h>
#include <fcntl.h>
+#include <lauxlib.h>
+#include <lua.h>
+#include <lualib.h>
#include <netdb.h>
#include <poll.h>
#include <stdlib.h>
@@ -134,6 +137,9 @@ int handle_server(struct pollfd * fdv, int fdc, const int size)
/// \return Error code
int main(int argc, char ** argv)
{
+ lua_State * L = luaL_newstate();
+ luaL_openlibs(L);
+
if (2 != argc)
{
return 4;