2 # Makefile for sbr subdirectory
7 top_srcdir = @top_srcdir@
12 exec_prefix = @exec_prefix@
20 CONFIGDEFS = -DNMHETCDIR='"$(etcdir)"' -DMAILSPOOL='"$(mailspool)"' -DSENDMAILPATH='"$(sendmailpath)"'
21 INCLUDES = -I.. -I. -I$(top_srcdir) @CPPFLAGS@
29 GNU_LIBTOOL = @GNU_LIBTOOL@
31 LINTFLAGS = @LINTFLAGS@
33 mailspool = @mailspool@
34 sendmailpath = @sendmailpath@
36 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
37 COMPILE2 = $(CC) -c $(DEFS) $(CONFIGDEFS) $(INCLUDES) $(CFLAGS)
47 # this header file is parsed to generate signal messages (sigmsg.h)
50 # source for library functions
51 SRCS = addrsbr.c ambigsw.c atooi.c brkstring.c \
52 check_charset.c client.c closefds.c concat.c context_del.c \
53 context_find.c context_foil.c context_read.c \
54 context_replace.c context_save.c copy.c \
55 copyip.c cpydata.c cpydgst.c crawl_folders.c \
56 discard.c done.c dtime.c dtimep.c \
57 error.c ext_hook.c fdcompare.c folder_addmsg.c folder_delmsgs.c \
58 folder_free.c folder_pack.c folder_read.c \
59 folder_realloc.c gans.c getans.c getanswer.c \
60 getarguments.c getcpy.c getfolder.c getpass.c \
61 fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c \
62 fmt_scan.c lock_file.c m_atoi.c m_backup.c \
63 m_convert.c m_draft.c m_getfld.c m_gmprot.c \
64 m_maildir.c m_name.c \
65 makedir.c mts.c norm_charmap.c \
66 path.c peekc.c pidwait.c pidstatus.c \
67 print_help.c print_sw.c print_version.c push.c \
68 putenv.c refile.c remdir.c r1bindex.c \
69 readconfig.c ruserpass.c seq_add.c seq_bits.c \
70 seq_del.c seq_getnum.c seq_list.c seq_nameok.c \
71 seq_print.c seq_read.c seq_save.c seq_setcur.c \
72 seq_setprev.c seq_setunseen.c showfile.c signals.c \
73 smatch.c snprintb.c ssequal.c strcasecmp.c \
74 strindex.c trimcpy.c uprf.c vfgets.c fmt_def.c \
75 m_msgdef.c mf.c utils.c m_mktemp.c
80 AUX = Makefile.in sigmsg.awk dtimep.lex
82 # all files in this directory included in the distribution
85 # ========= DEPENDENCIES FOR BUILDING ==========
91 $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
94 $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
96 # Note that not all lexes support -o (it is not POSIX); also
97 # some lexes will only accept '-n -t', not '-nt'.
98 # Also, not all makes accept $< in non-pattern rules,
99 # hence the explicit filenames here.
101 $(LEX) -n -t $(srcdir)/dtimep.lex > dtimep.c
104 $(COMPILE2) $(srcdir)/client.c
107 $(COMPILE2) $(srcdir)/mts.c
109 pidstatus.o: sigmsg.h
113 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
114 $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
116 ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT) 2>/dev/null` ; \
117 $(RANLIB) libmh.a ; \
124 # ========== DEPENDENCIES FOR CLEANUP ==========
130 rm -f libmh.a sigmsg.h dtimep.c
137 superclean: realclean
139 # ========== DEPENDENCIES FOR MAINTENANCE ==========
143 Makefile: Makefile.in ../config.status
144 cd .. && ./config.status $(subdir)/$@
146 distdir = ../`cat ../distname`/$(subdir)
148 @echo "Copying distribution files in $(subdir)"
149 @for file in $(DIST); do \
150 cp -p $(srcdir)/$$file $(distdir); \