1fba08744a315068584c34c6bc0547bc8164c5dc
[mmh] / 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 CC       = @CC@
14 CFLAGS   = @CFLAGS@
15 DEFS     = @DEFS@
16 INCLUDES = -I.. -I. -I$(top_srcdir)
17
18 AWK    = @AWK@
19 LORDER = @LORDER@
20 TSORT  = @TSORT@
21 RANLIB = @RANLIB@
22 LIBTOOL = @LIBTOOL@
23 GNU_LIBTOOL = @GNU_LIBTOOL@
24
25 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
26
27 .SUFFIXES:
28 .SUFFIXES: .c .o
29
30 .c.o:
31         $(COMPILE) $<
32
33 # this header file is parsed to generate signal messages (sigmsg.h)
34 SIGNAL_H = @SIGNAL_H@
35
36 # source for library functions
37 SRCS = add.c addrsbr.c ambigsw.c atooi.c brkstring.c            \
38         check_charset.c closefds.c concat.c context_del.c       \
39         context_find.c context_foil.c context_read.c            \
40         context_replace.c context_save.c copy.c                 \
41         copyip.c cpydata.c cpydgst.c discard.c done.c           \
42         error.c fdcompare.c folder_addmsg.c folder_delmsgs.c    \
43         folder_free.c folder_pack.c folder_read.c               \
44         folder_realloc.c gans.c getans.c getanswer.c            \
45         getarguments.c getcpy.c getfolder.c getpass.c           \
46         fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c        \
47         fmt_scan.c lock_file.c m_atoi.c m_backup.c              \
48         m_convert.c m_draft.c m_getfld.c m_gmprot.c             \
49         m_maildir.c m_name.c m_scratch.c m_tmpfil.c             \
50         makedir.c path.c peekc.c pidwait.c pidstatus.c          \
51         print_help.c print_sw.c print_version.c push.c          \
52         putenv.c pwd.c refile.c remdir.c r1bindex.c             \
53         readconfig.c ruserpass.c seq_add.c seq_bits.c           \
54         seq_del.c seq_getnum.c seq_list.c seq_nameok.c          \
55         seq_print.c seq_read.c seq_save.c seq_setcur.c          \
56         seq_setprev.c seq_setunseen.c showfile.c signals.c      \
57         smatch.c snprintb.c ssequal.c strcasecmp.c              \
58         strindex.c trimcpy.c uprf.c vfgets.c fmt_def.c          \
59         m_msgdef.c
60
61 # source for compatibility functions
62 COMPAT = snprintf.c strdup.c strerror.c
63
64 OBJS =  $(patsubst %.c,%.o,$(SRCS))
65
66 # auxiliary files
67 AUX = Makefile.in sigmsg.awk
68
69 # all files in this directory included in the distribution
70 DIST = $(SRCS) $(COMPAT) $(AUX)
71
72 # ========= DEPENDENCIES FOR BUILDING ==========
73
74 # default target
75 all: libmh.a
76
77 sigmsg.h: sigmsg.awk
78         $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
79
80 pidstatus.o: sigmsg.h
81
82 libmh.a: $(OBJS)
83         rm -f $@
84         if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
85           $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
86         else \
87           ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT)`  ; \
88           $(RANLIB) libmh.a  ; \
89         fi
90
91 install:
92
93 uninstall:
94
95 # ========== DEPENDENCIES FOR CLEANUP ==========
96
97 mostlyclean:
98         rm -f *.o *~
99
100 clean: mostlyclean
101         rm -f libmh.a sigmsg.h
102
103 distclean: clean
104         rm -f Makefile
105
106 realclean: distclean
107
108 superclean: realclean
109
110 # ========== DEPENDENCIES FOR MAINTENANCE ==========
111
112 subdir = sbr
113
114 Makefile: Makefile.in ../config.status
115         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
116  
117 distdir = ../`cat ../distname`/$(subdir)
118 nmhdist: $(DIST)
119         @echo "Copying distribution files in $(subdir)"
120         @for file in $(DIST); do \
121           cp -p $(srcdir)/$$file $(distdir); \
122         done
123