Skip to content

Instantly share code, notes, and snippets.

@tacigar
Created February 13, 2018 16:24
Show Gist options
  • Save tacigar/922a3411aedbde6f8cf487d9c3ad2a37 to your computer and use it in GitHub Desktop.
Save tacigar/922a3411aedbde6f8cf487d9c3ad2a37 to your computer and use it in GitHub Desktop.
wget https://www.lua.org/ftp/lua-1.1.tar.gz
mkdir lua-1.1
tar zxvf lua-1.1.tar.gz -C lua-1.1 --strip-components 1
cd lua-1.1
sed -i -e "21 s/\$/ -lc/" src/Makefile
sed -i -e "14 s/^/\/\//" clients/lib/iolib.c
sed -i -e "21 s/stdin/NULL/" clients/lib/iolib.c
sed -i -e "21 s/stdout/NULL/" clients/lib/iolib.c
sed -i -e "472i in=stdin; out=stdout;" clients/lib/iolib.c
sed -i -e "20 s/\$/ -lm -lc -L\$(LIB) -llua/" clients/lib/Makefile
./domake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment