Magicka now builds and runs on SunOS

This commit is contained in:
Andrew Pamment 2017-10-20 07:27:58 +10:00
parent 83719955c1
commit 5543f94e01
21 changed files with 405 additions and 25 deletions

View File

@ -15,7 +15,9 @@ endif
ifeq ($(OS), Darwin) ifeq ($(OS), Darwin)
MAKEFILE=Makefile.osx MAKEFILE=Makefile.osx
endif endif
ifeq ($(OS), SunOS)
MAKEFILE=Makefile.sunos
endif
all: magicka all: magicka
.PHONY: magicka www clean cleanwww .PHONY: magicka www clean cleanwww

29
deps/jamlib/Makefile.sunos vendored Normal file
View File

@ -0,0 +1,29 @@
CC = gcc $(CPPFLAGS) $(CFLAGS) -D__LINUX__ $(LDFLAGS) -Wall
AR = ar -ru
RM = rm -f
OBJS = crc32.o mbase.o message.o lastread.o subpack.o structrw.o
jamlib.a : $(OBJS)
$(AR) jamlib.a $(OBJS)
crc32.o: crc32.c jam.h
$(CC) -c crc32.c -o crc32.o
mbase.o: mbase.c jam.h
$(CC) -c mbase.c -o mbase.o
message.o: message.c jam.h
$(CC) -c message.c -o message.o
lastread.o: lastread.c jam.h
$(CC) -c lastread.c -o lastread.o
subpack.o: subpack.c jam.h
$(CC) -c subpack.c -o subpack.o
structrw.o: structrw.c jam.h
$(CC) -c structrw.c -o structrw.o
clean:
$(RM) *.o *.a

3
deps/jamlib/mbase.c vendored
View File

@ -85,6 +85,9 @@
#if defined( __LINUX__ ) #if defined( __LINUX__ )
#include <sys/file.h> #include <sys/file.h>
#include <unistd.h> #include <unistd.h>
#ifdef __sun
#include <fcntl.h>
#endif
#endif #endif
#define OS_ERROR_OFFSET 10000 #define OS_ERROR_OFFSET 10000

View File

View File

12
deps/odoors/ODCom.c vendored
View File

@ -72,6 +72,9 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>
#ifdef __sun
#include <sys/filio.h>
#endif
#endif #endif
#include "ODCore.h" #include "ODCore.h"
#include "ODGen.h" #include "ODGen.h"
@ -1787,7 +1790,16 @@ no_fossil:
if (isatty(STDIN_FILENO)) { if (isatty(STDIN_FILENO)) {
tcgetattr(STDIN_FILENO,&tio_default); tcgetattr(STDIN_FILENO,&tio_default);
tio_raw = tio_default; tio_raw = tio_default;
#ifdef __sun
tio_raw.c_iflag &= ~(IMAXBEL|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
tio_raw.c_oflag &= ~OPOST;
tio_raw.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
tio_raw.c_cflag &= ~(CSIZE|PARENB);
tio_raw.c_cflag |= CS8;
#else
cfmakeraw(&tio_raw); cfmakeraw(&tio_raw);
#endif
tcsetattr(STDIN_FILENO,TCSANOW,&tio_raw); tcsetattr(STDIN_FILENO,TCSANOW,&tio_raw);
setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0);
} }

View File

@ -96,7 +96,7 @@
#define OD_DLL #define OD_DLL
#endif /* !OD_WIN32_STATIC */ #endif /* !OD_WIN32_STATIC */
#else /* !WIN32 */ #else /* !WIN32 */
#if defined(__unix__) || defined(__NetBSD__) || defined(__APPLE__) #if defined(__unix__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__sun)
#define ODPLAT_NIX #define ODPLAT_NIX
#undef ODPLAT_DOS #undef ODPLAT_DOS
#undef DIRSEP #undef DIRSEP

76
src/Makefile.sunos Normal file
View File

