fix idn support properly
[apps/madmutt.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 ## Use aclocal -I m4; automake --foreign
3
4 AUTOMAKE_OPTIONS = foreign
5 EXTRA_PROGRAMS = madmutt_dotlock
6
7 if BUILD_NNTP
8 NNTP_SUBDIR = nntp
9 endif
10
11 SUBDIRS = tools intl m4 po \
12           lib-lua lib-mime lib-lib lib-mx lib-hash lib-sys lib-ui \
13           pop imap $(NNTP_SUBDIR)
14
15 BUILT_SOURCES = keymap_defs.h charset.gperf
16 DISTCLEANFILES = $(BUILT_SOURCES)
17
18 bin_PROGRAMS = madmutt madmutt_dotlock
19 madmutt_SOURCES = $(BUILT_SOURCES) \
20         alias.c attach.c base64.c browser.c buffy.c charset.c commands.c \
21         compose.c copy.c crypt.c editmsg.c init.c keymap.c \
22         flags.c from.c handler.c headers.c help.c hook.c \
23         main.c muttlib.c mutt_idna.c pager.c pattern.c postpone.c recvattach.c recvcmd.c \
24         score.c send.c sendlib.c sort.c state.c thread.c account.c remailer.c
25
26 madmutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
27                 $(top_builddir)/lib-mime/libmime.a \
28                 $(top_builddir)/lib-mx/libmx.a \
29                 $(top_builddir)/imap/libimap.a \
30                 $(top_builddir)/pop/libpop.a \
31                 $(LIBNNTP) \
32                 $(top_builddir)/lib-hash/libhash.a \
33                 $(top_builddir)/lib-sys/libsys.a \
34                 $(top_builddir)/lib-ui/libui.a \
35                 $(top_builddir)/lib-lua/liblua.a \
36                 $(top_builddir)/lib-lib/liblib.a \
37                 $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
38
39 madmutt_DEPENDENCIES = \
40                        \
41                        @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
42                        $(top_builddir)/lib-lib/liblib.a \
43                        $(top_builddir)/lib-mime/libmime.a \
44                        $(top_builddir)/lib-hash/libhash.a \
45                        $(top_builddir)/lib-sys/libsys.a \
46                        $(top_builddir)/lib-ui/libui.a \
47                        $(top_builddir)/lib-lua/liblua.a \
48                        $(top_builddir)/lib-mx/libmx.a \
49                        \
50                        $(top_builddir)/pop/libpop.a   \
51                        $(top_builddir)/imap/libimap.a \
52                        $(LIBNNTPDEPS) $(INTLDEPS)
53
54 CPP=@CPP@
55
56 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
57         -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
58         -DHAVE_CONFIG_H=1 -DPKGDOCDIR=\"$(docdir)\"
59
60 INCLUDES=-I$(top_srcdir) $(GPGME_CFLAGS) -Iintl
61
62 CPPFLAGS=@CPPFLAGS@ -I$(includedir)
63
64 EXTRA_madmutt_SOURCES = \
65         account.c mutt_sasl.c dotlock.c remailer.c \
66         alias.h browser.h remailer.h state.h \
67         mutt_idna.h mutt_libesmtp.c state.h
68
69 EXTRA_DIST = config.rpath  COPYRIGHT GPL OPS TODO \
70         configure account.h alias.h attach.h recvattach.h handler.h thread.h \
71         buffy.h charset.h copy.h crypt.c dotlock.h functions.def gen_defs \
72         recvattach.h handler.h thread.h globals.h init.h keymap.h \
73         mime.h mutt.h mutt_sasl.h pager.h protos.h \
74         sort.h autogen.sh remailer.c remailer.h browser.h state.h \
75         README.SSL depcomp mutt_idna.h mutt_libesmtp.h
76
77 madmutt_dotlock_SOURCES = dotlock.c
78 madmutt_dotlock_LDADD = @LIBOBJS@ $(top_builddir)/lib-lib/liblib.a
79 madmutt_dotlock_DEPENDENCIES = @LIBOBJS@ $(top_builddir)/lib-lib/liblib.a
80
81 CLEANFILES = keymap_defs.h
82
83 ACLOCAL_AMFLAGS = -I m4
84
85 LDADD = @LIBOBJS@ @LIBINTL@
86
87 charset.gperf: charset.def
88         sh $< > $@
89
90 keymap_defs.h: OPS
91         $(srcdir)/gen_defs $^ > keymap_defs.h
92
93 install-exec-hook:
94         if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/madmutt_dotlock ; then       \
95                 rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;                \
96                 ln -sf $(DESTDIR)$(bindir)/madmutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
97         fi
98         if test -f $(DESTDIR)$(bindir)/madmutt_dotlock && test x@DOTLOCK_GROUP@ != x ; then \
99                 chgrp @DOTLOCK_GROUP@ $(DESTDIR)$(bindir)/madmutt_dotlock && \
100                 chmod @DOTLOCK_PERMISSION@ $(DESTDIR)$(bindir)/madmutt_dotlock || \
101                 { echo "Can't fix madmutt_dotlock's permissions!" >&2 ; } \
102         fi
103
104 include tools/cpkg2c.mk
105 -include tools/cflags.mk
106
107 wc:
108         @sloccount $(wildcard *.h *.c) $(wildcard lib-*/) lib imap nntp pop | grep 'ansic[=:]'