Build the release tarball from git, not manually
[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 prefix      = @prefix@
12 exec_prefix = @exec_prefix@
13 bindir      = @bindir@
14 libdir      = @libdir@
15 etcdir      = @sysconfdir@
16
17 CC       = @CC@
18 CFLAGS   = @CFLAGS@
19 DEFS     = @DEFS@
20 # add include dir . for sigmsg.h and .. for config.h when building
21 # in different directory
22 INCLUDES = -I$(top_srcdir) -I. -I.. @CPPFLAGS@
23
24 LEX    = @LEX@
25 AWK    = @AWK@
26 LORDER = @LORDER@
27 TSORT  = @TSORT@
28 RANLIB = @RANLIB@
29 LIBTOOL = @LIBTOOL@
30 GNU_LIBTOOL = @GNU_LIBTOOL@
31 LINT    = @LINT@
32 LINTFLAGS = @LINTFLAGS@
33
34 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
35
36 LOCALLIBS = ../config/version.o ../config/config.o
37
38 .SUFFIXES:
39 .SUFFIXES: .c .o
40
41 .c.o:
42         $(COMPILE) $<
43
44 # this header file is parsed to generate signal messages (sigmsg.h)
45 SIGNAL_H = @SIGNAL_H@
46
47 # source for library functions
48 SRCS = addrsbr.c ambigsw.c brkstring.c  \
49         charset.c concat.c context_del.c  \
50         context_find.c context_read.c  \
51         context_replace.c context_save.c \
52         cpydata.c cpydgst.c crawl_folders.c  \
53         dtime.c dtimep.c  \
54         error.c execprog.c ext_hook.c folder_addmsg.c folder_delmsgs.c  \
55         folder_free.c folder_read.c  \
56         folder_realloc.c gans.c getans.c getanswer.c  \
57         getarguments.c getcpy.c \
58         fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c  \
59         fmt_scan.c lock_file.c m_atoi.c \
60         m_convert.c m_draft.c m_getfld.c m_gmprot.c  \
61         m_name.c \
62         makedir.c mts.c norm_charmap.c  \
63         path.c pidwait.c pidstatus.c  \
64         print_help.c print_sw.c print_version.c \
65         putenv.c mhbasename.c  \
66         readconfig.c seq_add.c seq_bits.c  \
67         seq_del.c seq_getnum.c seq_list.c seq_nameok.c  \
68         seq_print.c seq_read.c seq_save.c seq_setcur.c  \
69         seq_setprev.c seq_setunseen.c signals.c  \
70         smatch.c snprintb.c strcasecmp.c  \
71         strindex.c trim.c trimcpy.c uprf.c vfgets.c fmt_def.c  \
72         mf.c utils.c m_mktemp.c seq_msgstats.c \
73         unquote.c encode_rfc2047.c
74
75 OBJS =  $(SRCS:.c=.o)
76
77 # ========= DEPENDENCIES FOR BUILDING ==========
78
79 # default target
80 all: libmh.a
81
82 sigmsg.h: sigmsg.awk
83         $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
84
85 lint: sigmsg.h
86         $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
87
88 # Note that not all lexes support -o (it is not POSIX); also
89 # some lexes will only accept '-n -t', not '-nt'.
90 # Also, not all makes accept $< in non-pattern rules,
91 # hence the explicit filenames here.
92 dtimep.c: dtimep.lex
93         $(LEX) -n -t $(srcdir)/dtimep.lex > $@
94
95 pidstatus.o: sigmsg.h
96
97 libmh.a: $(OBJS) $(LOCALLIBS)
98         rm -f $@
99         if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
100           $(LIBTOOL) -static -c -o libmh.a $(OBJS) $(LOCALLIBS) ; \
101         else \
102           ar cr libmh.a `$(LORDER) $(OBJS) $(LOCALLIBS) | $(TSORT) 2>/dev/null`  ; \
103           $(RANLIB) libmh.a  ; \
104         fi
105
106 install:
107
108 uninstall:
109
110 # ========== DEPENDENCIES FOR CLEANUP ==========
111
112 mostlyclean:
113         rm -f *.o *~
114
115 clean: mostlyclean
116         rm -f libmh.a sigmsg.h dtimep.c
117
118 distclean: clean
119         rm -f Makefile
120
121 realclean: distclean
122
123 superclean: realclean
124
125 # ========== DEPENDENCIES FOR MAINTENANCE ==========
126
127 subdir = sbr
128
129 Makefile: Makefile.in ../config.status
130         cd .. && ./config.status $(subdir)/$@
131