6 # See the file INSTALL if you need help.
10 BINDIR
= $(PREFIX
)/bin
11 MANDIR
= $(PREFIX
)/man
12 SYSCONFDIR
= $(PREFIX
)/etc
15 MAILRC
= $(SYSCONFDIR
)/s-nail.rc
17 SENDMAIL
= /usr
/sbin
/sendmail
18 INSTALL
= /usr
/bin
/install
21 # Define compiler, preprocessor, and linker flags here.
22 # Note that some Linux/glibc versions need -D_GNU_SOURCE in CPPFLAGS, or
23 # wcwidth() will not be available and multibyte characters will not be
24 # displayed correctly.
28 #WARN = -Wall -Wno-parentheses -Werror
30 # Some RedHat versions need INCLUDES = -I/usr/kerberos/include to compile
31 # with OpenSSL, or to compile with GSSAPI authentication included. In the
32 # latter case, they also need LDFLAGS = -L/usr/kerberos/lib.
33 #INCLUDES = -I/usr/kerberos/include
34 #LDFLAGS = -L/usr/kerberos/lib
36 # If you want to include SSL support using Mozilla NSS instead of OpenSSL,
37 # set something like the following paths. (You might also need to set LDFLAGS).
38 #MOZINC = /usr/include/mozilla-seamonkey-1.0.5
39 #INCLUDES = -I$(MOZINC)/nspr -I$(MOZINC)/nss
40 # These paths are suitable to activate NSS support on Solaris, provided that
41 # the packages SUNWmoznss, SUNWmoznss-devel, SUNWmoznspr, and SUNWmoznspr-devel
43 #MOZINC = /usr/sfw/include/mozilla
44 #MOZLIB = /usr/sfw/lib/mozilla
45 #INCLUDES = -I$(MOZINC)/nspr -I$(MOZINC)/nss
46 #LDFLAGS = -L$(MOZLIB) -R$(MOZLIB)
50 # If you know that the IPv6 functions work on your machine, you can enable
52 #IPv6 = -DHAVE_IPv6_FUNCS
55 # Binaries are stripped with this command after installation.
59 ###########################################################################
60 ###########################################################################
61 # You should really know what you do if you change anything below this line
62 ###########################################################################
63 ###########################################################################
65 FEATURES
= -DMAILRC
='"$(MAILRC)"' -DMAILSPOOL
='"$(MAILSPOOL)"' \
66 -DSENDMAIL
='"$(SENDMAIL)"' $(IPv6
)
68 OBJ
= aux.o base64.o cache.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o \
69 dotlock.o edit.o fio.o getname.o getopt.o head.o hmac.o \
70 imap.o imap_search.o junk.o
lex.o list.o lzw.o \
71 macro.o maildir.o main.o md5.o mime.o names.o nss.o \
72 openssl.o pop3.o popen.o quit.o \
73 send.o sendout.o smtp.o ssl.o strings.o temp.o thread.o tty.o \
79 $(CC
) $(CFLAGS
) $(CPPFLAGS
) $(FEATURES
) $(INCLUDES
) $(WARN
) -c
$<
82 $(CC
) $(CFLAGS
) $(CPPFLAGS
) $(FEATURES
) $(INCLUDES
) $(WARN
) -E
$< >$@
85 $(CC
) $(CFLAGS
) $(CPPFLAGS
) $(FEATURES
) $(INCLUDES
) $(WARN
) \
86 $(LDFLAGS
) $< `grep '^[^#]' LIBS` $(LIBS
) -o
$@
91 $(CC
) $(LDFLAGS
) $(OBJ
) `grep '^[^#]' LIBS` $(LIBS
) -o s-nail
93 $(OBJ
): config.h def.h extern.h glob.h rcv.h
95 md5.o imap.o hmac.o smtp.o aux.o pop3.o junk.o
: md5.h
99 #version.h: $(OBJ:.o=.c)
101 eval VERSION
=`git describe --dirty --tags`; \
103 "#define V \"<12.5 7/5/10; $${VERSION:-S-nail spooned}>\""
106 $(SHELL
) .
/makeconfig
109 test -d
$(DESTDIR
)$(BINDIR
) || mkdir
-p
$(DESTDIR
)$(BINDIR
)
110 $(INSTALL
) -c s-nail
$(DESTDIR
)$(BINDIR
)/s-nail
111 $(STRIP
) $(DESTDIR
)$(BINDIR
)/s-nail
112 test -d
$(DESTDIR
)$(MANDIR
)/man1 || mkdir
-p
$(DESTDIR
)$(MANDIR
)/man1
113 $(INSTALL
) -c
-m
644 mailx
.1 $(DESTDIR
)$(MANDIR
)/man1
/s-nail
.1
114 test -d
$(DESTDIR
)$(SYSCONFDIR
) || mkdir
-p
$(DESTDIR
)$(SYSCONFDIR
)
115 test -f
$(DESTDIR
)$(MAILRC
) || \
116 $(INSTALL
) -c
-m
644 nail.rc
$(DESTDIR
)$(MAILRC
)
119 rm -f
$(OBJ
) s-nail
*~ core log
122 rm -f config.h config.log LIBS