2 # Makefile for sbr subdirectory
7 top_srcdir = @top_srcdir@
12 exec_prefix = @exec_prefix@
20 # add include dir . for sigmsg.h when building in different directory
21 INCLUDES = -I$(top_srcdir) -I. @CPPFLAGS@
29 GNU_LIBTOOL = @GNU_LIBTOOL@
31 LINTFLAGS = @LINTFLAGS@
33 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
43 # this header file is parsed to generate signal messages (sigmsg.h)
46 # source for library functions
47 SRCS = addrsbr.c ambigsw.c brkstring.c \
48 charset.c concat.c context_del.c \
49 context_find.c context_read.c \
50 context_replace.c context_save.c \
51 cpydata.c cpydgst.c crawl_folders.c \
52 discard.c done.c dtime.c dtimep.c \
53 error.c ext_hook.c folder_addmsg.c folder_delmsgs.c \
54 folder_free.c folder_read.c \
55 folder_realloc.c gans.c getans.c getanswer.c \
56 getarguments.c getcpy.c \
57 fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c \
58 fmt_scan.c lock_file.c m_atoi.c \
59 m_convert.c m_draft.c m_getfld.c m_gmprot.c \
61 makedir.c mts.c norm_charmap.c \
62 path.c pidwait.c pidstatus.c \
63 print_help.c print_sw.c print_version.c \
64 putenv.c mhbasename.c \
65 readconfig.c seq_add.c seq_bits.c \
66 seq_del.c seq_getnum.c seq_list.c seq_nameok.c \
67 seq_print.c seq_read.c seq_save.c seq_setcur.c \
68 seq_setprev.c seq_setunseen.c signals.c \
69 smatch.c snprintb.c strcasecmp.c \
70 strindex.c trim.c trimcpy.c uprf.c vfgets.c fmt_def.c \
71 mf.c utils.c m_mktemp.c seq_msgstats.c
76 AUX = Makefile.in sigmsg.awk dtimep.lex
78 # all files in this directory included in the distribution
81 # ========= DEPENDENCIES FOR BUILDING ==========
87 $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
90 $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
92 # Note that not all lexes support -o (it is not POSIX); also
93 # some lexes will only accept '-n -t', not '-nt'.
94 # Also, not all makes accept $< in non-pattern rules,
95 # hence the explicit filenames here.
97 $(LEX) -n -t $(srcdir)/dtimep.lex > $@
103 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
104 $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
106 ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT) 2>/dev/null` ; \
107 $(RANLIB) libmh.a ; \
114 # ========== DEPENDENCIES FOR CLEANUP ==========
120 rm -f libmh.a sigmsg.h dtimep.c
127 superclean: realclean
129 # ========== DEPENDENCIES FOR MAINTENANCE ==========
133 Makefile: Makefile.in ../config.status
134 cd .. && ./config.status $(subdir)/$@
136 distdir = ../`cat ../distname`/$(subdir)
138 @echo "Copying distribution files in $(subdir)"
139 @for file in $(DIST); do \
140 cp -p $(srcdir)/$$file $(distdir); \