From 7afb34fc61160cf413a1539644e8e15aedb092ac Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 18 Mar 2017 14:37:16 +1000 Subject: [PATCH] Updated build system and now bundle libb64 --- .gitignore | 5 +- Makefile.freebsd | 22 ++- Makefile.freebsd.WWW | 33 ++++- Makefile.linux | 25 +++- Makefile.linux.WWW | 35 ++++- Makefile.minix | 18 --- Makefile.osx | 25 +++- Makefile.osx.WWW | 33 ++++- {Xmodem => deps/Xmodem}/LICENSE | 0 {Xmodem => deps/Xmodem}/Makefile | 0 {Xmodem => deps/Xmodem}/checkcrc.c | 0 {Xmodem => deps/Xmodem}/crc.c | 0 {Xmodem => deps/Xmodem}/crctab.c | 0 {Xmodem => deps/Xmodem}/crctab.h | 0 {Xmodem => deps/Xmodem}/main.c | 0 {Xmodem => deps/Xmodem}/network.c | 0 {Xmodem => deps/Xmodem}/receive.c | 0 {Xmodem => deps/Xmodem}/send.c | 0 {Xmodem => deps/Xmodem}/seriallog.c | 0 {Xmodem => deps/Xmodem}/seriallog.h | 0 {Xmodem => deps/Xmodem}/utils.c | 0 {Xmodem => deps/Xmodem}/xmodem.h | 0 {Xmodem => deps/Xmodem}/xmodemr.c | 0 {Xmodem => deps/Xmodem}/xmodemt.c | 0 {Xmodem => deps/Xmodem}/zmodem.c | 0 {Xmodem => deps/Xmodem}/zmodem.h | 0 {Xmodem => deps/Xmodem}/zmodemdump.c | 0 {Xmodem => deps/Xmodem}/zmodemr.c | 0 {Xmodem => deps/Xmodem}/zmodemsys.c | 0 {Xmodem => deps/Xmodem}/zmodemt.c | 0 {Xmodem => deps/Xmodem}/zmutil.c | 0 {jamlib => deps/jamlib}/LICENSE | 0 {jamlib => deps/jamlib}/Makefile.linux | 0 {jamlib => deps/jamlib}/Makefile.minix | 0 {jamlib => deps/jamlib}/Makefile.os2 | 0 {jamlib => deps/jamlib}/Makefile.win32 | 0 {jamlib => deps/jamlib}/crc32.c | 0 {jamlib => deps/jamlib}/jam.h | 0 {jamlib => deps/jamlib}/jamlib.doc | 0 {jamlib => deps/jamlib}/lastread.c | 0 {jamlib => deps/jamlib}/mbase.c | 0 {jamlib => deps/jamlib}/message.c | 0 {jamlib => deps/jamlib}/structrw.c | 0 {jamlib => deps/jamlib}/structrw.h | 0 {jamlib => deps/jamlib}/subpack.c | 0 deps/libb64-1.2/AUTHORS | 7 + deps/libb64-1.2/BENCHMARKS | 85 +++++++++++ deps/libb64-1.2/CHANGELOG | 25 ++++ deps/libb64-1.2/INSTALL | 44 ++++++ deps/libb64-1.2/LICENSE | 29 ++++ deps/libb64-1.2/Makefile | 25 ++++ deps/libb64-1.2/README | 138 ++++++++++++++++++ deps/libb64-1.2/TODO | 0 deps/libb64-1.2/base64/Makefile | 56 +++++++ .../base64/VisualStudioProject/Makefile | 11 ++ .../base64/VisualStudioProject/base64.sln | 20 +++ .../base64/VisualStudioProject/base64.vcxproj | 92 ++++++++++++ .../base64.vcxproj.filters | 36 +++++ deps/libb64-1.2/base64/base64 | Bin 0 -> 33044 bytes deps/libb64-1.2/base64/base64.cc | 94 ++++++++++++ deps/libb64-1.2/base64/depend | 0 deps/libb64-1.2/include/b64/cdecode.h | 28 ++++ deps/libb64-1.2/include/b64/cencode.h | 31 ++++ deps/libb64-1.2/include/b64/decode.h | 70 +++++++++ deps/libb64-1.2/include/b64/encode.h | 77 ++++++++++ deps/libb64-1.2/src/Makefile | 43 ++++++ deps/libb64-1.2/src/cdecode.c | 88 +++++++++++ deps/libb64-1.2/src/cencode.c | 109 ++++++++++++++ deps/libb64-1.2/src/depend | 0 {lua => deps/lua}/Makefile | 0 {lua => deps/lua}/lapi.c | 0 {lua => deps/lua}/lapi.h | 0 {lua => deps/lua}/lauxlib.c | 0 {lua => deps/lua}/lauxlib.h | 0 {lua => deps/lua}/lbaselib.c | 0 {lua => deps/lua}/lbitlib.c | 0 {lua => deps/lua}/lcode.c | 0 {lua => deps/lua}/lcode.h | 0 {lua => deps/lua}/lcorolib.c | 0 {lua => deps/lua}/lctype.c | 0 {lua => deps/lua}/lctype.h | 0 {lua => deps/lua}/ldblib.c | 0 {lua => deps/lua}/ldebug.c | 0 {lua => deps/lua}/ldebug.h | 0 {lua => deps/lua}/ldo.c | 0 {lua => deps/lua}/ldo.h | 0 {lua => deps/lua}/ldump.c | 0 {lua => deps/lua}/lfunc.c | 0 {lua => deps/lua}/lfunc.h | 0 {lua => deps/lua}/lgc.c | 0 {lua => deps/lua}/lgc.h | 0 {lua => deps/lua}/linit.c | 0 {lua => deps/lua}/liolib.c | 0 {lua => deps/lua}/llex.c | 0 {lua => deps/lua}/llex.h | 0 {lua => deps/lua}/llimits.h | 0 {lua => deps/lua}/lmathlib.c | 0 {lua => deps/lua}/lmem.c | 0 {lua => deps/lua}/lmem.h | 0 {lua => deps/lua}/loadlib.c | 0 {lua => deps/lua}/lobject.c | 0 {lua => deps/lua}/lobject.h | 0 {lua => deps/lua}/lopcodes.c | 0 {lua => deps/lua}/lopcodes.h | 0 {lua => deps/lua}/loslib.c | 0 {lua => deps/lua}/lparser.c | 0 {lua => deps/lua}/lparser.h | 0 {lua => deps/lua}/lprefix.h | 0 {lua => deps/lua}/lstate.c | 0 {lua => deps/lua}/lstate.h | 0 {lua => deps/lua}/lstring.c | 0 {lua => deps/lua}/lstring.h | 0 {lua => deps/lua}/lstrlib.c | 0 {lua => deps/lua}/ltable.c | 0 {lua => deps/lua}/ltable.h | 0 {lua => deps/lua}/ltablib.c | 0 {lua => deps/lua}/ltm.c | 0 {lua => deps/lua}/ltm.h | 0 {lua => deps/lua}/lua.c | 0 {lua => deps/lua}/lua.h | 0 {lua => deps/lua}/lua.hpp | 0 {lua => deps/lua}/luac.c | 0 {lua => deps/lua}/luaconf.h | 0 {lua => deps/lua}/lualib.h | 0 {lua => deps/lua}/lundump.c | 0 {lua => deps/lua}/lundump.h | 0 {lua => deps/lua}/lutf8lib.c | 0 {lua => deps/lua}/lvm.c | 0 {lua => deps/lua}/lvm.h | 0 {lua => deps/lua}/lzio.c | 0 {lua => deps/lua}/lzio.h | 0 131 files changed, 1249 insertions(+), 55 deletions(-) delete mode 100644 Makefile.minix rename {Xmodem => deps/Xmodem}/LICENSE (100%) rename {Xmodem => deps/Xmodem}/Makefile (100%) rename {Xmodem => deps/Xmodem}/checkcrc.c (100%) rename {Xmodem => deps/Xmodem}/crc.c (100%) rename {Xmodem => deps/Xmodem}/crctab.c (100%) rename {Xmodem => deps/Xmodem}/crctab.h (100%) rename {Xmodem => deps/Xmodem}/main.c (100%) rename {Xmodem => deps/Xmodem}/network.c (100%) rename {Xmodem => deps/Xmodem}/receive.c (100%) rename {Xmodem => deps/Xmodem}/send.c (100%) rename {Xmodem => deps/Xmodem}/seriallog.c (100%) rename {Xmodem => deps/Xmodem}/seriallog.h (100%) rename {Xmodem => deps/Xmodem}/utils.c (100%) rename {Xmodem => deps/Xmodem}/xmodem.h (100%) rename {Xmodem => deps/Xmodem}/xmodemr.c (100%) rename {Xmodem => deps/Xmodem}/xmodemt.c (100%) rename {Xmodem => deps/Xmodem}/zmodem.c (100%) rename {Xmodem => deps/Xmodem}/zmodem.h (100%) rename {Xmodem => deps/Xmodem}/zmodemdump.c (100%) rename {Xmodem => deps/Xmodem}/zmodemr.c (100%) rename {Xmodem => deps/Xmodem}/zmodemsys.c (100%) rename {Xmodem => deps/Xmodem}/zmodemt.c (100%) rename {Xmodem => deps/Xmodem}/zmutil.c (100%) rename {jamlib => deps/jamlib}/LICENSE (100%) rename {jamlib => deps/jamlib}/Makefile.linux (100%) rename {jamlib => deps/jamlib}/Makefile.minix (100%) rename {jamlib => deps/jamlib}/Makefile.os2 (100%) rename {jamlib => deps/jamlib}/Makefile.win32 (100%) rename {jamlib => deps/jamlib}/crc32.c (100%) rename {jamlib => deps/jamlib}/jam.h (100%) rename {jamlib => deps/jamlib}/jamlib.doc (100%) rename {jamlib => deps/jamlib}/lastread.c (100%) rename {jamlib => deps/jamlib}/mbase.c (100%) rename {jamlib => deps/jamlib}/message.c (100%) rename {jamlib => deps/jamlib}/structrw.c (100%) rename {jamlib => deps/jamlib}/structrw.h (100%) rename {jamlib => deps/jamlib}/subpack.c (100%) create mode 100755 deps/libb64-1.2/AUTHORS create mode 100755 deps/libb64-1.2/BENCHMARKS create mode 100755 deps/libb64-1.2/CHANGELOG create mode 100755 deps/libb64-1.2/INSTALL create mode 100755 deps/libb64-1.2/LICENSE create mode 100755 deps/libb64-1.2/Makefile create mode 100755 deps/libb64-1.2/README create mode 100755 deps/libb64-1.2/TODO create mode 100755 deps/libb64-1.2/base64/Makefile create mode 100755 deps/libb64-1.2/base64/VisualStudioProject/Makefile create mode 100755 deps/libb64-1.2/base64/VisualStudioProject/base64.sln create mode 100755 deps/libb64-1.2/base64/VisualStudioProject/base64.vcxproj create mode 100755 deps/libb64-1.2/base64/VisualStudioProject/base64.vcxproj.filters create mode 100755 deps/libb64-1.2/base64/base64 create mode 100755 deps/libb64-1.2/base64/base64.cc create mode 100644 deps/libb64-1.2/base64/depend create mode 100755 deps/libb64-1.2/include/b64/cdecode.h create mode 100755 deps/libb64-1.2/include/b64/cencode.h create mode 100755 deps/libb64-1.2/include/b64/decode.h create mode 100755 deps/libb64-1.2/include/b64/encode.h create mode 100755 deps/libb64-1.2/src/Makefile create mode 100755 deps/libb64-1.2/src/cdecode.c create mode 100755 deps/libb64-1.2/src/cencode.c create mode 100644 deps/libb64-1.2/src/depend rename {lua => deps/lua}/Makefile (100%) rename {lua => deps/lua}/lapi.c (100%) rename {lua => deps/lua}/lapi.h (100%) rename {lua => deps/lua}/lauxlib.c (100%) rename {lua => deps/lua}/lauxlib.h (100%) rename {lua => deps/lua}/lbaselib.c (100%) rename {lua => deps/lua}/lbitlib.c (100%) rename {lua => deps/lua}/lcode.c (100%) rename {lua => deps/lua}/lcode.h (100%) rename {lua => deps/lua}/lcorolib.c (100%) rename {lua => deps/lua}/lctype.c (100%) rename {lua => deps/lua}/lctype.h (100%) rename {lua => deps/lua}/ldblib.c (100%) rename {lua => deps/lua}/ldebug.c (100%) rename {lua => deps/lua}/ldebug.h (100%) rename {lua => deps/lua}/ldo.c (100%) rename {lua => deps/lua}/ldo.h (100%) rename {lua => deps/lua}/ldump.c (100%) rename {lua => deps/lua}/lfunc.c (100%) rename {lua => deps/lua}/lfunc.h (100%) rename {lua => deps/lua}/lgc.c (100%) rename {lua => deps/lua}/lgc.h (100%) rename {lua => deps/lua}/linit.c (100%) rename {lua => deps/lua}/liolib.c (100%) rename {lua => deps/lua}/llex.c (100%) rename {lua => deps/lua}/llex.h (100%) rename {lua => deps/lua}/llimits.h (100%) rename {lua => deps/lua}/lmathlib.c (100%) rename {lua => deps/lua}/lmem.c (100%) rename {lua => deps/lua}/lmem.h (100%) rename {lua => deps/lua}/loadlib.c (100%) rename {lua => deps/lua}/lobject.c (100%) rename {lua => deps/lua}/lobject.h (100%) rename {lua => deps/lua}/lopcodes.c (100%) rename {lua => deps/lua}/lopcodes.h (100%) rename {lua => deps/lua}/loslib.c (100%) rename {lua => deps/lua}/lparser.c (100%) rename {lua => deps/lua}/lparser.h (100%) rename {lua => deps/lua}/lprefix.h (100%) rename {lua => deps/lua}/lstate.c (100%) rename {lua => deps/lua}/lstate.h (100%) rename {lua => deps/lua}/lstring.c (100%) rename {lua => deps/lua}/lstring.h (100%) rename {lua => deps/lua}/lstrlib.c (100%) rename {lua => deps/lua}/ltable.c (100%) rename {lua => deps/lua}/ltable.h (100%) rename {lua => deps/lua}/ltablib.c (100%) rename {lua => deps/lua}/ltm.c (100%) rename {lua => deps/lua}/ltm.h (100%) rename {lua => deps/lua}/lua.c (100%) rename {lua => deps/lua}/lua.h (100%) rename {lua => deps/lua}/lua.hpp (100%) rename {lua => deps/lua}/luac.c (100%) rename {lua => deps/lua}/luaconf.h (100%) rename {lua => deps/lua}/lualib.h (100%) rename {lua => deps/lua}/lundump.c (100%) rename {lua => deps/lua}/lundump.h (100%) rename {lua => deps/lua}/lutf8lib.c (100%) rename {lua => deps/lua}/lvm.c (100%) rename {lua => deps/lua}/lvm.h (100%) rename {lua => deps/lua}/lzio.c (100%) rename {lua => deps/lua}/lzio.h (100%) diff --git a/.gitignore b/.gitignore index d824dc6..fb54ad3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,8 +12,8 @@ illusion/* scripts/* logs/* *.a -lua/lua -lua/luac +deps/lua/lua +deps/lua/luac netmail.out echomail.out utils/magiedit/odoors/libs-* @@ -23,3 +23,4 @@ utils/magiedit/magiedit msgserial whitelist.ip blacklist.ip +.DS_Store diff --git a/Makefile.freebsd b/Makefile.freebsd index 9d09fcb..fa6394d 100644 --- a/Makefile.freebsd +++ b/Makefile.freebsd @@ -1,9 +1,20 @@ CC=cc -CFLAGS=-I/usr/local/include +CFLAGS=-I/usr/local/include -I./deps/ DEPS = bbs.h -JAMLIB = jamlib/jamlib.a -ZMODEM = Xmodem/libzmodem.a -LUA = lua/liblua.a +JAMLIB = deps/jamlib/jamlib.a +ZMODEM = deps/Xmodem/libzmodem.a +LUA = deps/lua/liblua.a + +all: magicka + +${LUA}: + cd deps/lua && $(MAKE) -f Makefile freebsd MAKEFLAGS= + +${JAMLIB}: + cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd deps/Xmodem && $(MAKE) MAKEFLAGS= OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o bluewave.o hashmap/hashmap.o %.o: %.c $(DEPS) @@ -16,3 +27,6 @@ magicka: $(OBJ) clean: rm -f $(OBJ) magicka + cd deps/lua && $(MAKE) clean + cd deps/jamlib && $(MAKE) -f Makefile.linux clean + cd deps/Xmodem && $(MAKE) clean diff --git a/Makefile.freebsd.WWW b/Makefile.freebsd.WWW index 3a4c40d..b396ef4 100644 --- a/Makefile.freebsd.WWW +++ b/Makefile.freebsd.WWW @@ -1,19 +1,38 @@ CC=cc -CFLAGS=-I/usr/local/include -DENABLE_WWW=1 +CFLAGS=-I/usr/local/include -I./deps/ -DENABLE_WWW=1 DEPS = bbs.h -JAMLIB = jamlib/jamlib.a -ZMODEM = Xmodem/libzmodem.a -LUA = lua/liblua.a -MICROHTTPD=-lmicrohttpd -lb64 +JAMLIB = deps/jamlib/jamlib.a +ZMODEM = deps/Xmodem/libzmodem.a +LUA = deps/lua/liblua.a +B64 = deps/libb64-1.2/src/libb64.a +MICROHTTPD=-lmicrohttpd + +all: magicka + +${LUA}: + cd deps/lua && $(MAKE) -f Makefile freebsd MAKEFLAGS= + +${JAMLIB}: + cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd deps/Xmodem && $(MAKE) MAKEFLAGS= + +${B64}: + cd deps/libb64-1.2 && $(MAKE) MAKEFLAGS= OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o bluewave.o www.o www_email.o www_msgs.o www_last10.o hashmap/hashmap.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) -magicka: $(OBJ) - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -lssl -lcrypto -lssh $(MICROHTTPD) +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} + $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) $(B64) -lutil -lm -lssl -lcrypto -lssh $(MICROHTTPD) .PHONY: clean clean: rm -f $(OBJ) magicka + cd deps/lua && $(MAKE) clean + cd deps/jamlib && $(MAKE) -f Makefile.linux clean + cd deps/Xmodem && $(MAKE) clean + cd deps/libb64-1.2 && $(MAKE) clean diff --git a/Makefile.linux b/Makefile.linux index 0095fb0..3158efc 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,18 +1,33 @@ CC=cc -CFLAGS=-I/usr/local/include +CFLAGS=-I/usr/local/include -I./deps/ DEPS = bbs.h -JAMLIB = jamlib/jamlib.a -ZMODEM = Xmodem/libzmodem.a -LUA = lua/liblua.a +JAMLIB = deps/jamlib/jamlib.a +ZMODEM = deps/Xmodem/libzmodem.a +LUA = deps/lua/liblua.a + + +all: magicka + +${LUA}: + cd deps/lua && $(MAKE) -f Makefile linux MAKEFLAGS= + +${JAMLIB}: + cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd deps/Xmodem && $(MAKE) MAKEFLAGS= OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o bluewave.o hashmap/hashmap.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) -magicka: $(OBJ) +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -ldl -lssl -lcrypto -lssh .PHONY: clean clean: rm -f $(OBJ) magicka + cd deps/lua && $(MAKE) clean + cd deps/jamlib && $(MAKE) -f Makefile.linux clean + cd deps/Xmodem && $(MAKE) clean diff --git a/Makefile.linux.WWW b/Makefile.linux.WWW index b3e9964..825afaf 100644 --- a/Makefile.linux.WWW +++ b/Makefile.linux.WWW @@ -1,19 +1,40 @@ CC=cc -CFLAGS=-I/usr/local/include -DENABLE_WWW=1 +CFLAGS=-I/usr/local/include -I./deps/ -DENABLE_WWW=1 DEPS = bbs.h -JAMLIB = jamlib/jamlib.a -ZMODEM = Xmodem/libzmodem.a -LUA = lua/liblua.a -MICROHTTPD=-lmicrohttpd -lb64 +JAMLIB = deps/jamlib/jamlib.a +ZMODEM = deps/Xmodem/libzmodem.a +LUA = deps/lua/liblua.a +LUA = deps/libb64-1.2/src/libb64.a +MICROHTTPD=-lmicrohttpd + +all: magicka + +${LUA}: + cd deps/lua && $(MAKE) -f Makefile linux MAKEFLAGS= + +${JAMLIB}: + cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd deps/Xmodem && $(MAKE) MAKEFLAGS= + +${B64}: + cd deps/libb64-1.2 && $(MAKE) MAKEFLAGS= + OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o www.o www_email.o www_msgs.o www_last10.o bluewave.o hashmap/hashmap.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) -magicka: $(OBJ) - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -ldl -lssl -lcrypto -lssh $(MICROHTTPD) +magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${B64} + $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) $(B64) -lutil -lm -ldl -lssl -lcrypto -lssh $(MICROHTTPD) .PHONY: clean clean: rm -f $(OBJ) magicka + cd deps/lua && $(MAKE) clean + cd deps/jamlib && $(MAKE) -f Makefile.linux clean + cd deps/Xmodem && $(MAKE) clean + cd deps/libb64-1.2 && $(MAKE) clean + diff --git a/Makefile.minix b/Makefile.minix deleted file mode 100644 index 3121151..0000000 --- a/Makefile.minix +++ /dev/null @@ -1,18 +0,0 @@ -CC=clang -CFLAGS=-I/usr/pkg/include -DEPS = bbs.h -JAMLIB = jamlib/jamlib.a -ZMODEM = Xmodem/libzmodem.a -LUA = lua/liblua.a - -OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/pkg/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -lssl -lcrypto -lssh - -.PHONY: clean - -clean: - rm -f $(OBJ) magicka diff --git a/Makefile.osx b/Makefile.osx index 5053082..9c85c38 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -1,18 +1,33 @@ CC=cc -CFLAGS=-I/opt/local/include +CFLAGS=-I/opt/local/include -I./deps/ DEPS = bbs.h -JAMLIB = jamlib/jamlib.a -ZMODEM = Xmodem/libzmodem.a -LUA = lua/liblua.a +JAMLIB = deps/jamlib/jamlib.a +ZMODEM = deps/Xmodem/libzmodem.a +LUA = deps/lua/liblua.a OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o bluewave.o hashmap/hashmap.o + +all: magicka + +${LUA}: + cd deps/lua && $(MAKE) -f Makefile macosx MAKEFLAGS= + +${JAMLIB}: + cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd deps/Xmodem && $(MAKE) MAKEFLAGS= + %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) -magicka: $(OBJ) +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -ldl -lssl -lcrypto -lssh .PHONY: clean clean: rm -f $(OBJ) magicka + cd deps/lua && $(MAKE) clean + cd deps/jamlib && $(MAKE) -f Makefile.linux clean + cd deps/Xmodem && $(MAKE) clean diff --git a/Makefile.osx.WWW b/Makefile.osx.WWW index d295c48..b89abcd 100644 --- a/Makefile.osx.WWW +++ b/Makefile.osx.WWW @@ -1,19 +1,38 @@ CC=cc -CFLAGS=-I/opt/local/include -DENABLE_WWW=1 +CFLAGS=-I/opt/local/include -I./deps/ -DENABLE_WWW=1 DEPS = bbs.h -JAMLIB = jamlib/jamlib.a -ZMODEM = Xmodem/libzmodem.a -LUA = lua/liblua.a -MICROHTTPD=-lmicrohttpd -lb64 +JAMLIB = deps/jamlib/jamlib.a +ZMODEM = deps/Xmodem/libzmodem.a +LUA = deps/lua/liblua.a +B64 = deps/libb64-1.2/src/libb64.a +MICROHTTPD=-lmicrohttpd + + +all: magicka + +${LUA}: + cd deps/lua && $(MAKE) -f Makefile macosx MAKEFLAGS= + +${JAMLIB}: + cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd deps/Xmodem && $(MAKE) MAKEFLAGS= + +${B64}: + cd deps/libb64-1.2 && $(MAKE) MAKEFLAGS= OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o www.o www_email.o www_msgs.o www_last10.o bluewave.o hashmap/hashmap.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) -magicka: $(OBJ) - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -ldl -lssl -lcrypto -lssh $(MICROHTTPD) +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} + $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) $(B64) -lutil -lm -ldl -lssl -lcrypto -lssh $(MICROHTTPD) .PHONY: clean clean: rm -f $(OBJ) magicka + cd deps/lua && $(MAKE) clean + cd deps/jamlib && $(MAKE) -f Makefile.linux clean + cd deps/Xmodem && $(MAKE) clean diff --git a/Xmodem/LICENSE b/deps/Xmodem/LICENSE similarity index 100% rename from Xmodem/LICENSE rename to deps/Xmodem/LICENSE diff --git a/Xmodem/Makefile b/deps/Xmodem/Makefile similarity index 100% rename from Xmodem/Makefile rename to deps/Xmodem/Makefile diff --git a/Xmodem/checkcrc.c b/deps/Xmodem/checkcrc.c similarity index 100% rename from Xmodem/checkcrc.c rename to deps/Xmodem/checkcrc.c diff --git a/Xmodem/crc.c b/deps/Xmodem/crc.c similarity index 100% rename from Xmodem/crc.c rename to deps/Xmodem/crc.c diff --git a/Xmodem/crctab.c b/deps/Xmodem/crctab.c similarity index 100% rename from Xmodem/crctab.c rename to deps/Xmodem/crctab.c diff --git a/Xmodem/crctab.h b/deps/Xmodem/crctab.h similarity index 100% rename from Xmodem/crctab.h rename to deps/Xmodem/crctab.h diff --git a/Xmodem/main.c b/deps/Xmodem/main.c similarity index 100% rename from Xmodem/main.c rename to deps/Xmodem/main.c diff --git a/Xmodem/network.c b/deps/Xmodem/network.c similarity index 100% rename from Xmodem/network.c rename to deps/Xmodem/network.c diff --git a/Xmodem/receive.c b/deps/Xmodem/receive.c similarity index 100% rename from Xmodem/receive.c rename to deps/Xmodem/receive.c diff --git a/Xmodem/send.c b/deps/Xmodem/send.c similarity index 100% rename from Xmodem/send.c rename to deps/Xmodem/send.c diff --git a/Xmodem/seriallog.c b/deps/Xmodem/seriallog.c similarity index 100% rename from Xmodem/seriallog.c rename to deps/Xmodem/seriallog.c diff --git a/Xmodem/seriallog.h b/deps/Xmodem/seriallog.h similarity index 100% rename from Xmodem/seriallog.h rename to deps/Xmodem/seriallog.h diff --git a/Xmodem/utils.c b/deps/Xmodem/utils.c similarity index 100% rename from Xmodem/utils.c rename to deps/Xmodem/utils.c diff --git a/Xmodem/xmodem.h b/deps/Xmodem/xmodem.h similarity index 100% rename from Xmodem/xmodem.h rename to deps/Xmodem/xmodem.h diff --git a/Xmodem/xmodemr.c b/deps/Xmodem/xmodemr.c similarity index 100% rename from Xmodem/xmodemr.c rename to deps/Xmodem/xmodemr.c diff --git a/Xmodem/xmodemt.c b/deps/Xmodem/xmodemt.c similarity index 100% rename from Xmodem/xmodemt.c rename to deps/Xmodem/xmodemt.c diff --git a/Xmodem/zmodem.c b/deps/Xmodem/zmodem.c similarity index 100% rename from Xmodem/zmodem.c rename to deps/Xmodem/zmodem.c diff --git a/Xmodem/zmodem.h b/deps/Xmodem/zmodem.h similarity index 100% rename from Xmodem/zmodem.h rename to deps/Xmodem/zmodem.h diff --git a/Xmodem/zmodemdump.c b/deps/Xmodem/zmodemdump.c similarity index 100% rename from Xmodem/zmodemdump.c rename to deps/Xmodem/zmodemdump.c diff --git a/Xmodem/zmodemr.c b/deps/Xmodem/zmodemr.c similarity index 100% rename from Xmodem/zmodemr.c rename to deps/Xmodem/zmodemr.c diff --git a/Xmodem/zmodemsys.c b/deps/Xmodem/zmodemsys.c similarity index 100% rename from Xmodem/zmodemsys.c rename to deps/Xmodem/zmodemsys.c diff --git a/Xmodem/zmodemt.c b/deps/Xmodem/zmodemt.c similarity index 100% rename from Xmodem/zmodemt.c rename to deps/Xmodem/zmodemt.c diff --git a/Xmodem/zmutil.c b/deps/Xmodem/zmutil.c similarity index 100% rename from Xmodem/zmutil.c rename to deps/Xmodem/zmutil.c diff --git a/jamlib/LICENSE b/deps/jamlib/LICENSE similarity index 100% rename from jamlib/LICENSE rename to deps/jamlib/LICENSE diff --git a/jamlib/Makefile.linux b/deps/jamlib/Makefile.linux similarity index 100% rename from jamlib/Makefile.linux rename to deps/jamlib/Makefile.linux diff --git a/jamlib/Makefile.minix b/deps/jamlib/Makefile.minix similarity index 100% rename from jamlib/Makefile.minix rename to deps/jamlib/Makefile.minix diff --git a/jamlib/Makefile.os2 b/deps/jamlib/Makefile.os2 similarity index 100% rename from jamlib/Makefile.os2 rename to deps/jamlib/Makefile.os2 diff --git a/jamlib/Makefile.win32 b/deps/jamlib/Makefile.win32 similarity index 100% rename from jamlib/Makefile.win32 rename to deps/jamlib/Makefile.win32 diff --git a/jamlib/crc32.c b/deps/jamlib/crc32.c similarity index 100% rename from jamlib/crc32.c rename to deps/jamlib/crc32.c diff --git a/jamlib/jam.h b/deps/jamlib/jam.h similarity index 100% rename from jamlib/jam.h rename to deps/jamlib/jam.h diff --git a/jamlib/jamlib.doc b/deps/jamlib/jamlib.doc similarity index 100% rename from jamlib/jamlib.doc rename to deps/jamlib/jamlib.doc diff --git a/jamlib/lastread.c b/deps/jamlib/lastread.c similarity index 100% rename from jamlib/lastread.c rename to deps/jamlib/lastread.c diff --git a/jamlib/mbase.c b/deps/jamlib/mbase.c similarity index 100% rename from jamlib/mbase.c rename to deps/jamlib/mbase.c diff --git a/jamlib/message.c b/deps/jamlib/message.c similarity index 100% rename from jamlib/message.c rename to deps/jamlib/message.c diff --git a/jamlib/structrw.c b/deps/jamlib/structrw.c similarity index 100% rename from jamlib/structrw.c rename to deps/jamlib/structrw.c diff --git a/jamlib/structrw.h b/deps/jamlib/structrw.h similarity index 100% rename from jamlib/structrw.h rename to deps/jamlib/structrw.h diff --git a/jamlib/subpack.c b/deps/jamlib/subpack.c similarity index 100% rename from jamlib/subpack.c rename to deps/jamlib/subpack.c diff --git a/deps/libb64-1.2/AUTHORS b/deps/libb64-1.2/AUTHORS new file mode 100755 index 0000000..af68737 --- /dev/null +++ b/deps/libb64-1.2/AUTHORS @@ -0,0 +1,7 @@ +libb64: Base64 Encoding/Decoding Routines +====================================== + +Authors: +------- + +Chris Venter chris.venter@gmail.com http://rocketpod.blogspot.com diff --git a/deps/libb64-1.2/BENCHMARKS b/deps/libb64-1.2/BENCHMARKS new file mode 100755 index 0000000..fd34056 --- /dev/null +++ b/deps/libb64-1.2/BENCHMARKS @@ -0,0 +1,85 @@ +-- Intro + +Some people have expressed opinions about how +fast libb64's encoding and decoding routines +are, as compared to some other BASE64 packages +out there. + +This document shows the result of a short and sweet +benchmark, which takes a large-ish file and +encodes/decodes it a number of times. +The winner is the executable that does this task the quickest. + +-- Platform + +The tests were all run on a Fujitsu-Siemens laptop, +with a Pentium M processor running at 2GHz, with +1GB of RAM, running Ubuntu 10.4. + +-- Packages + +The following BASE64 packages were used in this benchmark: + +- libb64-1.2 (libb64-base64) + From libb64.sourceforge.net + Size of executable: 18808 bytes + Compiled with: + CFLAGS += -O3 + BUFFERSIZE = 16777216 + +- base64-1.5 (fourmilab-base64) + From http://www.fourmilab.ch/webtools/base64/ + Size of executable: 20261 bytes + Compiled with Default package settings + +- coreutils 7.4-2ubuntu2 (coreutils-base64) + From http://www.gnu.org/software/coreutils/ + Size of executable: 38488 bytes + Default binary distributed with Ubuntu 10.4 + +-- Input File + +Using blender-2.49b-linux-glibc236-py25-i386.tar.bz2 +from http://www.blender.org/download/get-blender/ +Size: 18285329 bytes +(approx. 18MB) + +-- Method + +Encode and Decode the Input file 50 times in a loop, +using a simple shell script, and get the running time. + +-- Results + +$ time ./benchmark-libb64.sh +real 0m28.389s +user 0m14.077s +sys 0m12.309s + +$ time ./benchmark-fourmilab.sh +real 1m43.160s +user 1m23.769s +sys 0m8.737s + +$ time ./benchmark-coreutils.sh +real 0m36.288s +user 0m24.746s +sys 0m8.181s + +28.389 for 18MB * 50 += 28.389 for 900 + +-- Conclusion + +libb64 is the fastest encoder/decoder, and +has the smallest executable size. + +On average it will encode and decode at roughly 31.7MB/second. + +The closest "competitor" is base64 from GNU coreutils, which +reaches only 24.8MB/second. + +-- +14/06/2010 +chris.venter@gmail.com + diff --git a/deps/libb64-1.2/CHANGELOG b/deps/libb64-1.2/CHANGELOG new file mode 100755 index 0000000..6fd1c17 --- /dev/null +++ b/deps/libb64-1.2/CHANGELOG @@ -0,0 +1,25 @@ +libb64: Base64 Encoding/Decoding Routines +====================================== + +## Changelog ## + +Version 1.2 Release +------------------- +Removed the b64dec, b64enc, encoder and decoder programs in favour of +a better example, called base64, which encodes and decodes +depending on its arguments. + +Created a solution for Microsoft Visual Studio C++ Express 2010 +edition, which simply builds the base64 example as a console application. + +Version 1.1 Release +------------------- +Modified encode.h to (correctly) read from the iostream argument, +instead of std::cin. +Thanks to Peter K. Lee for the heads-up. + +No API changes. + +Version 1.0 Release +------------------- +The current content is the changeset. diff --git a/deps/libb64-1.2/INSTALL b/deps/libb64-1.2/INSTALL new file mode 100755 index 0000000..b05f5db --- /dev/null +++ b/deps/libb64-1.2/INSTALL @@ -0,0 +1,44 @@ +libb64: Base64 Encoding/Decoding Routines +====================================== + +Requirements: +------------ +This piece of software has minimal requirements. + +I have tested it on the following systems: + +- a Linux machine, with the following specs: +(this was the original development machine) + * FedoraCore 4 + * kernel v. 2.6.11 (stock FC4 kernel) + * gcc version 4.0.1 20050727 (Red Hat 4.0.1-5) + * glibc-2.3.5-10 + * make v. 3.80 + * some arb version of makedepend + +- Windows XP machine + * MSYS 1.0 + * MinGW 5.1.4 + * gcc version 3.4.5 (mingw-vista special r3) + +- Windows XP machine (same as above) + * Microsoft Visual Studio 2010, Version 10.0.30319.1 RTMRel + +Barring any serious screwups on my part, this code should compile and run sweetly +under Cygwin and other systems too. If you DO get it running under some weird arch/os setup, +send me a mail, please. + +Compiling: +--------- +There is no configure. It would be overkill for something so simple... +Run make in the root directory. + +Installing: +---------- +Since the current targets are a standalone executable and a static library +(fancy name for archive) with some headers, an install script has not been implemented yet. +Simply copy the executable into your path, and use it. + +-- +peace out +Chris diff --git a/deps/libb64-1.2/LICENSE b/deps/libb64-1.2/LICENSE new file mode 100755 index 0000000..a6b5606 --- /dev/null +++ b/deps/libb64-1.2/LICENSE @@ -0,0 +1,29 @@ +Copyright-Only Dedication (based on United States law) +or Public Domain Certification + +The person or persons who have associated work with this document (the +"Dedicator" or "Certifier") hereby either (a) certifies that, to the best of +his knowledge, the work of authorship identified is in the public domain of the +country from which the work is published, or (b) hereby dedicates whatever +copyright the dedicators holds in the work of authorship identified below (the +"Work") to the public domain. A certifier, moreover, dedicates any copyright +interest he may have in the associated work, and for these purposes, is +described as a "dedicator" below. + +A certifier has taken reasonable steps to verify the copyright status of this +work. Certifier recognizes that his good faith efforts may not shield him from +liability if in fact the work certified is not in the public domain. + +Dedicator makes this dedication for the benefit of the public at large and to +the detriment of the Dedicator's heirs and successors. Dedicator intends this +dedication to be an overt act of relinquishment in perpetuity of all present +and future rights under copyright law, whether vested or contingent, in the +Work. Dedicator understands that such relinquishment of all rights includes +the relinquishment of all rights to enforce (by lawsuit or otherwise) those +copyrights in the Work. + +Dedicator recognizes that, once placed in the public domain, the Work may be +freely reproduced, distributed, transmitted, used, modified, built upon, or +otherwise exploited by anyone for any purpose, commercial or non-commercial, +and in any way, including by methods that have not yet been invented or +conceived. \ No newline at end of file diff --git a/deps/libb64-1.2/Makefile b/deps/libb64-1.2/Makefile new file mode 100755 index 0000000..fc41310 --- /dev/null +++ b/deps/libb64-1.2/Makefile @@ -0,0 +1,25 @@ +all: all_src all_base64 + +all_src: + $(MAKE) -C src +all_base64: all_src + $(MAKE) -C base64 + +clean: clean_src clean_base64 clean_include + rm -f *~ *.bak + +clean_include: + rm -f include/b64/*~ + +clean_src: + $(MAKE) -C src clean; +clean_base64: + $(MAKE) -C base64 clean; + +distclean: clean distclean_src distclean_base64 + +distclean_src: + $(MAKE) -C src distclean; +distclean_base64: + $(MAKE) -C base64 distclean; + diff --git a/deps/libb64-1.2/README b/deps/libb64-1.2/README new file mode 100755 index 0000000..be93b7b --- /dev/null +++ b/deps/libb64-1.2/README @@ -0,0 +1,138 @@ +b64: Base64 Encoding/Decoding Routines +====================================== + +Overview: +-------- +libb64 is a library of ANSI C routines for fast encoding/decoding data into and +from a base64-encoded format. C++ wrappers are included, as well as the source +code for standalone encoding and decoding executables. + +base64 consists of ASCII text, and is therefore a useful encoding for storing +binary data in a text file, such as xml, or sending binary data over text-only +email. + +References: +---------- +* Wikipedia article: + http://en.wikipedia.org/wiki/Base64 +* base64, another implementation of a commandline en/decoder: + http://www.fourmilab.ch/webtools/base64/ + +Why? +--- +I did this because I need an implementation of base64 encoding and decoding, +without any licensing problems. Most OS implementations are released under +either the GNU/GPL, or a BSD-variant, which is not what I require. + +Also, the chance to actually use the co-routine implementation in code is rare, +and its use here is fitting. I couldn't pass up the chance. +For more information on this technique, see "Coroutines in C", by Simon Tatham, +which can be found online here: +http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html + +So then, under which license do I release this code? On to the next section... + +License: +------- +This work is released under into the Public Domain. +It basically boils down to this: I put this work in the public domain, and you +can take it and do whatever you want with it. + +An example of this "license" is the Creative Commons Public Domain License, a +copy of which can be found in the LICENSE file, and also online at +http://creativecommons.org/licenses/publicdomain/ + +Commandline Use: +--------------- +There is a new executable available, it is simply called base64. +It can encode and decode files, as instructed by the user. + +To encode a file: +$ ./base64 -e filea fileb +fileb will now be the base64-encoded version of filea. + +To decode a file: +$ ./base64 -d fileb filec +filec will now be identical to filea. + +Programming: +----------- +Some C++ wrappers are provided as well, so you don't have to get your hands +dirty. Encoding from standard input to standard output is as simple as + + #include + #include + int main() + { + base64::encoder E; + E.encode(std::cin, std::cout); + return 0; + } + +Both standalone executables and a static library is provided in the package, + +Implementation: +-------------- +It is DAMN fast, if I may say so myself. The C code uses a little trick which +has been used to implement coroutines, of which one can say that this +implementation is an example. + +(To see how the libb64 codebase compares with some other BASE64 implementations +available, see the BENCHMARKS file) + +The trick involves the fact that a switch-statement may legally cross into +sub-blocks. A very thorough and enlightening essay on co-routines in C, using +this method, can be found in the above mentioned "Coroutines in C", by Simon +Tatham: http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html + +For example, an RLE decompressing routine, adapted from the article: +1 static int STATE = 0; +2 static int len, c; +3 switch (STATE) +4 { +5 while (1) +6 { +7 c = getchar(); +8 if (c == EOF) return EOF; +9 if (c == 0xFF) { +10 len = getchar(); +11 c = getchar(); +12 while (len--) +13 { +14 STATE = 0; +15 return c; +16 case 0: +17 } +18 } else +19 STATE = 1; +20 return c; +21 case 1: +22 } +23 } +24 } + +As can be seen from this example, a coroutine depends on a state variable, +which it sets directly before exiting (lines 14 and 119). The next time the +routine is entered, the switch moves control to the specific point directly +after the previous exit (lines 16 and 21).hands + +(As an aside, in the mentioned article the combination of the top-level switch, +the various setting of the state, the return of a value, and the labelling of +the exit point is wrapped in #define macros, making the structure of the +routine even clearer.) + +The obvious problem with any such routine is the static keyword. +Any static variables in a function spell doom for multithreaded applications. +Also, in situations where this coroutine is used by more than one other +coroutines, the consistency is disturbed. + +What is needed is a structure for storing these variabled, which is passed to +the routine seperately. This obviously breaks the modularity of the function, +since now the caller has to worry about and care for the internal state of the +routine (the callee). This allows for a fast, multithreading-enabled +implementation, which may (obviously) be wrapped in a C++ object for ease of +use. + +The base64 encoding and decoding functionality in this package is implemented +in exactly this way, providing both a high-speed high-maintanence C interface, +and a wrapped C++ which is low-maintanence and only slightly less performant. diff --git a/deps/libb64-1.2/TODO b/deps/libb64-1.2/TODO new file mode 100755 index 0000000..e69de29 diff --git a/deps/libb64-1.2/base64/Makefile b/deps/libb64-1.2/base64/Makefile new file mode 100755 index 0000000..30a2c5c --- /dev/null +++ b/deps/libb64-1.2/base64/Makefile @@ -0,0 +1,56 @@ +BINARIES = base64 + +# Build flags (uncomment one) +############################# +# Release build flags +CFLAGS += -O3 +############################# +# Debug build flags +#CFLAGS += -g +############################# + +# select a buffersize +# a larger size should be faster, but takes more runtime memory +#BUFFERSIZE = 4096 +#BUFFERSIZE = 65536 +BUFFERSIZE = 16777216 + +SOURCES = base64.cc + +TARGETS = $(BINARIES) + +LINK.o = g++ + +CFLAGS += -Werror -pedantic +CFLAGS += -DBUFFERSIZE=$(BUFFERSIZE) +CFLAGS += -I../include + +CXXFLAGS += $(CFLAGS) + +vpath %.h ../include/b64 +vpath %.a ../src + +.PHONY : clean + +all: $(TARGETS) #strip + +base64: libb64.a + +strip: + strip $(BINARIES) *.exe + +clean: clean_VisualStudioProject + rm -f *.exe* *.o $(TARGETS) *.bak *~ +clean_VisualStudioProject: + $(MAKE) -C VisualStudioProject clean + +distclean: clean distclean_VisualStudioProject + rm -f depend +distclean_VisualStudioProject: clean_VisualStudioProject + $(MAKE) -C VisualStudioProject distclean + +depend: $(SOURCES) + makedepend -f- $(CFLAGS) $(SOURCES) 2> /dev/null 1> depend + +-include depend + diff --git a/deps/libb64-1.2/base64/VisualStudioProject/Makefile b/deps/libb64-1.2/base64/VisualStudioProject/Makefile new file mode 100755 index 0000000..047fcb9 --- /dev/null +++ b/deps/libb64-1.2/base64/VisualStudioProject/Makefile @@ -0,0 +1,11 @@ +DEBRIS = base64.sdf base64.suo base64.vcxproj.user + +all: + +clean: + rm -rf Debug Release + +distclean: clean + rm -f $(DEBRIS) + + \ No newline at end of file diff --git a/deps/libb64-1.2/base64/VisualStudioProject/base64.sln b/deps/libb64-1.2/base64/VisualStudioProject/base64.sln new file mode 100755 index 0000000..b357a9c --- /dev/null +++ b/deps/libb64-1.2/base64/VisualStudioProject/base64.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base64", "base64.vcxproj", "{0B094121-DC64-4D74-AFA0-750B83F800D0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0B094121-DC64-4D74-AFA0-750B83F800D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {0B094121-DC64-4D74-AFA0-750B83F800D0}.Debug|Win32.Build.0 = Debug|Win32 + {0B094121-DC64-4D74-AFA0-750B83F800D0}.Release|Win32.ActiveCfg = Release|Win32 + {0B094121-DC64-4D74-AFA0-750B83F800D0}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deps/libb64-1.2/base64/VisualStudioProject/base64.vcxproj b/deps/libb64-1.2/base64/VisualStudioProject/base64.vcxproj new file mode 100755 index 0000000..530aec4 --- /dev/null +++ b/deps/libb64-1.2/base64/VisualStudioProject/base64.vcxproj @@ -0,0 +1,92 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {0B094121-DC64-4D74-AFA0-750B83F800D0} + Win32Proj + base64 + + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + BUFFERSIZE=16777216;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + H:\builds\libb64\working.libb64\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + BUFFERSIZE=16777216;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + H:\builds\libb64\working.libb64\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/deps/libb64-1.2/base64/VisualStudioProject/base64.vcxproj.filters b/deps/libb64-1.2/base64/VisualStudioProject/base64.vcxproj.filters new file mode 100755 index 0000000..34a1105 --- /dev/null +++ b/deps/libb64-1.2/base64/VisualStudioProject/base64.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {12b9f2a2-b899-409a-a507-8cefe9c39b25} + + + {ce5598bd-67f3-430f-890b-cefa880e9405} + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/deps/libb64-1.2/base64/base64 b/deps/libb64-1.2/base64/base64 new file mode 100755 index 0000000000000000000000000000000000000000..5078ff816882743c1fa30c68df368f2be768d141 GIT binary patch literal 33044 zcmeHw3wTu3)%KZOFd#ZnQR98ksHC7KK#-_t1~PI+CJ+cHiZHn_A*mrrGcynh;@C+v z!#FkV*Y@M7_LJ7?NA1PbT1Bfkh?3N{8hWu*{S|#$dt$Ur(Lds)Ss$uN5m+n1sQm~OI^#CrjiK$;?y`z;m}RXgd^nV^#*(`0U4Hfs=THN zC=3!hE|E0EGls~CgpyIO*B=O0`4dsY^ed3^&Nd6FaFZcR$%DznC*^r-ef3SgX2e+K zojYC1>sIoJ)9#6Hn0{-jtG&LKYF|^p8>puXB!+*RO;SPpOY&;Rt)Z!G`s94XeF%4K&uHM{V+X)TbD~cqboF{0>b?FA zYpWXTy-k7U!^%_aLLT|ekL}|M69M#k*E9}UZMc5f#Ztc(#Y5aG4^1)gdA;?ON7Any z{4`mMvK#Sac`PrY5}((*x-w9iK!=xi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XRx7e6jVjVv^?k!#fE zSrY!+vr$TqZe4E<4rWnDw}mjdtj+yj%JV2Yki+$oQRc}fmaK%-Dn0VE8nc*VW3nt4 zMzxVM3pb{m3hUNZ1%0^B#_Ja~?a78VmNH@q7r?Vj@#JEx_PJ7Y%9-vxOyYY=d!zGplJku&`p8u$Wdtf~|R`L0YoN*yzEQx#sU@mAVZH|CsY z_Z4W?nCZh}W(|wEa#+ml zVKGI+VhZwyM-9)dV8$@2>BFg}k3cnZIAh`PsNtoVer4itN1Yjo!=1|o!vEDeY8UIg zF->7|wYc +#include + +#include +#include +#include + +#include + +// Function which prints the usage of this executable +void usage() +{ + std::cerr<< \ + "base64: Encodes and Decodes files using base64\n" \ + "Usage: base64 [-e|-d] [input] [output]\n" \ + " Where [-e] will encode the input file into the output file,\n" \ + " [-d] will decode the input file into the output file, and\n" \ + " [input] and [output] are the input and output files, respectively.\n"; +} +// Function which prints the usage of this executable, plus a short message +void usage(const std::string& message) +{ + usage(); + std::cerr<<"Incorrect invocation of base64:\n"; + std::cerr< + +namespace base64 +{ + extern "C" + { + #include "cdecode.h" + } + + struct decoder + { + base64_decodestate _state; + int _buffersize; + + decoder(int buffersize_in = BUFFERSIZE) + : _buffersize(buffersize_in) + {} + + int decode(char value_in) + { + return base64_decode_value(value_in); + } + + int decode(const char* code_in, const int length_in, char* plaintext_out) + { + return base64_decode_block(code_in, length_in, plaintext_out, &_state); + } + + void decode(std::istream& istream_in, std::ostream& ostream_in) + { + base64_init_decodestate(&_state); + // + const int N = _buffersize; + char* code = new char[N]; + char* plaintext = new char[N]; + int codelength; + int plainlength; + + do + { + istream_in.read((char*)code, N); + codelength = istream_in.gcount(); + plainlength = decode(code, codelength, plaintext); + ostream_in.write((const char*)plaintext, plainlength); + } + while (istream_in.good() && codelength > 0); + // + base64_init_decodestate(&_state); + + delete [] code; + delete [] plaintext; + } + }; + +} // namespace base64 + + + +#endif // BASE64_DECODE_H + diff --git a/deps/libb64-1.2/include/b64/encode.h b/deps/libb64-1.2/include/b64/encode.h new file mode 100755 index 0000000..5d807d9 --- /dev/null +++ b/deps/libb64-1.2/include/b64/encode.h @@ -0,0 +1,77 @@ +// :mode=c++: +/* +encode.h - c++ wrapper for a base64 encoding algorithm + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 +*/ +#ifndef BASE64_ENCODE_H +#define BASE64_ENCODE_H + +#include + +namespace base64 +{ + extern "C" + { + #include "cencode.h" + } + + struct encoder + { + base64_encodestate _state; + int _buffersize; + + encoder(int buffersize_in = BUFFERSIZE) + : _buffersize(buffersize_in) + {} + + int encode(char value_in) + { + return base64_encode_value(value_in); + } + + int encode(const char* code_in, const int length_in, char* plaintext_out) + { + return base64_encode_block(code_in, length_in, plaintext_out, &_state); + } + + int encode_end(char* plaintext_out) + { + return base64_encode_blockend(plaintext_out, &_state); + } + + void encode(std::istream& istream_in, std::ostream& ostream_in) + { + base64_init_encodestate(&_state); + // + const int N = _buffersize; + char* plaintext = new char[N]; + char* code = new char[2*N]; + int plainlength; + int codelength; + + do + { + istream_in.read(plaintext, N); + plainlength = istream_in.gcount(); + // + codelength = encode(plaintext, plainlength, code); + ostream_in.write(code, codelength); + } + while (istream_in.good() && plainlength > 0); + + codelength = encode_end(code); + ostream_in.write(code, codelength); + // + base64_init_encodestate(&_state); + + delete [] code; + delete [] plaintext; + } + }; + +} // namespace base64 + +#endif // BASE64_ENCODE_H + diff --git a/deps/libb64-1.2/src/Makefile b/deps/libb64-1.2/src/Makefile new file mode 100755 index 0000000..28b2382 --- /dev/null +++ b/deps/libb64-1.2/src/Makefile @@ -0,0 +1,43 @@ +LIBRARIES = libb64.a + +# Build flags (uncomment one) +############################# +# Release build flags +CFLAGS += -O3 +############################# +# Debug build flags +#CFLAGS += -g +############################# + +SOURCES = cdecode.c cencode.c + +TARGETS = $(LIBRARIES) + +LINK.o = gcc + +CFLAGS += -Werror -pedantic +CFLAGS += -I../include + +vpath %.h ../include/b64 + +.PHONY : clean + +all: $(TARGETS) #strip + +libb64.a: cencode.o cdecode.o + $(AR) $(ARFLAGS) $@ $^ + +strip: + strip $(BINARIES) *.exe + +clean: + rm -f *.exe* *.o $(TARGETS) *.bak *~ + +distclean: clean + rm -f depend + +depend: $(SOURCES) + makedepend -f- $(CFLAGS) $(SOURCES) 2> /dev/null 1> depend + +-include depend + diff --git a/deps/libb64-1.2/src/cdecode.c b/deps/libb64-1.2/src/cdecode.c new file mode 100755 index 0000000..34509c9 --- /dev/null +++ b/deps/libb64-1.2/src/cdecode.c @@ -0,0 +1,88 @@ +/* +cdecoder.c - c source to a base64 decoding algorithm implementation + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 +*/ + +#include + +int base64_decode_value(char value_in) +{ + static const char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,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,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}; + static const char decoding_size = sizeof(decoding); + value_in -= 43; + if (value_in < 0 || value_in > decoding_size) return -1; + return decoding[(int)value_in]; +} + +void base64_init_decodestate(base64_decodestate* state_in) +{ + state_in->step = step_a; + state_in->plainchar = 0; +} + +int base64_decode_block(const char* code_in, const int length_in, char* plaintext_out, base64_decodestate* state_in) +{ + const char* codechar = code_in; + char* plainchar = plaintext_out; + char fragment; + + *plainchar = state_in->plainchar; + + switch (state_in->step) + { + while (1) + { + case step_a: + do { + if (codechar == code_in+length_in) + { + state_in->step = step_a; + state_in->plainchar = *plainchar; + return plainchar - plaintext_out; + } + fragment = (char)base64_decode_value(*codechar++); + } while (fragment < 0); + *plainchar = (fragment & 0x03f) << 2; + case step_b: + do { + if (codechar == code_in+length_in) + { + state_in->step = step_b; + state_in->plainchar = *plainchar; + return plainchar - plaintext_out; + } + fragment = (char)base64_decode_value(*codechar++); + } while (fragment < 0); + *plainchar++ |= (fragment & 0x030) >> 4; + *plainchar = (fragment & 0x00f) << 4; + case step_c: + do { + if (codechar == code_in+length_in) + { + state_in->step = step_c; + state_in->plainchar = *plainchar; + return plainchar - plaintext_out; + } + fragment = (char)base64_decode_value(*codechar++); + } while (fragment < 0); + *plainchar++ |= (fragment & 0x03c) >> 2; + *plainchar = (fragment & 0x003) << 6; + case step_d: + do { + if (codechar == code_in+length_in) + { + state_in->step = step_d; + state_in->plainchar = *plainchar; + return plainchar - plaintext_out; + } + fragment = (char)base64_decode_value(*codechar++); + } while (fragment < 0); + *plainchar++ |= (fragment & 0x03f); + } + } + /* control should not reach here */ + return plainchar - plaintext_out; +} + diff --git a/deps/libb64-1.2/src/cencode.c b/deps/libb64-1.2/src/cencode.c new file mode 100755 index 0000000..03ba5b6 --- /dev/null +++ b/deps/libb64-1.2/src/cencode.c @@ -0,0 +1,109 @@ +/* +cencoder.c - c source to a base64 encoding algorithm implementation + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 +*/ + +#include + +const int CHARS_PER_LINE = 72; + +void base64_init_encodestate(base64_encodestate* state_in) +{ + state_in->step = step_A; + state_in->result = 0; + state_in->stepcount = 0; +} + +char base64_encode_value(char value_in) +{ + static const char* encoding = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + if (value_in > 63) return '='; + return encoding[(int)value_in]; +} + +int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in) +{ + const char* plainchar = plaintext_in; + const char* const plaintextend = plaintext_in + length_in; + char* codechar = code_out; + char result; + char fragment; + + result = state_in->result; + + switch (state_in->step) + { + while (1) + { + case step_A: + if (plainchar == plaintextend) + { + state_in->result = result; + state_in->step = step_A; + return codechar - code_out; + } + fragment = *plainchar++; + result = (fragment & 0x0fc) >> 2; + *codechar++ = base64_encode_value(result); + result = (fragment & 0x003) << 4; + case step_B: + if (plainchar == plaintextend) + { + state_in->result = result; + state_in->step = step_B; + return codechar - code_out; + } + fragment = *plainchar++; + result |= (fragment & 0x0f0) >> 4; + *codechar++ = base64_encode_value(result); + result = (fragment & 0x00f) << 2; + case step_C: + if (plainchar == plaintextend) + { + state_in->result = result; + state_in->step = step_C; + return codechar - code_out; + } + fragment = *plainchar++; + result |= (fragment & 0x0c0) >> 6; + *codechar++ = base64_encode_value(result); + result = (fragment & 0x03f) >> 0; + *codechar++ = base64_encode_value(result); + + ++(state_in->stepcount); + if (state_in->stepcount == CHARS_PER_LINE/4) + { + *codechar++ = '\n'; + state_in->stepcount = 0; + } + } + } + /* control should not reach here */ + return codechar - code_out; +} + +int base64_encode_blockend(char* code_out, base64_encodestate* state_in) +{ + char* codechar = code_out; + + switch (state_in->step) + { + case step_B: + *codechar++ = base64_encode_value(state_in->result); + *codechar++ = '='; + *codechar++ = '='; + break; + case step_C: + *codechar++ = base64_encode_value(state_in->result); + *codechar++ = '='; + break; + case step_A: + break; + } + *codechar++ = '\n'; + + return codechar - code_out; +} + diff --git a/deps/libb64-1.2/src/depend b/deps/libb64-1.2/src/depend new file mode 100644 index 0000000..e69de29 diff --git a/lua/Makefile b/deps/lua/Makefile similarity index 100% rename from lua/Makefile rename to deps/lua/Makefile diff --git a/lua/lapi.c b/deps/lua/lapi.c similarity index 100% rename from lua/lapi.c rename to deps/lua/lapi.c diff --git a/lua/lapi.h b/deps/lua/lapi.h similarity index 100% rename from lua/lapi.h rename to deps/lua/lapi.h diff --git a/lua/lauxlib.c b/deps/lua/lauxlib.c similarity index 100% rename from lua/lauxlib.c rename to deps/lua/lauxlib.c diff --git a/lua/lauxlib.h b/deps/lua/lauxlib.h similarity index 100% rename from lua/lauxlib.h rename to deps/lua/lauxlib.h diff --git a/lua/lbaselib.c b/deps/lua/lbaselib.c similarity index 100% rename from lua/lbaselib.c rename to deps/lua/lbaselib.c diff --git a/lua/lbitlib.c b/deps/lua/lbitlib.c similarity index 100% rename from lua/lbitlib.c rename to deps/lua/lbitlib.c diff --git a/lua/lcode.c b/deps/lua/lcode.c similarity index 100% rename from lua/lcode.c rename to deps/lua/lcode.c diff --git a/lua/lcode.h b/deps/lua/lcode.h similarity index 100% rename from lua/lcode.h rename to deps/lua/lcode.h diff --git a/lua/lcorolib.c b/deps/lua/lcorolib.c similarity index 100% rename from lua/lcorolib.c rename to deps/lua/lcorolib.c diff --git a/lua/lctype.c b/deps/lua/lctype.c similarity index 100% rename from lua/lctype.c rename to deps/lua/lctype.c diff --git a/lua/lctype.h b/deps/lua/lctype.h similarity index 100% rename from lua/lctype.h rename to deps/lua/lctype.h diff --git a/lua/ldblib.c b/deps/lua/ldblib.c similarity index 100% rename from lua/ldblib.c rename to deps/lua/ldblib.c diff --git a/lua/ldebug.c b/deps/lua/ldebug.c similarity index 100% rename from lua/ldebug.c rename to deps/lua/ldebug.c diff --git a/lua/ldebug.h b/deps/lua/ldebug.h similarity index 100% rename from lua/ldebug.h rename to deps/lua/ldebug.h diff --git a/lua/ldo.c b/deps/lua/ldo.c similarity index 100% rename from lua/ldo.c rename to deps/lua/ldo.c diff --git a/lua/ldo.h b/deps/lua/ldo.h similarity index 100% rename from lua/ldo.h rename to deps/lua/ldo.h diff --git a/lua/ldump.c b/deps/lua/ldump.c similarity index 100% rename from lua/ldump.c rename to deps/lua/ldump.c diff --git a/lua/lfunc.c b/deps/lua/lfunc.c similarity index 100% rename from lua/lfunc.c rename to deps/lua/lfunc.c diff --git a/lua/lfunc.h b/deps/lua/lfunc.h similarity index 100% rename from lua/lfunc.h rename to deps/lua/lfunc.h diff --git a/lua/lgc.c b/deps/lua/lgc.c similarity index 100% rename from lua/lgc.c rename to deps/lua/lgc.c diff --git a/lua/lgc.h b/deps/lua/lgc.h similarity index 100% rename from lua/lgc.h rename to deps/lua/lgc.h diff --git a/lua/linit.c b/deps/lua/linit.c similarity index 100% rename from lua/linit.c rename to deps/lua/linit.c diff --git a/lua/liolib.c b/deps/lua/liolib.c similarity index 100% rename from lua/liolib.c rename to deps/lua/liolib.c diff --git a/lua/llex.c b/deps/lua/llex.c similarity index 100% rename from lua/llex.c rename to deps/lua/llex.c diff --git a/lua/llex.h b/deps/lua/llex.h similarity index 100% rename from lua/llex.h rename to deps/lua/llex.h diff --git a/lua/llimits.h b/deps/lua/llimits.h similarity index 100% rename from lua/llimits.h rename to deps/lua/llimits.h diff --git a/lua/lmathlib.c b/deps/lua/lmathlib.c similarity index 100% rename from lua/lmathlib.c rename to deps/lua/lmathlib.c diff --git a/lua/lmem.c b/deps/lua/lmem.c similarity index 100% rename from lua/lmem.c rename to deps/lua/lmem.c diff --git a/lua/lmem.h b/deps/lua/lmem.h similarity index 100% rename from lua/lmem.h rename to deps/lua/lmem.h diff --git a/lua/loadlib.c b/deps/lua/loadlib.c similarity index 100% rename from lua/loadlib.c rename to deps/lua/loadlib.c diff --git a/lua/lobject.c b/deps/lua/lobject.c similarity index 100% rename from lua/lobject.c rename to deps/lua/lobject.c diff --git a/lua/lobject.h b/deps/lua/lobject.h similarity index 100% rename from lua/lobject.h rename to deps/lua/lobject.h diff --git a/lua/lopcodes.c b/deps/lua/lopcodes.c similarity index 100% rename from lua/lopcodes.c rename to deps/lua/lopcodes.c diff --git a/lua/lopcodes.h b/deps/lua/lopcodes.h similarity index 100% rename from lua/lopcodes.h rename to deps/lua/lopcodes.h diff --git a/lua/loslib.c b/deps/lua/loslib.c similarity index 100% rename from lua/loslib.c rename to deps/lua/loslib.c diff --git a/lua/lparser.c b/deps/lua/lparser.c similarity index 100% rename from lua/lparser.c rename to deps/lua/lparser.c diff --git a/lua/lparser.h b/deps/lua/lparser.h similarity index 100% rename from lua/lparser.h rename to deps/lua/lparser.h diff --git a/lua/lprefix.h b/deps/lua/lprefix.h similarity index 100% rename from lua/lprefix.h rename to deps/lua/lprefix.h diff --git a/lua/lstate.c b/deps/lua/lstate.c similarity index 100% rename from lua/lstate.c rename to deps/lua/lstate.c diff --git a/lua/lstate.h b/deps/lua/lstate.h similarity index 100% rename from lua/lstate.h rename to deps/lua/lstate.h diff --git a/lua/lstring.c b/deps/lua/lstring.c similarity index 100% rename from lua/lstring.c rename to deps/lua/lstring.c diff --git a/lua/lstring.h b/deps/lua/lstring.h similarity index 100% rename from lua/lstring.h rename to deps/lua/lstring.h diff --git a/lua/lstrlib.c b/deps/lua/lstrlib.c similarity index 100% rename from lua/lstrlib.c rename to deps/lua/lstrlib.c diff --git a/lua/ltable.c b/deps/lua/ltable.c similarity index 100% rename from lua/ltable.c rename to deps/lua/ltable.c diff --git a/lua/ltable.h b/deps/lua/ltable.h similarity index 100% rename from lua/ltable.h rename to deps/lua/ltable.h diff --git a/lua/ltablib.c b/deps/lua/ltablib.c similarity index 100% rename from lua/ltablib.c rename to deps/lua/ltablib.c diff --git a/lua/ltm.c b/deps/lua/ltm.c similarity index 100% rename from lua/ltm.c rename to deps/lua/ltm.c diff --git a/lua/ltm.h b/deps/lua/ltm.h similarity index 100% rename from lua/ltm.h rename to deps/lua/ltm.h diff --git a/lua/lua.c b/deps/lua/lua.c similarity index 100% rename from lua/lua.c rename to deps/lua/lua.c diff --git a/lua/lua.h b/deps/lua/lua.h similarity index 100% rename from lua/lua.h rename to deps/lua/lua.h diff --git a/lua/lua.hpp b/deps/lua/lua.hpp similarity index 100% rename from lua/lua.hpp rename to deps/lua/lua.hpp diff --git a/lua/luac.c b/deps/lua/luac.c similarity index 100% rename from lua/luac.c rename to deps/lua/luac.c diff --git a/lua/luaconf.h b/deps/lua/luaconf.h similarity index 100% rename from lua/luaconf.h rename to deps/lua/luaconf.h diff --git a/lua/lualib.h b/deps/lua/lualib.h similarity index 100% rename from lua/lualib.h rename to deps/lua/lualib.h diff --git a/lua/lundump.c b/deps/lua/lundump.c similarity index 100% rename from lua/lundump.c rename to deps/lua/lundump.c diff --git a/lua/lundump.h b/deps/lua/lundump.h similarity index 100% rename from lua/lundump.h rename to deps/lua/lundump.h diff --git a/lua/lutf8lib.c b/deps/lua/lutf8lib.c similarity index 100% rename from lua/lutf8lib.c rename to deps/lua/lutf8lib.c diff --git a/lua/lvm.c b/deps/lua/lvm.c similarity index 100% rename from lua/lvm.c rename to deps/lua/lvm.c diff --git a/lua/lvm.h b/deps/lua/lvm.h similarity index 100% rename from lua/lvm.h rename to deps/lua/lvm.h diff --git a/lua/lzio.c b/deps/lua/lzio.c similarity index 100% rename from lua/lzio.c rename to deps/lua/lzio.c diff --git a/lua/lzio.h b/deps/lua/lzio.h similarity index 100% rename from lua/lzio.h rename to deps/lua/lzio.h