Attached is a preliminary patch for Linux. Perhaps some of these changes can
be merged into nmh's autoconf-generated scripts. (Please inspect the patch
even if you don't use Linux; some of these patches are generally useful).
Here's the procedure I went through to compile and install it:
setenv CFLAGS -O3
./configure --bindir=/usr/bin/nmh --sysconfdir=/usr/lib/nmh
--libdir=/usr/lib/nmh --mandir=/usr/man
patch -p1 < /path/to/nmh.diff
make
make install
cd /usr/bin/nmh
strip *
chown root.mail inc
chmod 2711 inc
cd /usr/lib/nmh
strip *
ldconfig -v
diff -u --recursive nmh-0.22/Makefile nmh-0.22-shared/Makefile
--- nmh-0.22/Makefile Mon Feb 16 06:34:57 1998
+++ nmh-0.22-shared/Makefile Mon Feb 16 03:06:26 1998
@@ -38,10 +38,10 @@
mailspool = /var/spool/mail
# location of mail transport agent
-sendmailpath = /usr/lib/sendmail
+sendmailpath = /usr/sbin/sendmail
# default editor
-default_editor = /usr/bin/vi
+default_editor = /bin/vi
# default pager
default_pager = /bin/more
@@ -57,7 +57,7 @@
# flags passed to recursive makes in subdirectories
MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
-CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
+CFLAGS='$(CFLAGS)' \
prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
diff -u --recursive nmh-0.22/config/Makefile nmh-0.22-shared/config/Makefile
--- nmh-0.22/config/Makefile Mon Feb 16 06:34:58 1998
+++ nmh-0.22-shared/config/Makefile Mon Feb 16 02:46:51 1998
@@ -19,7 +19,7 @@
libdir = /usr/lib/nmh
etcdir = /usr/lib/nmh
-default_editor = /usr/bin/vi
+default_editor = /bin/vi
default_pager = /bin/more
CC = gcc
diff -u --recursive nmh-0.22/config.h nmh-0.22-shared/config.h
--- nmh-0.22/config.h Mon Feb 16 06:34:04 1998
+++ nmh-0.22-shared/config.h Mon Feb 16 04:27:59 1998
@@ -30,7 +30,7 @@
/*
* Linux
*/
-/* #define LINUX_STDIO 1 */
+#define LINUX_STDIO 1
/*
* FreeBSD 2.x
@@ -60,7 +60,7 @@
* group and add the setgid bit to `inc' manually after
* installation.
*/
-/* #define MAILGROUP 1 */
+#define MAILGROUP 1
/*
* Turn on locale (setlocale) support
@@ -73,10 +73,10 @@
* other programs which may modify your maildrops.
* Currently you can only use one type.
*/
-#define DOT_LOCKING 1
+/* #define DOT_LOCKING 1 */
/* #define FCNTL_LOCKING 1 */
/* #define LOCKF_LOCKING 1 */
-/* #define FLOCK_LOCKING 1 */
+#define FLOCK_LOCKING 1
/*
* If you have defined DOT_LOCKING, then the default is to
@@ -85,13 +85,13 @@
* can specify that all lock files go in a specific directory.
* Don't define this unless you know you need it.
*/
-/* #define LOCKDIR "/usr/spool/locks" */
+#define LOCKDIR "/var/lock"
/*
* Define this if your passwords are stored in some type of
* distributed name service, such as NIS, or NIS+.
*/
-#define DBMPWD 1
+/* #define DBMPWD 1 */
/*
* Directs nmh not to try and rewrite addresses
@@ -134,7 +134,7 @@
* that nmh will use. Make sure this is defined in your
* /etc/services file (or its NIS/NIS+ eqivalent).
*/
-#define POPSERVICE "pop3"
+#define POPSERVICE "pop-3"
/*
* Define the default creation modes for folders and messages.
@@ -299,7 +299,7 @@
/* #undef HAVE_SIGRELSE */
/* Define if you have the sigsetjmp function. */
-/* #undef HAVE_SIGSETJMP */
+#define HAVE_SIGSETJMP 1
/* Define if you have the sigsetmask function. */
#define HAVE_SIGSETMASK 1
diff -u --recursive nmh-0.22/man/Makefile nmh-0.22-shared/man/Makefile
--- nmh-0.22/man/Makefile Mon Feb 16 06:35:04 1998
+++ nmh-0.22-shared/man/Makefile Mon Feb 16 03:06:17 1998
@@ -23,9 +23,9 @@
manext8 = 8
mailspool = /var/spool/mail
-sendmailpath = /usr/lib/sendmail
+sendmailpath = /usr/sbin/sendmail
-default_editor = /usr/bin/vi
+default_editor = /bin/vi
default_pager = /bin/more
INSTALL = /usr/bin/install -c
diff -u --recursive nmh-0.22/mts/Makefile nmh-0.22-shared/mts/Makefile
--- nmh-0.22/mts/Makefile Mon Feb 16 06:35:02 1998
+++ nmh-0.22-shared/mts/Makefile Mon Feb 16 06:16:57 1998
@@ -31,7 +31,15 @@
# ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
-all install uninstall:
+all uninstall:
+ for subdir in $(MTS); do \
+ (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
+ done
+
+install:
+ install -m 644 libmts.a /usr/lib
+ install libmts.so.0.22.0 /usr/lib
+ (cd /usr/lib && ln -sf libmts.so.0.22.0 libmts.so.0 && ln -sf
libmts.so.0 libmts.so)
for subdir in $(MTS); do \
(cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
done
@@ -48,7 +56,7 @@
rm -f *~
clean-local: mostlyclean-local
- rm -f libmts.a
+ rm -f libmts.a libmts.so.0.22.0 libmts.so.0 libmts.so
distclean-local: clean-local
rm -f Makefile
diff -u --recursive nmh-0.22/mts/sendmail/Makefile
nmh-0.22-shared/mts/sendmail/Makefile
--- nmh-0.22/mts/sendmail/Makefile Mon Feb 16 06:35:03 1998
+++ nmh-0.22-shared/mts/sendmail/Makefile Mon Feb 16 05:55:32 1998
@@ -18,28 +18,33 @@
CC = gcc
CFLAGS = -O3
+SFLAGS = -fPIC
DEFS = -DHAVE_CONFIG_H
INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
-LN = ln
+LN = ln -f
LORDER = echo
TSORT = cat
RANLIB = ranlib
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
-.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .os
.c.o:
$(COMPILE) $<
+.c.os:
+ $(COMPILE) $(SFLAGS) $< -o $@
+
# source
SRCS = hosts.c sendmail.c
# object files in libsend.a
OBJS = hosts.o sendmail.o
+SOBJS = hosts.os sendmail.os
+
# auxiliary files
AUX = Makefile.in
@@ -48,15 +53,23 @@
# ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
-all: libsend.a
+all: libsend.a libmts.so.0.22.0
rm -f ../libmts.a
$(LN) libsend.a ../libmts.a
+ $(LN) libmts.so.0.22.0 ../libmts.so.0.22.0
+ (cd .. && ln -sf libmts.so.0.22.0 libmts.so.0 && ln -sf libmts.so.0
libmts.so)
libsend.a: $(OBJS)
rm -f $@
ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)`
$(RANLIB) $@
+libmts.so.0.22.0: $(SOBJS)
+ rm -f $@
+ gcc -shared -Wl,-soname,libmts.so.0 -o libmts.so.0.22.0 $(SOBJS)
+ ln -sf libmts.so.0.22.0 libmts.so.0
+ ln -sf libmts.so.0 libmts.so
+
install:
uninstall:
@@ -64,10 +77,10 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
mostlyclean:
- rm -f *.o *~
+ rm -f *.o *.os *~
clean: mostlyclean
- rm -f libsend.a
+ rm -f libsend.a libmts.so.0.22.0 libmts.so.0 libmts.so
distclean: clean
rm -f Makefile
diff -u --recursive nmh-0.22/mts/smtp/Makefile nmh-0.22-shared/mts/smtp/Makefile
--- nmh-0.22/mts/smtp/Makefile Mon Feb 16 06:35:02 1998
+++ nmh-0.22-shared/mts/smtp/Makefile Mon Feb 16 05:55:50 1998
@@ -18,22 +18,25 @@
CC = gcc
CFLAGS = -O3
+SFLAGS = -fPIC
DEFS = -DHAVE_CONFIG_H
INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
-LN = ln
+LN = ln -f
LORDER = echo
TSORT = cat
RANLIB = ranlib
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
-.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .os
.c.o:
$(COMPILE) $<
+.c.os:
+ $(COMPILE) $(SFLAGS) $< -o $@
+
# header files
HDRS = smtp.h
@@ -43,6 +46,8 @@
# object files in libsmtp.a
OBJS = hosts.o smtp.o
+SOBJS = hosts.os smtp.os
+
# auxiliary files
AUX = Makefile.in
@@ -51,15 +56,23 @@
# ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
-all: libsmtp.a
+all: libsmtp.a libmts.so.0.22.0
rm -f ../libmts.a
$(LN) libsmtp.a ../libmts.a
+ $(LN) libmts.so.0.22.0 ../libmts.so.0.22.0
+ (cd .. && ln -sf libmts.so.0.22.0 libmts.so.0 && ln -sf libmts.so.0
libmts.so)
libsmtp.a: $(OBJS)
rm -f $@
ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)`
$(RANLIB) $@
+libmts.so.0.22.0: $(SOBJS)
+ rm -f $@
+ gcc -shared -Wl,-soname,libmts.so.0 -o libmts.so.0.22.0 $(SOBJS)
+ ln -sf libmts.so.0.22.0 libmts.so.0
+ ln -sf libmts.so.0 libmts.so
+
install:
uninstall:
@@ -67,10 +80,10 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
mostlyclean:
- rm -f *.o *~
+ rm -f *.o *.os *~
clean: mostlyclean
- rm -f libsmtp.a
+ rm -f libsmtp.a libmts.so.0.22.0 libmts.so.0 libmts.so
distclean: clean
rm -f Makefile
diff -u --recursive nmh-0.22/sbr/Makefile nmh-0.22-shared/sbr/Makefile
--- nmh-0.22/sbr/Makefile Mon Feb 16 06:34:58 1998
+++ nmh-0.22-shared/sbr/Makefile Mon Feb 16 06:18:03 1998
@@ -12,6 +12,7 @@
CC = gcc
CFLAGS = -O3
+SFLAGS = -fPIC
DEFS = -DHAVE_CONFIG_H
INCLUDES = -I.. -I. -I$(top_srcdir)
@@ -24,12 +25,14 @@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
-.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .os
.c.o:
$(COMPILE) $<
+.c.os:
+ $(COMPILE) $(SFLAGS) $< -o $@
+
# this header file is parsed to generate signal messages (sigmsg.h)
SIGNAL_H = /usr/include/asm/signal.h
@@ -74,6 +77,25 @@
trimcpy.o uprf.o vfgets.o fmt_def.o m_msgdef.o \
$(LIBOBJS)
+SOBJS = add.os addrsbr.os ambigsw.os atooi.os brkstring.os
check_charset.os \
+ closefds.os concat.os context_del.os context_find.os context_foil.os \
+ context_read.os context_replace.os context_save.os copy.os \
+ copyip.os cpydata.os cpydgst.os discard.os done.os error.os \
+ fdcompare.os folder_addmsg.os folder_delmsgs.os folder_free.os \
+ folder_pack.os folder_read.os folder_realloc.os gans.os \
+ getans.os getanswer.os getcpy.os getfolder.os fmt_addr.os \
+ fmt_compile.os fmt_new.os fmt_rfc2047.os fmt_scan.os lock_file.os \
+ m_atoi.os m_backup.os m_convert.os m_draft.os m_getfld.os m_gmprot.os \
+ m_maildir.os m_name.os m_readefs.os m_scratch.os m_tmpfil.os makedir.os
\
+ path.os peekc.os pidwait.os pidstatus.os print_help.os \
+ print_sw.os print_version.os push.os putenv.os pwd.os refile.os \
+ remdir.os r1bindex.os seq_add.os seq_bits.os seq_del.os \
+ seq_getnum.os seq_list.os seq_nameok.os seq_print.os seq_read.os \
+ seq_save.os seq_setcur.os seq_setprev.os seq_setunseen.os showfile.os \
+ signals.os smatch.os snprintb.os ssequal.os strcasecmp.os strindex.os \
+ trimcpy.os uprf.os vfgets.os fmt_def.os m_msgdef.os \
+ $(LIBOBJS)
+
# auxiliary files
AUX = Makefile.in sigmsg.awk
@@ -83,29 +105,40 @@
# ========= DEPENDENCIES FOR BUILDING ==========
# default target
-all: libmh.a
+all: libnmh.so.0.22.0 libnmh.a
sigmsg.h: sigmsg.awk
$(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
pidstatus.o: sigmsg.h
-libmh.a: $(OBJS)
- rm -f libmh.a
- ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT)`
- $(RANLIB) libmh.a
+pidstatus.os: sigmsg.h
+
+libnmh.a: $(OBJS)
+ rm -f libnmh.a
+ ar cr libnmh.a `$(LORDER) $(OBJS) | $(TSORT)`
+ $(RANLIB) libnmh.a
+
+libnmh.so.0.22.0: $(SOBJS)
+ rm -f libnmh.so.0.22.0
+ gcc -shared -Wl,-soname,libnmh.so.0 -o libnmh.so.0.22.0 $(SOBJS)
+ ln -sf libnmh.so.0.22.0 libnmh.so.0
+ ln -sf libnmh.so.0 libnmh.so
install:
+ install -m 644 libnmh.a /usr/lib
+ install libnmh.so.0.22.0 /usr/lib
+ (cd /usr/lib && ln -sf libnmh.so.0.22.0 libnmh.so.0 && ln -sf
libnmh.so.0 libnmh.so)
uninstall:
# ========== DEPENDENCIES FOR CLEANUP ==========
mostlyclean:
- rm -f *.o *~
+ rm -f *.o *.os *~
clean: mostlyclean
- rm -f libmh.a sigmsg.h
+ rm -f libnmh.so.0.22.0 libnmh.so.0 libnmh.so libmh.a sigmsg.h
distclean: clean
rm -f Makefile
diff -u --recursive nmh-0.22/support/general/mhn.defaults.sh
nmh-0.22-shared/support/general/mhn.defaults.sh
--- nmh-0.22/support/general/mhn.defaults.sh Mon Jan 6 03:10:17 1997
+++ nmh-0.22-shared/support/general/mhn.defaults.sh Mon Feb 16 06:20:24 1998
@@ -19,7 +19,7 @@
if [ -n "$2" ]; then
SEARCHPROG=$2
else
- SEARCHPROG="mhn.find.sh"
+ SEARCHPROG="./mhn.find.sh"
fi
# put output into a temporary file, so we
diff -u --recursive nmh-0.22/uip/Makefile nmh-0.22-shared/uip/Makefile
--- nmh-0.22/uip/Makefile Mon Feb 16 06:34:59 1998
+++ nmh-0.22-shared/uip/Makefile Mon Feb 16 06:09:34 1998
@@ -20,10 +20,10 @@
CFLAGS = -O3
DEFS = -DHAVE_CONFIG_H
INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)
-LDFLAGS =
+LDFLAGS = -L../sbr -L../mts -L../zotnet
-LIBS =
-LOCALLIBS = ../config/version.o ../config/config.o ../sbr/libmh.a
../mts/libmts.a ../zotnet/libzot.a
+LIBS = -lnmh -lmts -lzot
+LOCALLIBS = ../config/version.o ../config/config.o
LINKLIBS = $(LOCALLIBS) $(LIBS)
TERMLIB = -ltermcap
@@ -196,7 +196,7 @@
$(LINK) show.o mhlsbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
slocal: slocal.o aliasbr.o dropsbr.o $(LOCALLIBS)
- $(LINK) slocal.o aliasbr.o dropsbr.o $(LINKLIBS)
+ $(LINK) slocal.o aliasbr.o dropsbr.o $(LINKLIBS) -ldb
sortm: sortm.o $(LOCALLIBS)
$(LINK) sortm.o $(LINKLIBS)
@@ -230,11 +230,7 @@
- rm -f $(bindir)/flists
- rm -f $(bindir)/folders
- rm -f $(bindir)/prev
- rm -f $(bindir)/next
- $(LN) $(bindir)/flist $(bindir)/flists
- $(LN) $(bindir)/folder $(bindir)/folders
- $(LN) $(bindir)/show $(bindir)/prev
- $(LN) $(bindir)/show $(bindir)/next
+ (cd $(bindir) && $(LN) -sf flist flists)
+ (cd $(bindir) && $(LN) -sf folder folders)
+ (cd $(bindir) && $(LN) -sf show prev)
+ (cd $(bindir) && $(LN) -sf show next)
# install misc support binaries
install-misc:
diff -u --recursive nmh-0.22/zotnet/Makefile nmh-0.22-shared/zotnet/Makefile
--- nmh-0.22/zotnet/Makefile Mon Feb 16 06:34:59 1998
+++ nmh-0.22-shared/zotnet/Makefile Mon Feb 16 06:14:39 1998
@@ -27,6 +27,11 @@
mf/mf.o \
bboards/getbbent.o
+SOBJS = mts/mts.os mts/client.os \
+ tws/dtime.os tws/dtimep.os tws/lexstring.os \
+ mf/mf.os \
+ bboards/getbbent.os
+
# auxiliary files
AUX = Makefile.in
@@ -38,19 +43,28 @@
# ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
-all: all-recursive libzot.a
+all: all-recursive libzot.so.0.22.0 libzot.a
libzot.a: $(OBJS)
rm -f libzot.a
ar cr libzot.a `$(LORDER) $(OBJS) | $(TSORT)`
$(RANLIB) libzot.a
+libzot.so.0.22.0: $(SOBJS)
+ rm -f libzot.so.0.22.0
+ gcc -shared -Wl,-soname,libzot.so.0 -o libzot.so.0.22.0 $(SOBJS)
+ ln -sf libzot.so.0.22.0 libzot.so.0
+ ln -sf libzot.so.0 libzot.so
+
all-recursive:
for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
done
install uninstall:
+ install -m 644 libzot.a /usr/lib
+ install libzot.so.0.22.0 /usr/lib
+ (cd /usr/lib && ln -sf libzot.so.0.22.0 libzot.so.0 && ln -sf
libzot.so.0 libzot.so)
for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
done
@@ -67,7 +81,7 @@
rm -f *~
clean-local: mostlyclean-local
- rm -f libzot.a
+ rm -f libzot.so.0.22.0 libzot.so.0 libzot.so libzot.a
distclean-local: clean-local
rm -f Makefile
diff -u --recursive nmh-0.22/zotnet/bboards/Makefile
nmh-0.22-shared/zotnet/bboards/Makefile
--- nmh-0.22/zotnet/bboards/Makefile Mon Feb 16 06:35:01 1998
+++ nmh-0.22-shared/zotnet/bboards/Makefile Mon Feb 16 05:30:10 1998
@@ -12,17 +12,20 @@
CC = gcc
CFLAGS = -O3
+SFLAGS = -fPIC
DEFS = -DHAVE_CONFIG_H
INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
-.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .os
.c.o:
$(COMPILE) $<
+.c.os:
+ $(COMPILE) $(SFLAGS) $< -o $@
+
# header files
HDRS = bboards.h
@@ -32,6 +35,8 @@
# object files
OBJS = getbbent.o
+SOBJS = getbbent.os
+
# auxiliary files
AUX = Makefile.in
@@ -40,7 +45,7 @@
# ========= DEPENDENCIES FOR BUILDING ==========
-all: $(OBJS)
+all: $(OBJS) $(SOBJS)
install:
@@ -49,7 +54,7 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
mostlyclean:
- rm -f *.o *~
+ rm -f *.o *.os *~
clean: mostlyclean
diff -u --recursive nmh-0.22/zotnet/mf/Makefile
nmh-0.22-shared/zotnet/mf/Makefile
--- nmh-0.22/zotnet/mf/Makefile Mon Feb 16 06:35:00 1998
+++ nmh-0.22-shared/zotnet/mf/Makefile Mon Feb 16 05:28:27 1998
@@ -12,17 +12,20 @@
CC = gcc
CFLAGS = -O3
+SFLAGS = -fPIC
DEFS = -DHAVE_CONFIG_H
INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
-.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .os
.c.o:
$(COMPILE) $<
+.c.os:
+ $(COMPILE) $(SFLAGS) $< -o $@
+
# header files
HDRS = mf.h
@@ -32,6 +35,8 @@
# object files
OBJS = mf.o
+SOBJS = mf.os
+
# auxiliary files
AUX = Makefile.in
@@ -40,7 +45,7 @@
# ========= DEPENDENCIES FOR BUILDING ==========
-all: $(OBJS)
+all: $(OBJS) $(SOBJS)
install:
@@ -49,7 +54,7 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
mostlyclean:
- rm -f *.o *~
+ rm -f *.o *.os *~
clean: mostlyclean
diff -u --recursive nmh-0.22/zotnet/mts/Makefile
nmh-0.22-shared/zotnet/mts/Makefile
--- nmh-0.22/zotnet/mts/Makefile Mon Feb 16 06:35:00 1998
+++ nmh-0.22-shared/zotnet/mts/Makefile Mon Feb 16 05:25:56 1998
@@ -17,13 +17,14 @@
etcdir = /usr/lib/nmh
mailspool = /var/spool/mail
-sendmailpath = /usr/lib/sendmail
+sendmailpath = /usr/sbin/sendmail
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
CC = gcc
CFLAGS = -O3
+SFLAGS = -fPIC
DEFS = -DHAVE_CONFIG_H
INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
CONFIGDEFS = -DNMHETCDIR='"$(etcdir)"' -DMAILSPOOL='"$(mailspool)"'
-DSENDMAILPATH='"$(sendmailpath)"'
@@ -33,12 +34,14 @@
SED = sed
-.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .os
.c.o:
$(COMPILE) $<
+.c.os:
+ $(COMPILE) $(SFLAGS) $< -o $@
+
# header files
HDRS = mts.h
@@ -48,6 +51,8 @@
# object files
OBJS = mts.o client.o
+SOBJS = mts.os client.os
+
# auxiliary files
AUX = Makefile.in mts.conf.in
@@ -56,11 +61,14 @@
# ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
-all: $(OBJS) mts.conf
+all: $(OBJS) $(SOBJS) mts.conf
mts.o: mts.c
$(COMPILE2) $<
+mts.os: mts.c
+ $(COMPILE2) $(SFLAGS) $< -o $@
+
mts.conf:
$(SED) -e 's,%mailspool%,$(mailspool),' \
-e 's,%etcdir%,$(etcdir),' < $(srcdir)/mts.conf.in > $@
@@ -80,7 +88,7 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
mostlyclean:
- rm -f *.o *~
+ rm -f *.o *.os *~
clean: mostlyclean
rm -f mts.conf
diff -u --recursive nmh-0.22/zotnet/tws/Makefile
nmh-0.22-shared/zotnet/tws/Makefile
--- nmh-0.22/zotnet/tws/Makefile Mon Feb 16 06:35:00 1998
+++ nmh-0.22-shared/zotnet/tws/Makefile Mon Feb 16 05:20:55 1998
@@ -12,6 +12,7 @@
CC = gcc
CFLAGS = -O3
+SFLAGS = -fPIC
DEFS = -DHAVE_CONFIG_H
INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
@@ -22,12 +23,14 @@
LEX = lex
SED = sed
-.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .os
.c.o:
$(COMPILE) $<
+.c.os:
+ $(COMPILE) $(SFLAGS) $< -o $@
+
# header files
HDRS = tws.h
@@ -37,6 +40,8 @@
# object files
OBJS = dtimep.o dtime.o lexstring.o
+SOBJS = dtimep.os dtime.os lexstring.os
+
# auxiliary files
AUX = Makefile.in dtimep.lex lexedit.sed dtimep.c-lexed
@@ -45,7 +50,7 @@
# ========= DEPENDENCIES FOR BUILDING ==========
-all: $(OBJS)
+all: $(OBJS) $(SOBJS)
# This will bomb if lex is really flex, so check
# file and use pre-generated version if necessary
@@ -70,7 +75,7 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
mostlyclean:
- rm -f *.o *~
+ rm -f *.o *.os *~
clean: mostlyclean
rm -f dtimep.c
--
John GOTTS <jgotts(_at_)engin(_dot_)umich(_dot_)edu>
http://www-personal.engin.umich.edu/~jgotts