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@
35 mailspool = @mailspool@
36 sendmailpath = @sendmailpath@
38 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
39 COMPILE2 = $(CC) -c $(DEFS) $(CONFIGDEFS) $(INCLUDES) $(CFLAGS)
49 # this header file is parsed to generate signal messages (sigmsg.h)
52 # source for library functions
53 SRCS = addrsbr.c ambigsw.c atooi.c brkstring.c \
54 check_charset.c client.c closefds.c concat.c context_del.c \
55 context_find.c context_foil.c context_read.c \
56 context_replace.c context_save.c copy.c \
57 copyip.c cpydata.c cpydgst.c crawl_folders.c \
58 discard.c done.c dtime.c dtimep.c \
59 error.c ext_hook.c fdcompare.c folder_addmsg.c folder_delmsgs.c \
60 folder_free.c folder_pack.c folder_read.c \
61 folder_realloc.c gans.c getans.c getanswer.c \
62 getarguments.c getcpy.c getfolder.c getpass.c \
63 fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c \
64 fmt_scan.c lock_file.c m_atoi.c m_backup.c \
65 m_convert.c m_draft.c m_getfld.c m_gmprot.c \
66 m_maildir.c m_name.c m_scratch.c m_tmpfil.c \
67 makedir.c mts.c norm_charmap.c \
68 path.c peekc.c pidwait.c pidstatus.c \
69 print_help.c print_sw.c print_version.c push.c \
70 putenv.c refile.c remdir.c r1bindex.c \
71 readconfig.c ruserpass.c seq_add.c seq_bits.c \
72 seq_del.c seq_getnum.c seq_list.c seq_nameok.c \
73 seq_print.c seq_read.c seq_save.c seq_setcur.c \
74 seq_setprev.c seq_setunseen.c showfile.c signals.c \
75 smatch.c snprintb.c ssequal.c strcasecmp.c \
76 strindex.c trimcpy.c uprf.c vfgets.c fmt_def.c \
77 m_msgdef.c mf.c utils.c m_mktemp.c
79 # source for compatibility functions
80 COMPAT = memmove.c snprintf.c strdup.c strerror.c
82 OBJS = $(SRCS:.c=.o) $(LIBOBJS)
85 AUX = Makefile.in sigmsg.awk dtimep.lex
87 # all files in this directory included in the distribution
88 DIST = $(SRCS) $(COMPAT) $(AUX)
90 # ========= DEPENDENCIES FOR BUILDING ==========
96 $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
99 $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
101 # Note that not all lexes support -o (it is not POSIX); also
102 # some lexes will only accept '-n -t', not '-nt'.
103 # Also, not all makes accept $< in non-pattern rules,
104 # hence the explicit filenames here.
106 $(LEX) -n -t $(srcdir)/dtimep.lex > dtimep.c
109 $(COMPILE2) $(srcdir)/client.c
112 $(COMPILE2) $(srcdir)/mts.c
114 pidstatus.o: sigmsg.h
118 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
119 $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
121 ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT) 2>/dev/null` ; \
122 $(RANLIB) libmh.a ; \
129 # ========== DEPENDENCIES FOR CLEANUP ==========
135 rm -f libmh.a sigmsg.h dtimep.c
142 superclean: realclean
144 # ========== DEPENDENCIES FOR MAINTENANCE ==========
148 Makefile: Makefile.in ../config.status
149 cd .. && ./config.status $(subdir)/$@
151 distdir = ../`cat ../distname`/$(subdir)
153 @echo "Copying distribution files in $(subdir)"
154 @for file in $(DIST); do \
155 cp -p $(srcdir)/$$file $(distdir); \