]> Pileus Git - ~andy/fetchmail/blob - Makefile.am
629858647d2c5fe5571cbba31981cf98d42f3353
[~andy/fetchmail] / Makefile.am
1 # Makefile for fetchmail
2
3 SUBDIRS=                m4 po
4
5 AM_CFLAGS=              @CEFLAGS@
6 AM_CPPFLAGS=            @CPFLAGS@
7 AM_LDFLAGS=             @LDEFLAGS@
8 ACLOCAL_AMFLAGS=        -I m4 -I m4-local
9 AM_YFLAGS=              -d
10 BUILT_SOURCES=          rcfile_y.h
11
12 bin_PROGRAMS=           fetchmail
13 dist_bin_SCRIPTS=       fetchmailconf
14 dist_noinst_SCRIPTS=    specgen.sh
15 dist_man1_MANS=         fetchmail.man fetchmailconf.man
16
17 # for gettext (used by fetchmail.c, NOT by GNU gettext)
18 localedir=              $(datadir)/locale
19 DEFS=                   @DEFS@ -DLOCALEDIR=\"$(localedir)\"
20
21 noinst_LIBRARIES=       libfm.a
22 libfm_a_SOURCES=        xmalloc.c base64.c rfc822.c report.c rfc2047e.c servport.c
23 libfm_a_LIBADD=         $(EXTRAOBJ)
24 libfm_a_DEPENDENCIES=   $(EXTRAOBJ)
25 LDADD   =               libfm.a @LIBINTL@ $(LIBOBJS)
26 DEPENDENCIES=           libfm.a $(LIBOBJS)
27
28 check_PROGRAMS=
29
30 if NEED_TRIO
31 noinst_LIBRARIES+=      libtrio.a
32 libtrio_a_SOURCES=      trio/triostr.c trio/trio.c trio/trionan.c \
33                         trio/trio.h trio/triop.h trio/triodef.h \
34                         trio/trionan.h trio/triostr.h
35 check_PROGRAMS+=        regression
36 regression_SOURCES=     trio/regression.c
37 LDADD +=                libtrio.a -lm
38 TESTS=                  regression
39 endif
40
41 fetchmail_SOURCES=      fetchmail.h getopt.h \
42                 i18n.h kerberos.h md5.h mx.h netrc.h ntlm.h \
43                 smbbyteorder.h smbdes.h smbmd4.h smbencrypt.h smtp.h \
44                 socket.h tunable.h \
45                 socket.c getpass.c pop2.c pop3.c imap.c etrn.c \
46                 odmr.c fetchmail.c env.c idle.c options.c daemon.c \
47                 driver.c transact.c sink.c smtp.c \
48                 uid.c mxget.c md5ify.c cram.c kerberos.c gssapi.c \
49                 opie.c rpa.c interface.c netrc.c \
50                 unmime.c conf.c checkalias.c smbdes.c smbencrypt.c \
51                 smbmd4.c smbutil.c lock.c \
52                 rcfile_l.l rcfile_y.y ucs/norm_charmap.c
53
54 check_PROGRAMS +=       rfc822 unmime netrc rfc2047e
55
56 rfc2047e_CFLAGS=        -DTEST
57
58 rfc822_CFLAGS=  -DMAIN
59
60 unmime_SOURCES= unmime.c
61 unmime_CFLAGS=  -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
62
63 netrc_SOURCES=  netrc.c xmalloc.c report.c
64 netrc_CFLAGS=   -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
65
66 # For some losing Unix makes.
67 SHELL = /bin/sh
68 @SET_MAKE@
69
70 fetchmail.spec: Makefile.in specgen.sh
71         $(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
72
73 DISTDOCS=       BUGS FAQ FEATURES NOTES OLDNEWS fetchmail-man.html \
74                 fetchmail-FAQ.html design-notes.html esrs-design-notes.html todo.html \
75                 fetchmail-features.html README.SSL README.NTLM \
76                 fetchmail-SA-2005-01.txt
77
78 # extra directories to ship
79 distdirs = rh-config contrib beos
80
81 EXTRA_DIST= $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \
82             trio/CHANGES trio/README strlcpy.3 \
83             m4-local/ac-archive-license.txt m4-local/ac_ma_search_package.m4
84
85 FAQ: fetchmail-FAQ.html
86         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
87
88 FEATURES: fetchmail-features.html
89         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-features.html >$@ || { rm -f $@ ; exit 1 ; }
90
91 NOTES: design-notes.html esrs-design-notes.html
92            echo "This file contains two articles reformatted from HTML." > $@ \
93         && echo "------------------------------------------------------" >> $@ \
94         && echo "" >> $@ \
95         && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/design-notes.html >>$@ \
96         && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/esrs-design-notes.html >>$@ \
97         || { rm -f $@ ; exit 1 ; }
98
99 TODO: todo.html
100         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/todo.html >$@ || { rm -f $@ ; exit 1 ; }
101
102 fetchmail-man.html: fetchmail.man
103         env - PATH=$$PATH $(srcdir)/dist-tools/manServer.pl $(srcdir)/fetchmail.man >$@ \
104         || { rm -f $@ ; exit 1 ; }
105
106 dist-hook:
107         cd $(distdir) && find $(distdirs) po -name .svn -type d -prune -exec rm -rf '{}' ';'
108         cd $(distdir) && find $(distdirs) po -name '*~' -exec rm -f '{}' ';'
109
110 # The following sets edit modes for GNU EMACS.
111 # Local Variables:
112 # compile-command:"configure"
113 # End: