More GNUmakefile cleanups.

With the normalization of magimail's Makefile,
we can further simplify this logic.

Integrate the WWW logic into GNUmakefile.common.

Remove the custom `Makefile.sunos` files: just
use a conditional in the Makefile.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
This commit is contained in:
Dan Cross 2018-10-09 15:55:12 +00:00 committed by Andrew Pamment
parent 264b5688b2
commit 187cf02903
18 changed files with 92 additions and 703 deletions

View File

@ -1,4 +1,4 @@
OS := $(shell uname -s | tr '[A-Z]' '[a-z]' | sed 's/darwin/osx/') OS:= $(shell uname -s | tr '[A-Z]' '[a-z]' | sed 's/darwin/osx/')
all: magicka all: magicka
@ -8,10 +8,10 @@ magicka:
cd src && $(MAKE) -f GNUmakefile.$(OS) cd src && $(MAKE) -f GNUmakefile.$(OS)
www: www:
cd src && $(MAKE) -f GNUmakefile.$(OS).WWW cd src && $(MAKE) -f GNUmakefile.$(OS) www
clean: clean:
cd src && $(MAKE) -f GNUmakefile.$(OS) clean cd src && $(MAKE) -f GNUmakefile.$(OS) clean
cleanwww: cleanwww:
cd src && $(MAKE) -f GNUmakefile.$(OS).WWW clean cd src && $(MAKE) -f GNUmakefile.$(OS) clean

View File

