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