diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..50804e9 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +OS := $(shell uname -s) + +ifeq ($(OS), FreeBSD) + MAKEFILE=Makefile.freebsd +endif +ifeq ($(OS), NetBSD) + MAKEFILE=Makefile.netbsd +endif +ifeq ($(OS), Linux) + MAKEFILE=Makefile.linux +endif +ifeq ($(OS), Darwin) + MAKEFILE=Makefile.osx +endif + +all: magicka + +.PHONY: magicka www clean cleanwww + +magicka: + cd src && $(MAKE) -f $(MAKEFILE) + +www: + cd src && $(MAKE) -f $(MAKEFILE).WWW + +clean: + cd src && $(MAKE) -f $(MAKEFILE) clean + +cleanwww: + cd src && $(MAKE) -f $(MAKEFILE).WWW clean diff --git a/Makefile.freebsd b/Makefile.freebsd deleted file mode 100644 index 6c2d050..0000000 --- a/Makefile.freebsd +++ /dev/null @@ -1,75 +0,0 @@ -CC=cc -CFLAGS=-std=gnu99 -I/usr/local/include -I./deps/ -DEPS = bbs.h -JAMLIB = deps/jamlib/jamlib.a -ZMODEM = deps/Xmodem/libzmodem.a -LUA = deps/lua/liblua.a -ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -JSMN = deps/jsmn/libjsmn.a -CDK = deps/cdk-5-20161210/libcdk.a - -all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd - -${LUA}: - cd deps/lua && $(MAKE) -f Makefile freebsd MAKEFLAGS= - -${JAMLIB}: - cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= - -${ZMODEM}: - cd deps/Xmodem && $(MAKE) MAKEFLAGS= - -${ODOORS}: - cd deps/odoors/ && $(MAKE) - -$(JSMN): - cd deps/jsmn/ && $(MAKE) - -$(CDK): - cd deps/cdk-5.0-20161210/ && export CPPFLAGS=-I/usr/local/include && ./configure --with-ncurses - cd deps/cdk-5.0-20161210/ && $(MAKE) - -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 menus.o -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv - -magimail: $(JAMLIB) - cd utils/magimail && $(MAKE) freebsd - -magiedit: $(ODOORS) - cd utils/magiedit && $(MAKE) - -ticproc: - cd utils/ticproc && $(MAKE) - -magichat: $(JSMN) - cd utils/magichat && $(MAKE) - -mgpost: $(JAMLIB) - cd utils/mgpost && $(MAKE) - -fileapprove: $(CDK) - cd utils/fileapprove && $(MAKE) - -magiftpd: - cd utils/magiftpd && $(MAKE) - -.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 utils/magimail && $(MAKE) cleanfreebsd - cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - cd utils/ticproc && $(MAKE) clean - cd utils/mgpost && $(MAKE) clean - cd utils/magichat && $(MAKE) clean - cd deps/cdk-5.0-20161210 && $(MAKE) clean - cd utils/fileapprove && $(MAKE) clean - cd utils/magiftpd && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.freebsd.WWW b/Makefile.freebsd.WWW deleted file mode 100644 index b600e2d..0000000 --- a/Makefile.freebsd.WWW +++ /dev/null @@ -1,81 +0,0 @@ -CC=cc -CFLAGS=-std=gnu99 -I/usr/local/include -I./deps/ -I./deps/libb64-1.2/include -DENABLE_WWW=1 -DEPS = bbs.h -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 -ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -JSMN = deps/jsmn/libjsmn.a -CDK = deps/cdk-5-20161210/libcdk.a - -all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd - -${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= - -${ODOORS}: - cd deps/odoors/ && $(MAKE) - -$(JSMN): - cd deps/jsmn/ && $(MAKE) - -$(CDK): - cd deps/cdk-5.0-20161210/ && export CPPFLAGS=-I/usr/local/include && ./configure --with-ncurses - cd deps/cdk-5.0-20161210/ && $(MAKE) - -OBJ = deps/aha/aha.o 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 menus.o -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv $(MICROHTTPD) - -magimail: $(JAMLIB) - cd utils/magimail && $(MAKE) freebsd - -magiedit: $(ODOORS) - cd utils/magiedit && $(MAKE) - -ticproc: - cd utils/ticproc && $(MAKE) - -mgpost: $(JAMLIB) - cd utils/mgpost && $(MAKE) - -magichat: $(JSMN) - cd utils/magichat && $(MAKE) - -fileapprove: $(CDK) - cd utils/fileapprove && $(MAKE) - -magiftpd: - cd utils/magiftpd && $(MAKE) - -.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 - cd utils/magimail && $(MAKE) cleanfreebsd - cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - cd utils/ticproc && $(MAKE) clean - cd utils/mgpost && $(MAKE) clean - cd utils/magichat && $(MAKE) clean - cd deps/cdk-5.0-20161210 && $(MAKE) clean - cd utils/fileapprove && $(MAKE) clean - cd utils/magiftpd && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.linux b/Makefile.linux deleted file mode 100644 index 5d8de24..0000000 --- a/Makefile.linux +++ /dev/null @@ -1,76 +0,0 @@ -CC=cc -CFLAGS=-std=gnu99 -I/usr/local/include -I./deps/ -DEPS = bbs.h -JAMLIB = deps/jamlib/jamlib.a -ZMODEM = deps/Xmodem/libzmodem.a -LUA = deps/lua/liblua.a -ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -JSMN = deps/jsmn/libjsmn.a -CDK = deps/cdk-5-20161210/libcdk.a - -all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd - -${LUA}: - cd deps/lua && $(MAKE) -f Makefile linux MAKEFLAGS= - -${JAMLIB}: - cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= - -${ZMODEM}: - cd deps/Xmodem && $(MAKE) MAKEFLAGS= - -${ODOORS}: - cd deps/odoors/ && $(MAKE) - -$(JSMN): - cd deps/jsmn/ && $(MAKE) - -$(CDK): - cd deps/cdk-5.0-20161210/ && ./configure - cd deps/cdk-5.0-20161210/ && $(MAKE) - - -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 menus.o -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh - -magimail: $(JAMLIB) - cd utils/magimail && $(MAKE) linux - -magiedit: $(ODOORS) - cd utils/magiedit && $(MAKE) - -ticproc: - cd utils/ticproc && $(MAKE) - -mgpost: $(JAMLIB) - cd utils/mgpost && $(MAKE) - -magichat: $(JSMN) - cd utils/magichat && $(MAKE) - -fileapprove: $(CDK) - cd utils/fileapprove && $(MAKE) - -magiftpd: - cd utils/magiftpd && $(MAKE) - -.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 utils/magimail && $(MAKE) cleanlinux - cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - cd utils/ticproc && $(MAKE) clean - cd utils/mgpost && $(MAKE) clean - cd utils/magichat && $(MAKE) clean - cd deps/cdk-5.0-20161210 && $(MAKE) clean - cd utils/fileapprove && $(MAKE) clean - cd utils/magiftpd && $(MAKE) clean diff --git a/Makefile.linux.WWW b/Makefile.linux.WWW deleted file mode 100644 index cbefdfd..0000000 --- a/Makefile.linux.WWW +++ /dev/null @@ -1,81 +0,0 @@ -CC=cc -CFLAGS=-std=gnu99 -I/usr/local/include -I./deps/ -I./deps/libb64-1.2/include -DENABLE_WWW=1 -DEPS = bbs.h -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 -ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -JSMN = deps/jsmn/libjsmn.a -CDK = deps/cdk-5-20161210/libcdk.a - -all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd - -${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= - -${ODOORS}: - cd deps/odoors/ && $(MAKE) - -$(JSMN): - cd deps/jsmn/ && $(MAKE) - -$(CDK): - cd deps/cdk-5.0-20161210/ && ./configure - cd deps/cdk-5.0-20161210/ && $(MAKE) - -OBJ = deps/aha/aha.o 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 menus.o -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${B64} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh $(MICROHTTPD) - -magimail: $(JAMLIB) - cd utils/magimail && $(MAKE) linux - -magiedit: $(ODOORS) - cd utils/magiedit && $(MAKE) - -ticproc: - cd utils/ticproc && $(MAKE) - -mgpost: $(JAMLIB) - cd utils/mgpost && $(MAKE) - -magichat: $(JSMN) - cd utils/magichat && $(MAKE) - -fileapprove: $(CDK) - cd utils/fileapprove && $(MAKE) - -magiftpd: - cd utils/magiftpd && $(MAKE) - -.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 - cd utils/magimail && $(MAKE) cleanlinux - cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - cd utils/ticproc && $(MAKE) clean - cd utils/mgpost && $(MAKE) clean - cd utils/magichat && $(MAKE) clean - cd deps/cdk-5.0-20161210 && $(MAKE) clean - cd utils/fileapprove && $(MAKE) clean - cd utils/magiftpd && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.netbsd b/Makefile.netbsd deleted file mode 100644 index f507b90..0000000 --- a/Makefile.netbsd +++ /dev/null @@ -1,75 +0,0 @@ -CC=cc -CFLAGS=-std=gnu99 -I/usr/pkg/include -I./deps/ -DEPS = bbs.h -JAMLIB = deps/jamlib/jamlib.a -ZMODEM = deps/Xmodem/libzmodem.a -LUA = deps/lua/liblua.a -ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -JSMN = deps/jsmn/libjsmn.a -CDK = deps/cdk-5-20161210/libcdk.a - -all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd - -${LUA}: - cd deps/lua && $(MAKE) -f Makefile bsd MAKEFLAGS= - -${JAMLIB}: - cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= - -${ZMODEM}: - cd deps/Xmodem && $(MAKE) MAKEFLAGS= - -${ODOORS}: - cd deps/odoors/ && $(MAKE) - -$(JSMN): - cd deps/jsmn/ && $(MAKE) - -$(CDK): - cd deps/cdk-5.0-20161210/ && export CPPFLAGS=-I/usr/pkg/include && ./configure --with-ncurses - cd deps/cdk-5.0-20161210/ && $(MAKE) - -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 menus.o -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv - -magiedit: $(ODOORS) - cd utils/magiedit && $(MAKE) - -magimail: $(JAMLIB) - cd utils/magimail && $(MAKE) freebsd - -ticproc: - cd utils/ticproc && $(MAKE) - -mgpost: $(JAMLIB) - cd utils/mgpost && $(MAKE) - -magichat: $(JSMN) - cd utils/magichat && $(MAKE) - -fileapprove: $(CDK) - cd utils/fileapprove && $(MAKE) - -magiftpd: - cd utils/magiftpd && $(MAKE) - -.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 utils/magimail && $(MAKE) cleanfreebsd - cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - cd utils/ticproc && $(MAKE) clean - cd utils/mgpost && $(MAKE) clean - cd utils/magichat && $(MAKE) clean - cd deps/cdk-5.0-20161210 && $(MAKE) clean - cd utils/fileapprove && $(MAKE) clean - cd utils/magiftpd && $(MAKE) clean diff --git a/Makefile.netbsd.WWW b/Makefile.netbsd.WWW deleted file mode 100644 index dcb25f0..0000000 --- a/Makefile.netbsd.WWW +++ /dev/null @@ -1,81 +0,0 @@ -CC=cc -CFLAGS=-std=gnu99 -I/usr/pkg/include -I./deps/ -I./deps/libb64-1.2/include -DENABLE_WWW=1 -DEPS = bbs.h -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 -ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -JSMN = deps/jsmn/libjsmn.a -CDK = deps/cdk-5-20161210/libcdk.a - -all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd - -${LUA}: - cd deps/lua && $(MAKE) -f Makefile bsd MAKEFLAGS= - -${JAMLIB}: - cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= - -${ZMODEM}: - cd deps/Xmodem && $(MAKE) MAKEFLAGS= - -${B64}: - cd deps/libb64-1.2 && $(MAKE) MAKEFLAGS= - -${ODOORS}: - cd deps/odoors/ && $(MAKE) - -$(JSMN): - cd deps/jsmn/ && $(MAKE) - -$(CDK): - cd deps/cdk-5.0-20161210/ && export CPPFLAGS=-I/usr/pkg/include && ./configure --with-ncurses - cd deps/cdk-5.0-20161210/ && $(MAKE) - -OBJ = deps/aha/aha.o 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 menus.o -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv $(MICROHTTPD) - -magiedit: $(ODOORS) - cd utils/magiedit && $(MAKE) - -magimail: $(JAMLIB) - cd utils/magimail && $(MAKE) freebsd - -ticproc: - cd utils/ticproc && $(MAKE) - -mgpost: $(JAMLIB) - cd utils/mgpost && $(MAKE) - -magichat: $(JSMN) - cd utils/magichat && $(MAKE) - -fileapprove: $(CDK) - cd utils/fileapprove && $(MAKE) - -magiftpd: - cd utils/magiftpd && $(MAKE) - -.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 - cd utils/magimail && $(MAKE) cleanfreebsd - cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - cd utils/ticproc && $(MAKE) clean - cd utils/mgpost && $(MAKE) clean - cd utils/magichat && $(MAKE) clean - cd deps/cdk-5.0-20161210 && $(MAKE) clean - cd utils/fileapprove && $(MAKE) clean - cd utils/magiftpd && $(MAKE) clean diff --git a/Makefile.osx b/Makefile.osx deleted file mode 100644 index 260e560..0000000 --- a/Makefile.osx +++ /dev/null @@ -1,76 +0,0 @@ -CC=cc -CFLAGS=-std=gnu99 -I/opt/local/include -I./deps/ -DEPS = bbs.h -JAMLIB = deps/jamlib/jamlib.a -ZMODEM = deps/Xmodem/libzmodem.a -LUA = deps/lua/liblua.a -ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -JSMN = deps/jsmn/libjsmn.a -CDK = deps/cdk-5-20161210/libcdk.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 menus.o - -all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd - -${LUA}: - cd deps/lua && $(MAKE) -f Makefile macosx MAKEFLAGS= - -${JAMLIB}: - cd deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= - -${ZMODEM}: - cd deps/Xmodem && $(MAKE) MAKEFLAGS= - -${ODOORS}: - cd deps/odoors/ && $(MAKE) - -$(JSMN): - cd deps/jsmn/ && $(MAKE) - -$(CDK): - cd deps/cdk-5.0-20161210/ && ./configure - cd deps/cdk-5.0-20161210/ && $(MAKE) - -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -liconv - -magimail: $(JAMLIB) - cd utils/magimail && $(MAKE) linux - -magiedit: $(ODOORS) - cd utils/magiedit && $(MAKE) - -ticproc: - cd utils/ticproc && $(MAKE) - -mgpost: $(JAMLIB) - cd utils/mgpost && $(MAKE) - -magichat: $(JSMN) - cd utils/magichat && $(MAKE) - -fileapprove: $(CDK) - cd utils/fileapprove && $(MAKE) - -magiftpd: - cd utils/magiftpd && $(MAKE) - -.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 utils/magimail && $(MAKE) cleanlinux - cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - cd utils/ticproc && $(MAKE) clean - cd utils/mgpost && $(MAKE) clean - cd utils/magichat && $(MAKE) clean - cd deps/cdk-5.0-20161210 && $(MAKE) clean - cd utils/fileapprove && $(MAKE) clean - cd utils/magiftpd && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.osx.WWW b/Makefile.osx.WWW deleted file mode 100644 index 1c7cd57..0000000 --- a/Makefile.osx.WWW +++ /dev/null @@ -1,80 +0,0 @@ -CC=cc -CFLAGS=-std=gnu99 -I/opt/local/include -I./deps/ -I./deps/libb64-1.2/include -DENABLE_WWW=1 -Wall -DEPS = bbs.h -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 -ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -JSMN = deps/jsmn/libjsmn.a -CDK = deps/cdk-5-20161210/libcdk.a - -all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd - -${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= - -${ODOORS}: - cd deps/odoors/ && $(MAKE) - -$(JSMN): - cd deps/jsmn/ && $(MAKE) - -$(CDK): - cd deps/cdk-5.0-20161210/ && ./configure - cd deps/cdk-5.0-20161210/ && $(MAKE) - -OBJ = deps/aha/aha.o 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 menus.o -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - -magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -liconv $(MICROHTTPD) - -magimail: $(JAMLIB) - cd utils/magimail && $(MAKE) linux - -magiedit: $(ODOORS) - cd utils/magiedit && $(MAKE) - -ticproc: - cd utils/ticproc && $(MAKE) - -mgpost: $(JAMLIB) - cd utils/mgpost && $(MAKE) - -magichat: $(JSMN) - cd utils/magichat && $(MAKE) - -fileapprove: $(CDK) - cd utils/fileapprove && $(MAKE) - -magiftpd: - cd utils/magiftpd && $(MAKE) - -.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 utils/magimail && $(MAKE) cleanlinux - cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - cd utils/ticproc && $(MAKE) clean - cd utils/mgpost && $(MAKE) clean - cd utils/magichat && $(MAKE) clean - cd deps/cdk-5.0-20161210 && $(MAKE) clean - cd utils/fileapprove && $(MAKE) clean - cd utils/magiftpd && $(MAKE) clean \ No newline at end of file diff --git a/deps/libb64-1.2/base64/base64 b/deps/libb64-1.2/base64/base64 deleted file mode 100755 index 5078ff8..0000000 Binary files a/deps/libb64-1.2/base64/base64 and /dev/null differ diff --git a/src/Makefile.freebsd b/src/Makefile.freebsd new file mode 100644 index 0000000..555f690 --- /dev/null +++ b/src/Makefile.freebsd @@ -0,0 +1,75 @@ +CC=cc +CFLAGS=-std=gnu99 -I/usr/local/include -I../deps/ +DEPS = bbs.h +JAMLIB = ../deps/jamlib/jamlib.a +ZMODEM = ../deps/Xmodem/libzmodem.a +LUA = ../deps/lua/liblua.a +ODOORS = ../deps/odoors/libs-`uname -s`/libODoors.a +JSMN = ../deps/jsmn/libjsmn.a +CDK = ../deps/cdk-5-20161210/libcdk.a + +all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd + +${LUA}: + cd ../deps/lua && $(MAKE) -f Makefile freebsd MAKEFLAGS= + +${JAMLIB}: + cd ../deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd ../deps/Xmodem && $(MAKE) MAKEFLAGS= + +${ODOORS}: + cd ../deps/odoors/ && $(MAKE) + +$(JSMN): + cd ../deps/jsmn/ && $(MAKE) + +$(CDK): + cd ../deps/cdk-5.0-20161210/ && export CPPFLAGS=-I/usr/local/include && ./configure --with-ncurses + cd ../deps/cdk-5.0-20161210/ && $(MAKE) + +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 menus.o +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${JSMN} + $(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv + +magimail: $(JAMLIB) + cd ../utils/magimail && $(MAKE) freebsd + +magiedit: $(ODOORS) + cd ../utils/magiedit && $(MAKE) + +ticproc: + cd ../utils/ticproc && $(MAKE) + +magichat: $(JSMN) + cd ../utils/magichat && $(MAKE) + +mgpost: $(JAMLIB) + cd ../utils/mgpost && $(MAKE) + +fileapprove: $(CDK) + cd ../utils/fileapprove && $(MAKE) + +magiftpd: + cd ../utils/magiftpd && $(MAKE) + +.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 ../utils/magimail && $(MAKE) cleanfreebsd + cd ../utils/magiedit && $(MAKE) clean + cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd ../utils/ticproc && $(MAKE) clean + cd ../utils/mgpost && $(MAKE) clean + cd ../utils/magichat && $(MAKE) clean + cd ../deps/cdk-5.0-20161210 && $(MAKE) clean + cd ../utils/fileapprove && $(MAKE) clean + cd ../utils/magiftpd && $(MAKE) clean diff --git a/src/Makefile.freebsd.WWW b/src/Makefile.freebsd.WWW new file mode 100644 index 0000000..579c49b --- /dev/null +++ b/src/Makefile.freebsd.WWW @@ -0,0 +1,81 @@ +CC=cc +CFLAGS=-std=gnu99 -I/usr/local/include -I../deps/ -I../deps/libb64-1.2/include -DENABLE_WWW=1 +DEPS = bbs.h +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 +ODOORS = ../deps/odoors/libs-`uname -s`/libODoors.a +JSMN = ../deps/jsmn/libjsmn.a +CDK = ../deps/cdk-5-20161210/libcdk.a + +all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd + +${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= + +${ODOORS}: + cd ../deps/odoors/ && $(MAKE) + +$(JSMN): + cd ../deps/jsmn/ && $(MAKE) + +$(CDK): + cd ../deps/cdk-5.0-20161210/ && export CPPFLAGS=-I/usr/local/include && ./configure --with-ncurses + cd ../deps/cdk-5.0-20161210/ && $(MAKE) + +OBJ = ../deps/aha/aha.o 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 menus.o +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} + $(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv $(MICROHTTPD) + +magimail: $(JAMLIB) + cd ../utils/magimail && $(MAKE) freebsd + +magiedit: $(ODOORS) + cd ../utils/magiedit && $(MAKE) + +ticproc: + cd ../utils/ticproc && $(MAKE) + +mgpost: $(JAMLIB) + cd ../utils/mgpost && $(MAKE) + +magichat: $(JSMN) + cd ../utils/magichat && $(MAKE) + +fileapprove: $(CDK) + cd ../utils/fileapprove && $(MAKE) + +magiftpd: + cd ../utils/magiftpd && $(MAKE) + +.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 + cd ../utils/magimail && $(MAKE) cleanfreebsd + cd ../utils/magiedit && $(MAKE) clean + cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd ../utils/ticproc && $(MAKE) clean + cd ../utils/mgpost && $(MAKE) clean + cd ../utils/magichat && $(MAKE) clean + cd ../deps/cdk-5.0-20161210 && $(MAKE) clean + cd ../utils/fileapprove && $(MAKE) clean + cd ../utils/magiftpd && $(MAKE) clean diff --git a/src/Makefile.linux b/src/Makefile.linux new file mode 100644 index 0000000..52b3d5d --- /dev/null +++ b/src/Makefile.linux @@ -0,0 +1,76 @@ +CC=cc +CFLAGS=-std=gnu99 -I/usr/local/include -I../deps/ +DEPS = bbs.h +JAMLIB = ../deps/jamlib/jamlib.a +ZMODEM = ../deps/Xmodem/libzmodem.a +LUA = ../deps/lua/liblua.a +ODOORS = ../deps/odoors/libs-`uname -s`/libODoors.a +JSMN = ../deps/jsmn/libjsmn.a +CDK = ../deps/cdk-5-20161210/libcdk.a + +all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd + +${LUA}: + cd ../deps/lua && $(MAKE) -f Makefile linux MAKEFLAGS= + +${JAMLIB}: + cd ../deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd ../deps/Xmodem && $(MAKE) MAKEFLAGS= + +${ODOORS}: + cd ../deps/odoors/ && $(MAKE) + +$(JSMN): + cd ../deps/jsmn/ && $(MAKE) + +$(CDK): + cd ../deps/cdk-5.0-20161210/ && ./configure + cd ../deps/cdk-5.0-20161210/ && $(MAKE) + + +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 menus.o +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} + $(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh + +magimail: $(JAMLIB) + cd ../utils/magimail && $(MAKE) linux + +magiedit: $(ODOORS) + cd ../utils/magiedit && $(MAKE) + +ticproc: + cd ../utils/ticproc && $(MAKE) + +mgpost: $(JAMLIB) + cd ../utils/mgpost && $(MAKE) + +magichat: $(JSMN) + cd ../utils/magichat && $(MAKE) + +fileapprove: $(CDK) + cd ../utils/fileapprove && $(MAKE) + +magiftpd: + cd ../utils/magiftpd && $(MAKE) + +.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 ../utils/magimail && $(MAKE) cleanlinux + cd ../utils/magiedit && $(MAKE) clean + cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd ../utils/ticproc && $(MAKE) clean + cd ../utils/mgpost && $(MAKE) clean + cd ../utils/magichat && $(MAKE) clean + cd ../deps/cdk-5.0-20161210 && $(MAKE) clean + cd ../utils/fileapprove && $(MAKE) clean + cd ../utils/magiftpd && $(MAKE) clean diff --git a/src/Makefile.linux.WWW b/src/Makefile.linux.WWW new file mode 100644 index 0000000..16f0756 --- /dev/null +++ b/src/Makefile.linux.WWW @@ -0,0 +1,81 @@ +CC=cc +CFLAGS=-std=gnu99 -I/usr/local/include -I../deps/ -I../deps/libb64-1.2/include -DENABLE_WWW=1 +DEPS = bbs.h +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 +ODOORS = ../deps/odoors/libs-`uname -s`/libODoors.a +JSMN = ../deps/jsmn/libjsmn.a +CDK = ../deps/cdk-5-20161210/libcdk.a + +all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd + +${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= + +${ODOORS}: + cd ../deps/odoors/ && $(MAKE) + +$(JSMN): + cd ../deps/jsmn/ && $(MAKE) + +$(CDK): + cd ../deps/cdk-5.0-20161210/ && ./configure + cd ../deps/cdk-5.0-20161210/ && $(MAKE) + +OBJ = ../deps/aha/aha.o 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 menus.o +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${B64} ${JSMN} + $(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh $(MICROHTTPD) + +magimail: $(JAMLIB) + cd ../utils/magimail && $(MAKE) linux + +magiedit: $(ODOORS) + cd ../utils/magiedit && $(MAKE) + +ticproc: + cd ../utils/ticproc && $(MAKE) + +mgpost: $(JAMLIB) + cd ../utils/mgpost && $(MAKE) + +magichat: $(JSMN) + cd ../utils/magichat && $(MAKE) + +fileapprove: $(CDK) + cd ../utils/fileapprove && $(MAKE) + +magiftpd: + cd ../utils/magiftpd && $(MAKE) + +.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 + cd ../utils/magimail && $(MAKE) cleanlinux + cd ../utils/magiedit && $(MAKE) clean + cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd ../utils/ticproc && $(MAKE) clean + cd ../utils/mgpost && $(MAKE) clean + cd ../utils/magichat && $(MAKE) clean + cd ../deps/cdk-5.0-20161210 && $(MAKE) clean + cd ../utils/fileapprove && $(MAKE) clean + cd ../utils/magiftpd && $(MAKE) clean diff --git a/src/Makefile.netbsd b/src/Makefile.netbsd new file mode 100644 index 0000000..6322e9a --- /dev/null +++ b/src/Makefile.netbsd @@ -0,0 +1,75 @@ +CC=cc +CFLAGS=-std=gnu99 -I/usr/pkg/include -I../deps/ +DEPS = bbs.h +JAMLIB = ../deps/jamlib/jamlib.a +ZMODEM = ../deps/Xmodem/libzmodem.a +LUA = ../deps/lua/liblua.a +ODOORS = ../deps/odoors/libs-`uname -s`/libODoors.a +JSMN = ../deps/jsmn/libjsmn.a +CDK = ../deps/cdk-5-20161210/libcdk.a + +all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd + +${LUA}: + cd ../deps/lua && $(MAKE) -f Makefile bsd MAKEFLAGS= + +${JAMLIB}: + cd ../deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd ../deps/Xmodem && $(MAKE) MAKEFLAGS= + +${ODOORS}: + cd ../deps/odoors/ && $(MAKE) + +$(JSMN): + cd ../deps/jsmn/ && $(MAKE) + +$(CDK): + cd ../deps/cdk-5.0-20161210/ && export CPPFLAGS=-I/usr/pkg/include && ./configure --with-ncurses + cd ../deps/cdk-5.0-20161210/ && $(MAKE) + +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 menus.o +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} + $(CC) -o ../magicka $^ $(CFLAGS) -R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv + +magiedit: $(ODOORS) + cd ../utils/magiedit && $(MAKE) + +magimail: $(JAMLIB) + cd ../utils/magimail && $(MAKE) freebsd + +ticproc: + cd ../utils/ticproc && $(MAKE) + +mgpost: $(JAMLIB) + cd ../utils/mgpost && $(MAKE) + +magichat: $(JSMN) + cd ../utils/magichat && $(MAKE) + +fileapprove: $(CDK) + cd ../utils/fileapprove && $(MAKE) + +magiftpd: + cd ../utils/magiftpd && $(MAKE) + +.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 ../utils/magimail && $(MAKE) cleanfreebsd + cd ../utils/magiedit && $(MAKE) clean + cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd ../utils/ticproc && $(MAKE) clean + cd ../utils/mgpost && $(MAKE) clean + cd ../utils/magichat && $(MAKE) clean + cd ../deps/cdk-5.0-20161210 && $(MAKE) clean + cd ../utils/fileapprove && $(MAKE) clean + cd ../utils/magiftpd && $(MAKE) clean diff --git a/src/Makefile.netbsd.WWW b/src/Makefile.netbsd.WWW new file mode 100644 index 0000000..c6bf98b --- /dev/null +++ b/src/Makefile.netbsd.WWW @@ -0,0 +1,81 @@ +CC=cc +CFLAGS=-std=gnu99 -I/usr/pkg/include -I../deps/ -I../deps/libb64-1.2/include -DENABLE_WWW=1 +DEPS = bbs.h +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 +ODOORS = ../deps/odoors/libs-`uname -s`/libODoors.a +JSMN = ../deps/jsmn/libjsmn.a +CDK = ../deps/cdk-5-20161210/libcdk.a + +all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd + +${LUA}: + cd ../deps/lua && $(MAKE) -f Makefile bsd MAKEFLAGS= + +${JAMLIB}: + cd ../deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd ../deps/Xmodem && $(MAKE) MAKEFLAGS= + +${B64}: + cd ../deps/libb64-1.2 && $(MAKE) MAKEFLAGS= + +${ODOORS}: + cd ../deps/odoors/ && $(MAKE) + +$(JSMN): + cd ../deps/jsmn/ && $(MAKE) + +$(CDK): + cd ../deps/cdk-5.0-20161210/ && export CPPFLAGS=-I/usr/pkg/include && ./configure --with-ncurses + cd ../deps/cdk-5.0-20161210/ && $(MAKE) + +OBJ = ../deps/aha/aha.o 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 menus.o +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} + $(CC) -o ../magicka $^ $(CFLAGS) -R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv $(MICROHTTPD) + +magiedit: $(ODOORS) + cd ../utils/magiedit && $(MAKE) + +magimail: $(JAMLIB) + cd ../utils/magimail && $(MAKE) freebsd + +ticproc: + cd ../utils/ticproc && $(MAKE) + +mgpost: $(JAMLIB) + cd ../utils/mgpost && $(MAKE) + +magichat: $(JSMN) + cd ../utils/magichat && $(MAKE) + +fileapprove: $(CDK) + cd ../utils/fileapprove && $(MAKE) + +magiftpd: + cd ../utils/magiftpd && $(MAKE) + +.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 + cd ../utils/magimail && $(MAKE) cleanfreebsd + cd ../utils/magiedit && $(MAKE) clean + cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd ../utils/ticproc && $(MAKE) clean + cd ../utils/mgpost && $(MAKE) clean + cd ../utils/magichat && $(MAKE) clean + cd ../deps/cdk-5.0-20161210 && $(MAKE) clean + cd ../utils/fileapprove && $(MAKE) clean + cd ../utils/magiftpd && $(MAKE) clean diff --git a/src/Makefile.osx b/src/Makefile.osx new file mode 100644 index 0000000..3039e58 --- /dev/null +++ b/src/Makefile.osx @@ -0,0 +1,76 @@ +CC=cc +CFLAGS=-std=gnu99 -I/opt/local/include -I..//deps/ +DEPS = bbs.h +JAMLIB = ../deps/jamlib/jamlib.a +ZMODEM = ../deps/Xmodem/libzmodem.a +LUA = ../deps/lua/liblua.a +ODOORS = ../deps/odoors/libs-`uname -s`/libODoors.a +JSMN = ../deps/jsmn/libjsmn.a +CDK = ../deps/cdk-5-20161210/libcdk.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 menus.o + +all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd + +${LUA}: + cd ../deps/lua && $(MAKE) -f Makefile macosx MAKEFLAGS= + +${JAMLIB}: + cd ../deps/jamlib && $(MAKE) -f Makefile.linux MAKEFLAGS= + +${ZMODEM}: + cd ../deps/Xmodem && $(MAKE) MAKEFLAGS= + +${ODOORS}: + cd ../deps/odoors/ && $(MAKE) + +$(JSMN): + cd ../deps/jsmn/ && $(MAKE) + +$(CDK): + cd ../deps/cdk-5.0-20161210/ && ./configure + cd ../deps/cdk-5.0-20161210/ && $(MAKE) + +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} + $(CC) -o ../magicka $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -liconv + +magimail: $(JAMLIB) + cd ../utils/magimail && $(MAKE) linux + +magiedit: $(ODOORS) + cd ../utils/magiedit && $(MAKE) + +ticproc: + cd ../utils/ticproc && $(MAKE) + +mgpost: $(JAMLIB) + cd ../utils/mgpost && $(MAKE) + +magichat: $(JSMN) + cd ../utils/magichat && $(MAKE) + +fileapprove: $(CDK) + cd ../utils/fileapprove && $(MAKE) + +magiftpd: + cd ../utils/magiftpd && $(MAKE) + +.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 ../utils/magimail && $(MAKE) cleanlinux + cd ../utils/magiedit && $(MAKE) clean + cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd ../utils/ticproc && $(MAKE) clean + cd ../utils/mgpost && $(MAKE) clean + cd ../utils/magichat && $(MAKE) clean + cd ../deps/cdk-5.0-20161210 && $(MAKE) clean + cd ../utils/fileapprove && $(MAKE) clean + cd ../utils/magiftpd && $(MAKE) clean diff --git a/src/Makefile.osx.WWW b/src/Makefile.osx.WWW new file mode 100644 index 0000000..ba540bc --- /dev/null +++ b/src/Makefile.osx.WWW @@ -0,0 +1,80 @@ +CC=cc +CFLAGS=-std=gnu99 -I/opt/local/include -I../deps/ -I../deps/libb64-1.2/include -DENABLE_WWW=1 -Wall +DEPS = bbs.h +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 +ODOORS = ../deps/odoors/libs-`uname -s`/libODoors.a +JSMN = ../deps/jsmn/libjsmn.a +CDK = ../deps/cdk-5-20161210/libcdk.a + +all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd + +${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= + +${ODOORS}: + cd ../deps/odoors/ && $(MAKE) + +$(JSMN): + cd ../deps/jsmn/ && $(MAKE) + +$(CDK): + cd ../deps/cdk-5.0-20161210/ && ./configure + cd ../deps/cdk-5.0-20161210/ && $(MAKE) + +OBJ = ../deps/aha/aha.o 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 menus.o +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} + $(CC) -o ../magicka $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -liconv $(MICROHTTPD) + +magimail: $(JAMLIB) + cd ../utils/magimail && $(MAKE) linux + +magiedit: $(ODOORS) + cd ../utils/magiedit && $(MAKE) + +ticproc: + cd ../utils/ticproc && $(MAKE) + +mgpost: $(JAMLIB) + cd ../utils/mgpost && $(MAKE) + +magichat: $(JSMN) + cd ../utils/magichat && $(MAKE) + +fileapprove: $(CDK) + cd ../utils/fileapprove && $(MAKE) + +magiftpd: + cd ../utils/magiftpd && $(MAKE) + +.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 ../utils/magimail && $(MAKE) cleanlinux + cd ../utils/magiedit && $(MAKE) clean + cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd ../utils/ticproc && $(MAKE) clean + cd ../utils/mgpost && $(MAKE) clean + cd ../utils/magichat && $(MAKE) clean + cd ../deps/cdk-5.0-20161210 && $(MAKE) clean + cd ../utils/fileapprove && $(MAKE) clean + cd ../utils/magiftpd && $(MAKE) clean diff --git a/bbs.c b/src/bbs.c similarity index 100% rename from bbs.c rename to src/bbs.c diff --git a/bbs.h b/src/bbs.h similarity index 100% rename from bbs.h rename to src/bbs.h diff --git a/bbs_list.c b/src/bbs_list.c similarity index 100% rename from bbs_list.c rename to src/bbs_list.c diff --git a/bluewave.c b/src/bluewave.c similarity index 100% rename from bluewave.c rename to src/bluewave.c diff --git a/bluewave.h b/src/bluewave.h similarity index 100% rename from bluewave.h rename to src/bluewave.h diff --git a/chat_system.c b/src/chat_system.c similarity index 99% rename from chat_system.c rename to src/chat_system.c index c409359..632eb83 100644 --- a/chat_system.c +++ b/src/chat_system.c @@ -7,7 +7,7 @@ #include #include #include -#include "deps/jsmn/jsmn.h" +#include "../deps/jsmn/jsmn.h" #include "bbs.h" extern struct bbs_config conf; diff --git a/doors.c b/src/doors.c similarity index 100% rename from doors.c rename to src/doors.c diff --git a/email.c b/src/email.c similarity index 100% rename from email.c rename to src/email.c diff --git a/files.c b/src/files.c similarity index 100% rename from files.c rename to src/files.c diff --git a/hashmap/README b/src/hashmap/README similarity index 100% rename from hashmap/README rename to src/hashmap/README diff --git a/hashmap/hashmap.c b/src/hashmap/hashmap.c similarity index 100% rename from hashmap/hashmap.c rename to src/hashmap/hashmap.c diff --git a/hashmap/hashmap.h b/src/hashmap/hashmap.h similarity index 100% rename from hashmap/hashmap.h rename to src/hashmap/hashmap.h diff --git a/hashmap/main.c b/src/hashmap/main.c similarity index 100% rename from hashmap/main.c rename to src/hashmap/main.c diff --git a/inih/LICENSE.txt b/src/inih/LICENSE.txt similarity index 100% rename from inih/LICENSE.txt rename to src/inih/LICENSE.txt diff --git a/inih/ini.c b/src/inih/ini.c similarity index 100% rename from inih/ini.c rename to src/inih/ini.c diff --git a/inih/ini.h b/src/inih/ini.h similarity index 100% rename from inih/ini.h rename to src/inih/ini.h diff --git a/lua_glue.c b/src/lua_glue.c similarity index 100% rename from lua_glue.c rename to src/lua_glue.c diff --git a/mail_menu.c b/src/mail_menu.c similarity index 100% rename from mail_menu.c rename to src/mail_menu.c diff --git a/main.c b/src/main.c similarity index 100% rename from main.c rename to src/main.c diff --git a/main_menu.c b/src/main_menu.c similarity index 100% rename from main_menu.c rename to src/main_menu.c diff --git a/menus.c b/src/menus.c similarity index 100% rename from menus.c rename to src/menus.c diff --git a/settings.c b/src/settings.c similarity index 100% rename from settings.c rename to src/settings.c diff --git a/strings.c b/src/strings.c similarity index 100% rename from strings.c rename to src/strings.c diff --git a/users.c b/src/users.c similarity index 100% rename from users.c rename to src/users.c diff --git a/www.c b/src/www.c similarity index 100% rename from www.c rename to src/www.c diff --git a/www_email.c b/src/www_email.c similarity index 100% rename from www_email.c rename to src/www_email.c diff --git a/www_last10.c b/src/www_last10.c similarity index 100% rename from www_last10.c rename to src/www_last10.c diff --git a/www_msgs.c b/src/www_msgs.c similarity index 100% rename from www_msgs.c rename to src/www_msgs.c diff --git a/utils/magiftpd/Makefile b/utils/magiftpd/Makefile index 7af391d..29c95ea 100644 --- a/utils/magiftpd/Makefile +++ b/utils/magiftpd/Makefile @@ -24,7 +24,7 @@ endif DEPS = magiftpd.c -OBJ = magiftpd.o ../../inih/ini.o +OBJ = magiftpd.o ../../src/inih/ini.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) diff --git a/utils/magiftpd/magiftpd.c b/utils/magiftpd/magiftpd.c index b2e3fb5..1773082 100644 --- a/utils/magiftpd/magiftpd.c +++ b/utils/magiftpd/magiftpd.c @@ -17,7 +17,7 @@ #include #include #include "magiftpd.h" -#include "../../inih/ini.h" +#include "../../src/inih/ini.h" static struct ftpclient **clients; static int client_count = 0; @@ -997,4 +997,4 @@ int main(int argc, char **argv) { ftpsrv.last_passive_port = ftpsrv.min_passive_port; init(&ftpsrv); -} \ No newline at end of file +} diff --git a/utils/mgpost/Makefile b/utils/mgpost/Makefile index ec64561..2709350 100644 --- a/utils/mgpost/Makefile +++ b/utils/mgpost/Makefile @@ -2,7 +2,7 @@ CC=cc CFLAGS=-I/usr/local/include DEPS = mgpost.c JAMLIB = ../../deps/jamlib/jamlib.a -OBJ = mgpost.o ../../inih/ini.o +OBJ = mgpost.o ../../src/inih/ini.o all: mgpost diff --git a/utils/mgpost/mgpost.c b/utils/mgpost/mgpost.c index 46fcdf7..a94cf55 100644 --- a/utils/mgpost/mgpost.c +++ b/utils/mgpost/mgpost.c @@ -5,7 +5,7 @@ #include #include #include "../../deps/jamlib/jam.h" -#include "../../inih/ini.h" +#include "../../src/inih/ini.h" s_JamBase *open_jam_base(char *path) { int ret; diff --git a/utils/ticproc/Makefile b/utils/ticproc/Makefile index b5492ff..37ed89f 100644 --- a/utils/ticproc/Makefile +++ b/utils/ticproc/Makefile @@ -24,13 +24,13 @@ endif DEPS = ticproc.c -OBJ = ticproc.o ../../inih/ini.o crc32.o +OBJ = ticproc.o ../../src/inih/ini.o crc32.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) ticproc: $(OBJ) - $(CC) -o ticproc -o $@ $^ $(CFLAGS) $(LDFLAGS) -lsqlite3 + $(CC) -o ticproc $^ $(CFLAGS) $(LDFLAGS) -lsqlite3 .PHONY: clean diff --git a/utils/ticproc/ticproc.c b/utils/ticproc/ticproc.c index 51bf10a..cf9c903 100644 --- a/utils/ticproc/ticproc.c +++ b/utils/ticproc/ticproc.c @@ -6,7 +6,7 @@ #include #include #include -#include "../../inih/ini.h" +#include "../../src/inih/ini.h" #include "ticproc.h" #include "crc32.h"