######################################################################### # # 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., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # ======================================================================= ######################################################################### # Edit the following variables as required CC=cc CFLAGS=-fno-common -DHAS_STDINT_H -DHAS_INTTYPES_H -DUSE_GZIP_MBOX -DUSE_BZIP_MBOX CPPFLAGS= LDFLAGS= LIBS=-lz -lbz2 ####################################################################### # 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)/usr/local bindir=$(DESTDIR)/usr/local/bin mandir=$(DESTDIR)/usr/local/man man1dir=$(mandir)/man1 man5dir=$(mandir)/man5 infodir=$(DESTDIR)/usr/local/info docdir=$(DESTDIR)/usr/local/doc/mairix-0.21 ######################################################################### # 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