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