@ -1,102 +1,114 @@
OS:= $(shell uname -s)
DEPSDIR:= ../deps DEPSDIR:= ../deps
CFLAGS:= $(CFLAGS) -I$(DEPSDIR) UTILSDIR:= ../utils
CFLAGS:= ${CFLAGS} -I${DEPSDIR} ${EXTRA_INCLUDES}
JAMLIB= ../deps/jamlib/jamlib.a JAMLIB:= ${DEPSDIR}/jamlib/jamlib.a
ZMODEM= ../deps/Xmodem/libzmodem.a ZMODEM:= ${DEPSDIR}/Xmodem/libzmodem.a
LUA= ../deps/lua/liblua.a B64:= ${DEPSDIR}/libb64-1.2/src/libb64.a
ODOORS= ../deps/odoors/libs-`uname -s`/libODoors.a LUA:= ${DEPSDIR}/lua/liblua.a
JSMN= ../deps/jsmn/libjsmn.a ODOORS:= ${DEPSDIR}/odoors/libs-${OS}/libODoors.a
CDK= ../deps/cdk-5-20161210/libcdk.a JSMN:= ${DEPSDIR}/jsmn/libjsmn.a
UUID= ../deps/libuuid/.libs/libuuid.a CDK:= ${DEPSDIR}/cdk-5-20161210/libcdk.a
UUID:= ${DEPSDIR}/libuuid/.libs/libuuid.a
all: magicka magimail magiedit ticproc mgpost magichat \ all: magicka magimail magiedit ticproc mgpost magichat \
filecenter dosbox_shim magiftpd reset_pass filecenter dosbox_shim magiftpd reset_pass
${LUA}: ${LUA}:
cd ../deps/lua && $(MAKE) -f Makefile ${DEPS_LUA_TARGET} MAKEFLAGS= cd ${DEPSDIR}/lua && ${MAKE} -f Makefile ${DEPS_LUA_TARGET} MAKEFLAGS= CC=${CC}
${JAMLIB}: ${JAMLIB}:
cd ../deps/jamlib && $(MAKE) -f ${DEPS_JAMLIB_MAKEFILE} MAKEFLAGS= cd ${DEPSDIR}/jamlib && ${MAKE} -f ${DEPS_JAMLIB_MAKEFILE} MAKEFLAGS=
${ZMODEM}: ${ZMODEM}:
cd ../deps/Xmodem && $(MAKE) MAKEFLAGS= cd ${DEPSDIR}/Xmodem && ${MAKE} MAKEFLAGS= CC=${CC}
${B64}:
cd ${DEPSDIR}/libb64-1.2 && ${MAKE} MAKEFLAGS= CC=${CC}
${ODOORS}: ${ODOORS}:
cd ../deps/odoors/ && $(MAKE) cd ${DEPSDIR}/odoors/ && ${MAKE} CC=${CC}
$(JSMN): ${JSMN}:
cd ../deps/jsmn/ && $(MAKE) cd ${DEPSDIR}/jsmn/ && ${MAKE} CC=${CC}
$(CDK): ${CDK}:
cd ../deps/cdk-5.0-20161210/ && export CPPFLAGS=$(INCDIRS) && ./configure --with-ncurses cd ${DEPSDIR}/cdk-5.0-20161210/ && ./configure --with-ncurses && ${MAKE} CC=${CC}
cd ../deps/cdk-5.0-20161210/ && $(MAKE)
$(UUID): ${UUID}:
rm ../deps/libuuid/ltmain.sh ../deps/libuuid/libtool || true rm ${DEPSDIR}/libuuid/ltmain.sh ${DEPSDIR}/libuuid/libtool || true
cd ../deps/libuuid/ && libtoolize cd ${DEPSDIR}/libuuid/ && libtoolize
cd ../deps/libuuid/ && autoreconf cd ${DEPSDIR}/libuuid/ && autoreconf
cd ../deps/libuuid/ && ./configure cd ${DEPSDIR}/libuuid/ && ./configure
cd ../deps/libuuid/ && $(MAKE) cd ${DEPSDIR}/libuuid/ && ${MAKE} CC=${CC}
HDRS:= bbs.h HDRS:= bbs.h
OBJ:= inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o \ OBJS:= 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 \ 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 \ lua_glue.o strings.o bluewave.o hashmap/hashmap.o menus.o \
nodelist.o blog.o nodelist.o blog.o
%.o: %.c $(HDRS) WWWOBJS:= ../deps/aha/aha.o ../deps/hashids/hashids.o www.o www_email.o \
$(CC) -c -o $@ $< $(CFLAGS) www_msgs.o www_last10.o www_blog.o www_files.o ${OBJS}
magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} ${UUID} ifeq ($(MAKECMDGOALS), www)
$(CC) -o ../magicka $^ $(LIBS) CFLAGS+= ${CFLAGS} -I${DEPSDIR}/libb64-1.2/include -DENABLE_WWW=1
endif
%.o: %.c ${HDRS}
${CC} -c -o $@ $< ${CFLAGS}
www: ${OBJS} ${WWWOBJS} ${LUA} ${ZMODEM} ${B64} ${JAMLIB} ${JSMN} ${UUID}
${CC} -o ../magicka $^ ${LIBS} -lmicrohttpd
magicka: ${OBJS} ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} ${UUID}
${CC} -o ../magicka $^ ${LIBS}
MAGIEDIT_MAKEFILE?= Makefile magiedit: ${ODOORS}
cd ${UTILSDIR}/magiedit && ${MAKE}
magiedit: $(ODOORS) magimail: ${JAMLIB}
cd ../utils/magiedit && $(MAKE) -f ${MAGIEDIT_MAKEFILE} cd ${UTILSDIR}/magimail && ${MAKE}
magimail: $(JAMLIB)
cd ../utils/magimail && $(MAKE) $(MAGIMAIL_TARGET)
ticproc: ticproc:
cd ../utils/ticproc && $(MAKE) cd ${UTILSDIR}/ticproc && ${MAKE}
mgpost: $(JAMLIB) mgpost: ${JAMLIB}
cd ../utils/mgpost && $(MAKE) cd ${UTILSDIR}/mgpost && ${MAKE}
MAGICHAT_MAKEFILE?= Makefile magichat: ${JSMN}
cd ${UTILSDIR}/magichat && ${MAKE}
magichat: $(JSMN) filecenter: ${CDK}
cd ../utils/magichat && $(MAKE) -f ${MAGICHAT_MAKEFILE} cd ${UTILSDIR}/filecenter && ${MAKE}
filecenter: $(CDK)
cd ../utils/filecenter && $(MAKE)
dosbox_shim: dosbox_shim:
cd ../utils/dosbox_shim && $(MAKE) cd ${UTILSDIR}/dosbox_shim && ${MAKE}
magiftpd: magiftpd:
cd ../utils/magiftpd && $(MAKE) cd ${UTILSDIR}/magiftpd && ${MAKE}
reset_pass: reset_pass:
cd ../utils/reset_pass && $(MAKE) cd ${UTILSDIR}/reset_pass && ${MAKE}
.PHONY: clean .PHONY: clean
clean: clean:
rm -f $(OBJ) ../magicka rm -f ${OBJS} ${WWWOBJS} ../magicka
cd ../deps/lua && $(MAKE) clean cd ${DEPSDIR}/lua && ${MAKE} clean
cd ../deps/jamlib && $(MAKE) -f Makefile.linux clean cd ${DEPSDIR}/jamlib && ${MAKE} -f ${DEPS_JAMLIB_MAKEFILE} clean
cd ../deps/Xmodem && $(MAKE) clean cd ${DEPSDIR}/Xmodem && ${MAKE} clean
cd ../utils/magimail && $(MAKE) cleanfreebsd cd ${UTILSDIR}/magimail && ${MAKE} clean
cd ../utils/magiedit && $(MAKE) clean cd ${UTILSDIR}/magiedit && ${MAKE} clean
cd ../deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` cd ${DEPSDIR}/odoors && rm -rf libs-${OS} objs-${OS} exe-${OS}
cd ../utils/ticproc && $(MAKE) clean cd ${UTILSDIR}/ticproc && ${MAKE} clean
cd ../utils/mgpost && $(MAKE) clean cd ${UTILSDIR}/mgpost && ${MAKE} clean
cd ../utils/magichat && $(MAKE) clean cd ${UTILSDIR}/magichat && ${MAKE} clean
cd ../deps/cdk-5.0-20161210 && $(MAKE) clean cd ${DEPSDIR}/libb64-1.2 && ${MAKE} clean
cd ../utils/filecenter && $(MAKE) clean cd ${DEPSDIR}/cdk-5.0-20161210 && ${MAKE} clean
cd ../utils/magiftpd && $(MAKE) clean cd ${UTILSDIR}/filecenter && ${MAKE} clean
cd ../utils/reset_pass && $(MAKE) clean cd ${UTILSDIR}/magiftpd && ${MAKE} clean
cd ../utils/dosbox_shim && $(MAKE) clean cd ${UTILSDIR}/reset_pass && ${MAKE} clean
cd ${UTILSDIR}/dosbox_shim && ${MAKE} clean

View File

@ -4,6 +4,5 @@ LIBS:= -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv -lmo
DEPS_LUA_TARGET:= freebsd DEPS_LUA_TARGET:= freebsd
DEPS_JAMLIB_MAKEFILE:= Makefile.linux DEPS_JAMLIB_MAKEFILE:= Makefile.linux
MAGIMAIL_TARGET:= freebsd
include GNUmakefile.common include GNUmakefile.common

View File

@ -1,97 +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
UUID = ../deps/libuuid/.libs/libuuid.a
all: magicka magimail magiedit ticproc mgpost magichat filecenter dosbox_shim magiftpd reset_pass
${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)
$(UUID):
rm ../deps/libuuid/ltmain.sh ../deps/libuuid/libtool || true
cd ../deps/libuuid/ && libtoolize
cd ../deps/libuuid/ && autoreconf
cd ../deps/libuuid/ && ./configure
cd ../deps/libuuid/ && $(MAKE)
OBJ = ../deps/aha/aha.o ../deps/hashids/hashids.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 www_blog.o www_files.o hashmap/hashmap.o menus.o nodelist.o blog.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} ${UUID}
$(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv -lmosquitto $(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)
filecenter: $(CDK)
cd ../utils/filecenter && $(MAKE)
dosbox_shim:
cd ../utils/dosbox_shim && $(MAKE)
magiftpd:
cd ../utils/magiftpd && $(MAKE)
reset_pass:
cd ../utils/reset_pass && $(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/filecenter && $(MAKE) clean
cd ../utils/magiftpd && $(MAKE) clean
cd ../utils/reset_pass && $(MAKE) clean
cd ../utils/dosbox_shim && $(MAKE) clean

View File

@ -4,6 +4,5 @@ LIBS:= -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -lmosqu
DEPS_LUA_TARGET:= linux DEPS_LUA_TARGET:= linux
DEPS_JAMLIB_MAKEFILE:= Makefile.linux DEPS_JAMLIB_MAKEFILE:= Makefile.linux
MAGIMAIL_TARGET:= freebsd
include GNUmakefile.common include GNUmakefile.common

View File

@ -1,97 +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
UUID = ../deps/libuuid/.libs/libuuid.a
all: magicka magimail magiedit ticproc mgpost magichat filecenter dosbox_shim magiftpd reset_pass
${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)
$(UUID):
rm ../deps/libuuid/ltmain.sh ../deps/libuuid/libtool || true
cd ../deps/libuuid/ && libtoolize
cd ../deps/libuuid/ && autoreconf
cd ../deps/libuuid/ && ./configure
cd ../deps/libuuid/ && $(MAKE)
OBJ = ../deps/aha/aha.o ../deps/hashids/hashids.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 www_blog.o www_files.o bluewave.o hashmap/hashmap.o menus.o nodelist.o blog.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${B64} ${JSMN} ${UUID}
$(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -lmosquitto $(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)
filecenter: $(CDK)
cd ../utils/filecenter && $(MAKE)
dosbox_shim:
cd ../utils/dosbox_shim && $(MAKE)
magiftpd:
cd ../utils/magiftpd && $(MAKE)
reset_pass:
cd ../utils/reset_pass && $(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/filecenter && $(MAKE) clean
cd ../utils/magiftpd && $(MAKE) clean
cd ../utils/reset_pass && $(MAKE) clean
cd ../utils/dosbox_shim && $(MAKE) clean

View File

@ -4,6 +4,5 @@ LIBS:= -R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh
DEPS_LUA_TARGET:= bsd DEPS_LUA_TARGET:= bsd
DEPS_JAMLIB_MAKEFILE:= Makefile.linux DEPS_JAMLIB_MAKEFILE:= Makefile.linux
MAGIMAIL_TARGET:= freebsd
include GNUmakefile.common include GNUmakefile.common

View File

@ -1,97 +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
UUID = ../deps/libuuid/.libs/libuuid.a
all: magicka magimail magiedit ticproc mgpost magichat filecenter dosbox_shim magiftpd reset_pass
${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)
$(UUID):
rm ../deps/libuuid/ltmain.sh ../deps/libuuid/libtool || true
cd ../deps/libuuid/ && libtoolize
cd ../deps/libuuid/ && autoreconf
cd ../deps/libuuid/ && ./configure
cd ../deps/libuuid/ && $(MAKE)
OBJ = ../deps/aha/aha.o ../deps/hashids/hashids.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 www_files.o www_blog.o hashmap/hashmap.o menus.o nodelist.o blog.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} ${UUID}
$(CC) -o ../magicka $^ $(CFLAGS) -R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv -lmosquitto $(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)
filecenter: $(CDK)
cd ../utils/filecenter && $(MAKE)
dosbox_shim:
cd ../utils/dosbox_shim && $(MAKE)
magiftpd:
cd ../utils/magiftpd && $(MAKE)
reset_pass:
cd ../utils/reset_pass && $(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/filecenter && $(MAKE) clean
cd ../utils/magiftpd && $(MAKE) clean
cd ../utils/reset_pass && $(MAKE) clean
cd ../utils/dosbox_shim && $(MAKE) clean

View File

@ -4,6 +4,5 @@ LIBS:= -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv -lmo
DEPS_LUA_TARGET:= bsd DEPS_LUA_TARGET:= bsd
DEPS_JAMLIB_MAKEFILE:= Makefile.linux DEPS_JAMLIB_MAKEFILE:= Makefile.linux
MAGIMAIL_TARGET:= freebsd
include GNUmakefile.common include GNUmakefile.common

View File

@ -1,97 +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
UUID = ../deps/libuuid/.libs/libuuid.a
all: magicka magimail magiedit ticproc mgpost magichat filecenter dosbox_shim magiftpd reset_pass
${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/local/include && ./configure --with-ncurses
cd ../deps/cdk-5.0-20161210/ && $(MAKE)
$(UUID):
rm ../deps/libuuid/ltmain.sh ../deps/libuuid/libtool || true
cd ../deps/libuuid/ && libtoolize
cd ../deps/libuuid/ && autoreconf
cd ../deps/libuuid/ && ./configure
cd ../deps/libuuid/ && $(MAKE)
OBJ = ../deps/aha/aha.o ../deps/hashids/hashids.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 www_files.o www_blog.o hashmap/hashmap.o menus.o nodelist.o blog.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} ${UUID}
$(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv -lmosquitto $(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)
filecenter: $(CDK)
cd ../utils/filecenter && $(MAKE)
dosbox_shim:
cd ../utils/dosbox_shim && $(MAKE)
magiftpd:
cd ../utils/magiftpd && $(MAKE)
reset_pass:
cd ../utils/reset_pass && $(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/filecenter && $(MAKE) clean
cd ../utils/magiftpd && $(MAKE) clean
cd ../utils/reset_pass && $(MAKE) clean
cd ../utils/dosbox_shim && $(MAKE) clean

View File

@ -4,6 +4,5 @@ LIBS:= -L/opt/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -liconv
DEPS_LUA_TARGET:= macosx DEPS_LUA_TARGET:= macosx
DEPS_JAMLIB_MAKEFILE:= Makefile.linux DEPS_JAMLIB_MAKEFILE:= Makefile.linux
MAGIMAIL_TARGET:= linux
include GNUmakefile.common include GNUmakefile.common

View File

@ -1,96 +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
UUID = ../deps/libuuid/.libs/libuuid.a
all: magicka magimail magiedit ticproc mgpost magichat filecenter dosbox_shim magiftpd reset_pass
${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)
$(UUID):
rm ../deps/libuuid/ltmain.sh ../deps/libuuid/libtool || true
cd ../deps/libuuid/ && glibtoolize
cd ../deps/libuuid/ && autoreconf
cd ../deps/libuuid/ && ./configure
cd ../deps/libuuid/ && $(MAKE)
OBJ = ../deps/aha/aha.o ../deps/hashids/hashids.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 www_files.o www_blog.o bluewave.o hashmap/hashmap.o menus.o nodelist.o blog.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${B64} ${JSMN} ${UUID}
$(CC) -o ../magicka $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -liconv -lmosquitto $(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)
filecenter: $(CDK)
cd ../utils/filecenter && $(MAKE)
dosbox_shim:
cd ../utils/dosbox_shim && $(MAKE)
magiftpd:
cd ../utils/magiftpd && $(MAKE)
reset_pass:
cd ../utils/reset_pass && $(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/filecenter && $(MAKE) clean
cd ../utils/magiftpd && $(MAKE) clean
cd ../utils/reset_pass && $(MAKE) clean
cd ../utils/dosbox_shim && $(MAKE) clean

View File

@ -4,8 +4,5 @@ LIBS:= -L/usr/local/lib -lsqlite3 -lm -ldl -lssl -lcrypto -lssh -lmosquitto -l
DEPS_LUA_TARGET:= solaris DEPS_LUA_TARGET:= solaris
DEPS_JAMLIB_MAKEFILE:= Makefile.sunos DEPS_JAMLIB_MAKEFILE:= Makefile.sunos
MAGIMAIL_TARGET:= freebsd
MAGIEDIT_MAKEFILE:= Makefile.sunos
MAGICHAT_MAKEFILE:= Makefile.sunos
include GNUmakefile.common include GNUmakefile.common

View File

@ -1,97 +0,0 @@
CC=gcc
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
UUID = ../deps/libuuid/.libs/libuuid.a
all: magicka magimail magiedit ticproc mgpost magichat filecenter magiftpd reset_pass
${LUA}:
cd ../deps/lua && $(MAKE) -f Makefile solaris MAKEFLAGS=
${JAMLIB}:
cd ../deps/jamlib && $(MAKE) -f Makefile.sunos MAKEFLAGS=
${ZMODEM}:
cd ../deps/Xmodem && $(MAKE) MAKEFLAGS=
${B64}:
cd ../deps/libb64-1.2 && $(MAKE) MAKEFLAGS= CC=gcc
${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)
$(UUID):
rm ../deps/libuuid/ltmain.sh ../deps/libuuid/libtool || true
cd ../deps/libuuid/ && libtoolize
cd ../deps/libuuid/ && autoreconf
cd ../deps/libuuid/ && ./configure
cd ../deps/libuuid/ && $(MAKE)
OBJ = ../deps/aha/aha.o ../deps/hashids/hashids.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 www_files.o www_blog.o hashmap/hashmap.o menus.o os/sunos.o nodelist.o blog.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${B64} ${JSMN} ${UUID}
$(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lm -ldl -lssl -lcrypto -lssh -lmosquitto $(MICROHTTPD) -lnsl -lsocket
magimail: $(JAMLIB)
cd ../utils/magimail && $(MAKE) freebsd
magiedit: $(ODOORS)
cd ../utils/magiedit && $(MAKE) -f Makefile.sunos
ticproc:
cd ../utils/ticproc && $(MAKE)
mgpost: $(JAMLIB)
cd ../utils/mgpost && $(MAKE)
magichat: $(JSMN)
cd ../utils/magichat && $(MAKE) -f Makefile.sunos
filecenter: $(CDK)
cd ../utils/filecenter && $(MAKE)
dosbox_shim:
cd ../utils/dosbox_shim && $(MAKE)
magiftpd:
cd ../utils/magiftpd && $(MAKE)
reset_pass:
cd ../utils/reset_pass && $(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/filecenter && $(MAKE) clean
cd ../utils/magiftpd && $(MAKE) clean
cd ../utils/reset_pass && $(MAKE) clean
cd ../utils/dosbox_shim && $(MAKE) clean

View File

@ -3,6 +3,11 @@ CC=cc
DEPS = main.c DEPS = main.c
OBJ = main.o OBJ = main.o
OS = $(shell uname -s)
ifeq ($(OS), SunOS)
EXTRA_LIBS = -lsocket
endif
%.o: %.c $(DEPS) %.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS) $(CC) -c -o $@ $< $(CFLAGS)
@ -14,7 +19,7 @@ $(JSMN):
cd ../../deps/jsmn/ && $(MAKE) cd ../../deps/jsmn/ && $(MAKE)
magichat: $(OBJ) $(JSMN) magichat: $(OBJ) $(JSMN)
$(CC) -o magichat -o $@ $^ $(CFLAGS) $(LDFLAGS) $(CC) -o magichat -o $@ $^ $(LDFLAGS) $(EXTRA_LIBS)
.PHONY: clean .PHONY: clean

View File

@ -1,22 +0,0 @@
CC=cc
DEPS = main.c
OBJ = main.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
JSMN = ../../deps/jsmn/libjsmn.a
all: magichat
$(JSMN):
cd ../../deps/jsmn/ && $(MAKE)
magichat: $(OBJ) $(JSMN)
$(CC) -o magichat -o $@ $^ $(CFLAGS) $(LDFLAGS) -lsocket
.PHONY: clean
clean:
rm -f $(OBJ) magichat

View File

@ -1,7 +1,12 @@
CC=cc CC=cc
CFLAGS=-I../../deps/odoors/ CFLAGS=-I../../deps/odoors/
DEPS = main.c DEPS = main.c
ODOORS = ../../deps/odoors/libs-`uname -s`/libODoors.a OS = $(shell uname -s)
ODOORS = ../../deps/odoors/libs-${OS}/libODoors.a
ifeq ($(OS), SunOS)
EXTRA_LIBS = -lsocket
endif
OBJ = main.o OBJ = main.o
@ -14,7 +19,7 @@ ${ODOORS}:
$(CC) -c -o $@ $< $(CFLAGS) $(CC) -c -o $@ $< $(CFLAGS)
magiedit: $(OBJ) $(ODOORS) magiedit: $(OBJ) $(ODOORS)
$(CC) -o magiedit -o $@ $^ $(CFLAGS) $(ODOORS) $(CC) -o magiedit -o $@ $^ $(CFLAGS) $(ODOORS) $(EXTRA_LIBS)
.PHONY: clean .PHONY: clean

View File

@ -1,22 +0,0 @@
CC=cc
CFLAGS=-I../../deps/odoors/
DEPS = main.c
ODOORS = ../../deps/odoors/libs-`uname -s`/libODoors.a
OBJ = main.o
all: magiedit
${ODOORS}:
cd ../../deps/odoors && $(MAKE) MAKEFLAGS=
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magiedit: $(OBJ) $(ODOORS)
$(CC) -o magiedit -o $@ $^ $(CFLAGS) $(ODOORS) -lsocket
.PHONY: clean
clean:
rm -f $(OBJ) magiedit