1 # Makefile for fetchmail
4 AUTOMAKE_OPTIONS= foreign no-dist-gzip dist-bzip2
7 AM_CPPFLAGS= @CPFLAGS@ -I$(srcdir)/libesmtp
9 ACLOCAL_AMFLAGS= -I m4 -I m4-local
11 BUILT_SOURCES= rcfile_y.h
13 bin_PROGRAMS= fetchmail
15 dist_noinst_SCRIPTS= specgen.sh
16 dist_man1_MANS= fetchmail.man
19 nodist_bin_SCRIPTS= fetchmailconf
20 python_PYTHON= fetchmailconf.py
21 dist_man1_MANS+= fetchmailconf.man
24 CLEANFILES= $(nodist_bin_SCRIPTS)
26 # for gettext (used by fetchmail.c, NOT by GNU gettext)
27 localedir= $(datadir)/locale
28 DEFS= @DEFS@ -DLOCALEDIR=\"$(localedir)\"
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)
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
53 fetchmail_SOURCES= fetchmail.h getopt.h \
54 i18n.h kerberos.h md5.h mx.h netrc.h smtp.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 \
66 check_PROGRAMS += rfc822 unmime netrc rfc2047e mxget
68 rfc2047e_CFLAGS= -DTEST
72 unmime_SOURCES= unmime.c
73 unmime_CFLAGS= -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
75 netrc_SOURCES= netrc.c xmalloc.c report.c
76 netrc_CFLAGS= -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
78 mxget_SOURCES= mxget.c
79 mxget_CFLAGS= -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
81 # For some losing Unix makes.
85 fetchmail.spec: Makefile.in specgen.sh
86 $(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
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 \
92 fetchmail-SA-2005-01.txt \
93 fetchmail-SA-2005-02.txt
95 # extra directories to ship
96 distdirs = rh-config contrib beos
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
104 ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ || { rm -f $@ ; exit 1; }
107 FAQ: fetchmail-FAQ.html
108 AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
110 FEATURES: fetchmail-features.html
111 AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-features.html >$@ || { rm -f $@ ; exit 1 ; }
113 NOTES: design-notes.html esrs-design-notes.html
114 echo "This file contains two articles reformatted from HTML." > $@ \
115 && 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 ; }
122 AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/todo.html >$@ || { rm -f $@ ; exit 1 ; }
124 fetchmail-man.html: fetchmail.man
125 env - PATH=$$PATH $(srcdir)/dist-tools/manServer.pl $(srcdir)/fetchmail.man >$@ \
126 || { rm -f $@ ; exit 1 ; }
129 cd $(distdir) && find $(distdirs) po -name .svn -type d -prune -exec rm -rf '{}' ';'
130 cd $(distdir) && find $(distdirs) po -name '*~' -exec rm -f '{}' ';'
132 # The following sets edit modes for GNU EMACS.
134 # compile-command:"configure"