]> diplodocus.org Git - nmh/blob - sbr/Makefile.in
Bring these changes over from the branch.
[nmh] / sbr / Makefile.in
1 #
2 # Makefile for sbr subdirectory
3 #
4 # $Id$
5 #
6
7 SHELL = /bin/sh
8
9 top_srcdir = @top_srcdir@
10 srcdir = @srcdir@
11 VPATH = @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 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)
26
27 LEX = @LEX@
28 AWK = @AWK@
29 LORDER = @LORDER@
30 TSORT = @TSORT@
31 RANLIB = @RANLIB@
32 LIBTOOL = @LIBTOOL@
33 GNU_LIBTOOL = @GNU_LIBTOOL@
34 LINT = @LINT@
35 LINTFLAGS = @LINTFLAGS@
36
37 mailspool = @mailspool@
38 sendmailpath = @sendmailpath@
39
40 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
41 COMPILE2 = $(CC) -c $(DEFS) $(CONFIGDEFS) $(INCLUDES) $(KRB4_INCLUDES) $(HESIOD_INCLUDES) $(CFLAGS)
42
43
44
45 .SUFFIXES:
46 .SUFFIXES: .c .o
47
48 .c.o:
49 $(COMPILE) $<
50
51 # this header file is parsed to generate signal messages (sigmsg.h)
52 SIGNAL_H = @SIGNAL_H@
53
54 # source for library functions
55 SRCS = add.c addrsbr.c ambigsw.c atooi.c brkstring.c \
56 check_charset.c client.c closefds.c concat.c context_del.c \
57 context_find.c context_foil.c context_read.c \
58 context_replace.c context_save.c copy.c \
59 copyip.c cpydata.c cpydgst.c discard.c done.c dtime.c dtimep.c \
60 error.c fdcompare.c folder_addmsg.c folder_delmsgs.c \
61 folder_free.c folder_pack.c folder_read.c \
62 folder_realloc.c gans.c getans.c getanswer.c \
63 getarguments.c getcpy.c getfolder.c getpass.c \
64 fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c \
65 fmt_scan.c lock_file.c m_atoi.c m_backup.c \
66 m_convert.c m_draft.c m_getfld.c m_gmprot.c \
67 m_maildir.c m_name.c m_scratch.c m_tmpfil.c \
68 makedir.c mts.c path.c peekc.c pidwait.c pidstatus.c \
69 print_help.c print_sw.c print_version.c push.c \
70 putenv.c pwd.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
78
79 # source for compatibility functions
80 COMPAT = snprintf.c strdup.c strerror.c
81
82 OBJS = $(SRCS:.c=.o)
83
84 # auxiliary files
85 AUX = Makefile.in sigmsg.awk dtimep.lex
86
87 # all files in this directory included in the distribution
88 DIST = $(SRCS) $(COMPAT) $(AUX)
89
90 # ========= DEPENDENCIES FOR BUILDING ==========
91
92 # default target
93 all: libmh.a
94
95 sigmsg.h: sigmsg.awk
96 $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
97
98 lint: sigmsg.h
99 $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
100
101 dtimep.c: dtimep.lex
102 $(LEX) -nt $< > $@
103
104 client.o: client.c
105 $(COMPILE2) $<
106
107 mts.o: mts.c
108 $(COMPILE2) $<
109
110 pidstatus.o: sigmsg.h
111
112 libmh.a: $(OBJS)
113 rm -f $@
114 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
115 $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
116 else \
117 ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT)` ; \
118 $(RANLIB) libmh.a ; \
119 fi
120
121 install:
122
123 uninstall:
124
125 # ========== DEPENDENCIES FOR CLEANUP ==========
126
127 mostlyclean:
128 rm -f *.o *~
129
130 clean: mostlyclean
131 rm -f libmh.a sigmsg.h
132
133 distclean: clean
134 rm -f Makefile
135
136 realclean: distclean
137
138 superclean: realclean
139
140 # ========== DEPENDENCIES FOR MAINTENANCE ==========
141
142 subdir = sbr
143
144 Makefile: Makefile.in ../config.status
145 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
146
147 distdir = ../`cat ../distname`/$(subdir)
148 nmhdist: $(DIST)
149 @echo "Copying distribution files in $(subdir)"
150 @for file in $(DIST); do \
151 cp -p $(srcdir)/$$file $(distdir); \
152 done
153