1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
#########################################################################
#
# mairix - message index builder and finder for maildir folders.
#
# Copyright (C) Richard P. Curnow 2002-2004,2006
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# =======================================================================
#########################################################################
# Edit the following variables as required
CC=@cc@
CFLAGS=@cflags@ @defs@
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
#######################################################################
# If you're generating a package, you may want to use
# make DESTDIR=temporary_dir install
# to get the software installed to a directory where you can create
# a tdl.tar.gz from it
DESTDIR=
#######################################################################
prefix=$(DESTDIR)@prefix@
bindir=$(DESTDIR)@bindir@
mandir=$(DESTDIR)@mandir@
man1dir=$(mandir)/man1
man5dir=$(mandir)/man5
infodir=$(DESTDIR)@infodir@
docdir=$(DESTDIR)@docdir@
#########################################################################
# Things below this point shouldn't need to be edited.
OBJ = mairix.o db.o rfc822.o tok.o hash.o dirscan.o writer.o \
reader.o search.o stats.o dates.o datescan.o mbox.o md5.o \
fromcheck.o glob.o dumper.o expandstr.o dotlock.o \
nvp.o nvpscan.o
all : mairix
mairix : $(OBJ)
$(CC) -o mairix $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS)
%.o : %.c memmac.h mairix.h reader.h Makefile
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
datescan.c datescan.h : datescan.nfa ./dfasyn/dfasyn
./dfasyn/dfasyn -o datescan.c -ho datescan.h -r datescan.report -v -u datescan.nfa
fromcheck.c fromcheck.h : fromcheck.nfa ./dfasyn/dfasyn
./dfasyn/dfasyn -o fromcheck.c -ho fromcheck.h -r fromcheck.report -v -u fromcheck.nfa
nvpscan.c nvpscan.h : nvp.nfa ./dfasyn/dfasyn
./dfasyn/dfasyn -o nvpscan.c -ho nvpscan.h -r nvpscan.report -v -u nvp.nfa
dates.o : datescan.h
mbox.o : fromcheck.h
nvp.o : nvpscan.h
version.h:
./mkversion
./dfasyn/dfasyn:
if [ -d dfasyn ]; then cd dfasyn ; make CC="$(CC)" CFLAGS="$(CFLAGS)" ; else echo "No dfasyn subdirectory?" ; exit 1 ; fi
clean:
-rm -f *~ *.o mairix *.s core
-rm -f mairix.cp mairix.fn mairix.aux mairix.log mairix.ky mairix.pg mairix.toc mairix.tp mairix.vr
-rm -f fromcheck.[ch] datescan.[ch]
-rm -f nvpscan.[ch]
if [ -d dfasyn ]; then cd dfasyn ; make clean ; fi
distclean: clean
-rm -f Makefile config.log
install:
[ -d $(prefix) ] || mkdir -p $(prefix)
[ -d $(bindir) ] || mkdir -p $(bindir)
[ -d $(mandir) ] || mkdir -p $(mandir)
[ -d $(man1dir) ] || mkdir -p $(man1dir)
[ -d $(man5dir) ] || mkdir -p $(man5dir)
cp -f mairix $(bindir)
chmod 555 $(bindir)/mairix
cp -f mairix.1 $(man1dir)
chmod 444 $(man1dir)/mairix.1
cp -f mairixrc.5 $(man5dir)
chmod 444 $(man5dir)/mairixrc.5
.PHONY : all install clean distclean
mairix.o : version.h
|