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