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