@ -0,0 +1,76 @@
CC=gcc
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 solaris MAKEFLAGS=
${JAMLIB}:
cd ../deps/jamlib && $(MAKE) -f Makefile.sunos 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 os/sunos.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN}
$(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lm -ldl -lssl -lcrypto -lssh -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
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

81
src/Makefile.sunos.WWW Normal file
View File

@ -0,0 +1,81 @@
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
all: magicka magimail magiedit ticproc mgpost magichat fileapprove magiftpd
${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)
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 os/sunos.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${B64} ${JSMN}
$(CC) -o ../magicka $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lm -ldl -lssl -lcrypto -lssh $(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
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

View File

@ -14,8 +14,10 @@
# include <pty.h> # include <pty.h>
#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
# include <util.h> # include <util.h>
#else #elif defined(__FreeBSD__)
# include <libutil.h> # include <libutil.h>
#elif defined(__sun)
# include "os/sunos.h"
#endif #endif
#include "bbs.h" #include "bbs.h"
#include "lua/lua.h" #include "lua/lua.h"

View File

@ -576,7 +576,12 @@ int do_upload(struct user_record *user, char *final_path) {
return 0; return 0;
} }
while ((dent = readdir(inb)) != NULL) { while ((dent = readdir(inb)) != NULL) {
#ifdef __sun
stat(dent->d_name, &s);
if (S_ISREG(s.st_mode)) {
#else
if (dent->d_type == DT_REG) { if (dent->d_type == DT_REG) {
#endif
snprintf(upload_command, 1024, "%s%s", upload_path, dent->d_name); snprintf(upload_command, 1024, "%s%s", upload_path, dent->d_name);
snprintf(upload_filename, 1024, "%s/%s", final_path, dent->d_name); snprintf(upload_filename, 1024, "%s/%s", final_path, dent->d_name);

View File

@ -13,7 +13,9 @@
#include "lua/lua.h" #include "lua/lua.h"
#include "lua/lualib.h" #include "lua/lualib.h"
#include "lua/lauxlib.h" #include "lua/lauxlib.h"
#ifdef __sun
#include "os/sunos.h"
#endif
extern struct bbs_config conf; extern struct bbs_config conf;
extern struct user_record *gUser; extern struct user_record *gUser;
extern int mynode; extern int mynode;
@ -24,8 +26,11 @@ time_t utc_to_local(time_t utc) {
localtime_r(&utc, &date_time); localtime_r(&utc, &date_time);
#ifdef __sun
local = utc + gmtoff(utc);
#else
local = utc + date_time.tm_gmtoff; local = utc + date_time.tm_gmtoff;
#endif
return local; return local;
} }

View File

@ -19,8 +19,10 @@
# include <pty.h> # include <pty.h>
#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
# include <util.h> # include <util.h>
#else #elif defined(__FreeBSD__)
# include <libutil.h> # include <libutil.h>
#elif defined(__sun)
# include "os/sunos.h"
#endif #endif
#if defined(ENABLE_WWW) #if defined(ENABLE_WWW)
# include <microhttpd.h> # include <microhttpd.h>

100
src/os/sunos.c Normal file
View File

@ -0,0 +1,100 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stropts.h>
#include <fcntl.h>
#include <termios.h>
#define TM_YEAR_ORIGIN 1900
int openpty(int *amaster, int *aslave, char *name, void *termp, void *winp) {
int ptm;
char *pname;
int pts;
ptm = open("/dev/ptmx", O_RDWR);
grantpt(ptm);
unlockpt(ptm);
pname = ptsname(ptm);
if (name != NULL) {
strcpy(name, pname);
}
pts = open(name, O_RDWR);
ioctl(pts, I_PUSH, "ptem");
ioctl(pts, I_PUSH, "ldterm");
ioctl(pts, I_PUSH, "ttcompat");
if (termp != NULL) {
tcsetattr(pts, TCSAFLUSH, termp);
}
if (winp != NULL) {
ioctl(pts, TIOCSWINSZ, winp);
}
*amaster = ptm;
*aslave = pts;
return 0;
}
int forkpty(int *amaster, char *name, void *termp, void *winp) {
int ptm;
char *pname;
int pts;
pid_t pid;
ptm = open("/dev/ptmx", O_RDWR);
grantpt(ptm);
unlockpt(ptm);
pname = ptsname(ptm);
if (name != NULL) {
strcpy(name, pname);
}
pts = open(name, O_RDWR);
ioctl(pts, I_PUSH, "ptem");
ioctl(pts, I_PUSH, "ldterm");
ioctl(pts, I_PUSH, "ttcompat");
if (termp != NULL) {
tcsetattr(pts, TCSAFLUSH, termp);
}
if (winp != NULL) {
ioctl(pts, TIOCSWINSZ, winp);
}
pid = fork();
if (!pid) {
close(ptm);
dup2(pts, 0);
dup2(pts, 1);
dup2(pts, 2);
close(pts);
} else {
*amaster = ptm;
}
return pid;
}
static long difftm(struct tm *a, struct tm *b) {
int ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
int by = b->tm_year + (TM_YEAR_ORIGIN - 1);
long days = (a->tm_yday - b->tm_yday + ((ay >> 2) - (by >> 2)) - (ay / 100 - by/100) + ((ay/100 >> 2) - (by / 100 >> 2)) + (long)(ay-by) * 365);
return (60 * (60 * (24 *days + (a->tm_hour - b->tm_hour)) + (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec));
}
long gmtoff(time_t value) {
struct tm gmt = *gmtime(&value);
return difftm(localtime(&value), &gmt);
}

8
src/os/sunos.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef __SUNOS_H
#define __SUNOS_H
extern int openpty(int *amaster, int *aslave, char *name, void *termp, void *winp);
extern int forkpty(int *amaster, char *name, void *termp, void *winp);
extern long gmtoff(time_t value);
#endif

View File

@ -4,9 +4,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#ifdef __FreeBSD__
#include <sys/stat.h> #include <sys/stat.h>
#endif
#include "bbs.h" #include "bbs.h"
#include "jamlib/jam.h" #include "jamlib/jam.h"

View File

@ -3,31 +3,34 @@ OS := $(shell uname -s)
ifeq ($(OS), FreeBSD) ifeq ($(OS), FreeBSD)
CC=cc CC=cc
CFLAGS=-I/usr/local/include CFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib LDFLAGS=-L/usr/local/lib -lsqlite3 -lncurses
endif endif
ifeq ($(OS), DragonFly) ifeq ($(OS), DragonFly)
CC=cc CC=cc
CFLAGS=-I/usr/local/include -I/usr/local/include/ncurses CFLAGS=-I/usr/local/include -I/usr/local/include/ncurses
LDFLAGS=-L/usr/local/lib LDFLAGS=-L/usr/local/lib -lsqlite3 -lncurses
endif endif
ifeq ($(OS), NetBSD) ifeq ($(OS), NetBSD)
CC=cc CC=cc
CFLAGS=-I/usr/pkg/include CFLAGS=-I/usr/pkg/include
LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lncurses
endif endif
ifeq ($(OS), Linux) ifeq ($(OS), Linux)
CC=gcc CC=gcc
CFLAGS= CFLAGS=
LDFLAGS= LDFLAGS=-lsqlite3 -lncurses
endif endif
ifeq ($(OS), Darwin) ifeq ($(OS), Darwin)
CC=cc CC=cc
CFLAGS= CFLAGS=
LDFLAGS= LDFLAGS=-lsqlite3 -lncurses
endif
ifeq ($(OS), SunOS)
CC=gcc
CFLAGS=
LDFLAGS=-lsqlite3 -lcurses
endif endif
CC=cc
DEPS = fileapprove.c DEPS = fileapprove.c
OBJ = fileapprove.o OBJ = fileapprove.o
@ -35,7 +38,7 @@ OBJ = fileapprove.o
$(CC) -c -o $@ $< $(CFLAGS) -I../../deps/cdk-5.0-20161210/include/ $(CC) -c -o $@ $< $(CFLAGS) -I../../deps/cdk-5.0-20161210/include/
fileapprove: $(OBJ) fileapprove: $(OBJ)
$(CC) -o fileapprove -o $@ $^ ../../deps/cdk-5.0-20161210/libcdk.a $(CFLAGS) $(LDFLAGS) -lsqlite3 -lncurses $(CC) -o fileapprove -o $@ $^ ../../deps/cdk-5.0-20161210/libcdk.a $(CFLAGS) $(LDFLAGS)
.PHONY: clean .PHONY: clean

View File

@ -0,0 +1,22 @@
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

@ -0,0 +1,22 @@
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

View File

@ -3,29 +3,33 @@ OS := $(shell uname -s)
ifeq ($(OS), FreeBSD) ifeq ($(OS), FreeBSD)
CC=cc CC=cc
CFLAGS=-I/usr/local/include CFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib LDFLAGS=-L/usr/local/lib -lsqlite3 -lcrypto
endif endif
ifeq ($(OS), DragonFly) ifeq ($(OS), DragonFly)
CC=cc CC=cc
CFLAGS=-I/usr/local/include CFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib LDFLAGS=-L/usr/local/lib -lsqlite3 -lcrypto
endif endif
ifeq ($(OS), NetBSD) ifeq ($(OS), NetBSD)
CC=cc CC=cc
CFLAGS=-I/usr/pkg/include CFLAGS=-I/usr/pkg/include
LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lcrypto
endif endif
ifeq ($(OS), Linux) ifeq ($(OS), Linux)
CC=gcc CC=gcc
CFLAGS= CFLAGS=
LDFLAGS= LDFLAGS=-lsqlite3 -lcrypto
endif endif
ifeq ($(OS), Darwin) ifeq ($(OS), Darwin)
CC=cc CC=cc
CFLAGS=-I/opt/local/include CFLAGS=-I/opt/local/include
LDFLAGS=-L/opt/local/lib LDFLAGS=-L/opt/local/lib -lsqlite3 -lcrypto
endif
ifeq ($(OS), SunOS)
CC=gcc
CFLAGS=
LDFLAGS=-lsqlite3 -lcrypto -lsocket -lnsl
endif endif
DEPS = magiftpd.c DEPS = magiftpd.c
@ -35,7 +39,7 @@ OBJ = magiftpd.o ../../src/inih/ini.o
magiftpd: $(OBJ) magiftpd: $(OBJ)
$(CC) -o magiftpd -o $@ $^ $(CFLAGS) $(LDFLAGS) -lsqlite3 -lcrypto $(CC) -o magiftpd $^ $(CFLAGS) $(LDFLAGS)
.PHONY: clean .PHONY: clean

View File

@ -39,6 +39,12 @@ MBOBJS = $(MBOBJS_MSG) $(MBOBJS_JAM) $(MBOBJS_SQ3)
DEFS = $(PLATFORMDEF) $(MBDEFS) $(NLDEFS) DEFS = $(PLATFORMDEF) $(MBDEFS) $(NLDEFS)
ifeq ($(OS), SunOS)
SLIBS = -lsocket -lnsl
else
SLIBS =
endif
# Commands # Commands
ifeq ($(OS), $(filter $(OS), FreeBSD DragonFly)) ifeq ($(OS), $(filter $(OS), FreeBSD DragonFly))
CC = cc $(CPPFLAGS) $(CFLAGS) $(DEFS) $(LDFLAGS) -L/usr/local/lib -I $(INCDIR) -I ../../../deps/ -I/usr/local/include -Wall CC = cc $(CPPFLAGS) $(CFLAGS) $(DEFS) $(LDFLAGS) -L/usr/local/lib -I $(INCDIR) -I ../../../deps/ -I/usr/local/include -Wall
@ -88,7 +94,7 @@ files : $(BINDIR)/magimail$(EXESUFFIX) \
$(BINDIR)/magilistout$(EXESUFFIX) $(BINDIR)/magilistout$(EXESUFFIX)
$(BINDIR)/magimail$(EXESUFFIX) : $(CMOBJS) $(SHOBJS) $(NLOBJS) $(MBOBJS) $(OSLIB) $(BINDIR)/magimail$(EXESUFFIX) : $(CMOBJS) $(SHOBJS) $(NLOBJS) $(MBOBJS) $(OSLIB)
$(CC) -o $(BINDIR)/magimail$(EXESUFFIX) $(CMOBJS) $(SHOBJS) $(NLOBJS) $(MBOBJS) $(OSLIB) -lsqlite3 $(CC) -o $(BINDIR)/magimail$(EXESUFFIX) $(CMOBJS) $(SHOBJS) $(NLOBJS) $(MBOBJS) $(OSLIB) -lsqlite3 $(SLIBS)
$(STRIP) $(BINDIR)/magimail$(EXESUFFIX) $(STRIP) $(BINDIR)/magimail$(EXESUFFIX)
$(BINDIR)/magistats$(EXESUFFIX) : tools/magistats.c $(SHOBJS) $(OSLIB) $(BINDIR)/magistats$(EXESUFFIX) : tools/magistats.c $(SHOBJS) $(OSLIB)