Added charstring "class"
[mmh] / sbr / Makefile.in
1 #
2 # Makefile for sbr subdirectory
3 #
4
5 SHELL = /bin/sh
6
7 top_srcdir = @top_srcdir@
8 srcdir     = @srcdir@
9 VPATH      = @srcdir@
10
11 VERSION = `$(top_srcdir)/version.sh $(top_srcdir)`
12
13 prefix      = @prefix@
14 exec_prefix = @exec_prefix@
15 bindir      = @bindir@
16 libdir      = @libdir@
17 etcdir      = @sysconfdir@
18
19 CC       = @CC@
20 CFLAGS   = @CFLAGS@
21 DEFS     = @DEFS@
22 # add include dir . for sigmsg.h and .. for config.h when building
23 # in different directory
24 INCLUDES = -I$(top_srcdir) -I. -I.. @CPPFLAGS@
25
26 LEX    = @LEX@
27 AWK    = @AWK@
28 LORDER = @LORDER@
29 TSORT  = @TSORT@
30 RANLIB = @RANLIB@
31 LIBTOOL = @LIBTOOL@
32 GNU_LIBTOOL = @GNU_LIBTOOL@
33 LINT    = @LINT@
34 LINTFLAGS = @LINTFLAGS@
35
36 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
37
38 LOCALLIBS = ../config/config.o
39
40 .SUFFIXES:
41 .SUFFIXES: .c .o
42
43 .c.o:
44         $(COMPILE) $<
45
46 # this header file is parsed to generate signal messages (sigmsg.h)
47 SIGNAL_H = @SIGNAL_H@
48
49 # source for library functions
50 SRCS = addrsbr.c ambigsw.c brkstring.c  \
51         charset.c concat.c context_del.c  \
52         context_find.c context_read.c  \
53         context_replace.c context_save.c \
54         cpydata.c crawl_folders.c  \
55         charstring.c \
56         dtime.c dtimep.c  \
57         error.c execprog.c ext_hook.c folder_addmsg.c folder_delmsgs.c  \
58         folder_free.c folder_read.c  \
59         folder_realloc.c gans.c getans.c getanswer.c  \
60         getarguments.c \
61         fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c  \
62         fmt_scan.c lock_file.c m_atoi.c \
63         m_convert.c m_draft.c m_getfld2.c m_gmprot.c  \
64         m_name.c \
65         makedir.c mts.c norm_charmap.c  \
66         path.c pidwait.c pidstatus.c  \
67         print_help.c print_sw.c print_version.c \
68         putenv.c mhbasename.c  \
69         readconfig.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_setunseen.c signals.c  \
73         smatch.c snprintb.c strcasecmp.c  \
74         strindex.c trim.c trimcpy.c uprf.c vfgets.c fmt_def.c  \
75         mf.c utils.c m_mktemp.c seq_msgstats.c \
76         unquote.c encode_rfc2047.c parse_msgs.c \
77         getthreadid.c
78
79 OBJS =  $(SRCS:.c=.o)
80
81 # ========= DEPENDENCIES FOR BUILDING ==========
82
83 # default target
84 all: libmh.a
85
86 sigmsg.h: sigmsg.awk
87         $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
88
89 lint: sigmsg.h
90         $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
91
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.
96 dtimep.c: dtimep.lex
97         $(LEX) -n -t $(srcdir)/dtimep.lex > $@
98
99 pidstatus.o: sigmsg.h
100
101 libmh.a: $(OBJS) $(LOCALLIBS) version.c
102         rm -f $@
103         $(COMPILE) -DVERSION="\"$(VERSION)\"" -o version.o $(srcdir)/version.c
104         if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
105           $(LIBTOOL) -static -c -o libmh.a $(OBJS) $(LOCALLIBS) version.o; \
106         else \
107           ar cr libmh.a `$(LORDER) $(OBJS) $(LOCALLIBS) version.o | $(TSORT) 2>/dev/null`  ; \
108           $(RANLIB) libmh.a  ; \
109         fi
110         rm -f version.o
111
112 install:
113
114 uninstall:
115
116 # ========== DEPENDENCIES FOR CLEANUP ==========
117
118 mostlyclean:
119         rm -f *.o *~
120
121 clean: mostlyclean
122         rm -f libmh.a sigmsg.h
123
124 distclean: clean
125         rm -f Makefile dtimep.c
126
127 realclean: distclean
128
129 superclean: realclean
130
131 # ========== DEPENDENCIES FOR MAINTENANCE ==========
132
133 subdir = sbr
134
135 Makefile: Makefile.in ../config.status
136         cd .. && ./config.status $(subdir)/$@