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