| 1 |
include $(top_srcdir)/mk/pathnames |
| 2 |
|
| 3 |
bin_PROGRAMS= smtp |
| 4 |
|
| 5 |
smtp_SOURCES= $(top_srcdir)/usr.sbin/smtpd/iobuf.c |
| 6 |
smtp_SOURCES+= $(top_srcdir)/usr.sbin/smtpd/ioev.c |
| 7 |
smtp_SOURCES+= $(top_srcdir)/usr.sbin/smtpd/log.c |
| 8 |
smtp_SOURCES+= $(top_srcdir)/usr.sbin/smtpd/smtp_client.c |
| 9 |
smtp_SOURCES+= $(top_srcdir)/usr.sbin/smtpd/smtpc.c |
| 10 |
smtp_SOURCES+= $(top_srcdir)/usr.sbin/smtpd/ssl.c |
| 11 |
|
| 12 |
# libtls |
| 13 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/a_time_posix.c |
| 14 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls.c |
| 15 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_client.c |
| 16 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_bio_cb.c |
| 17 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_config.c |
| 18 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_conninfo.c |
| 19 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_keypair.c |
| 20 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_server.c |
| 21 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_ocsp.c |
| 22 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_peer.c |
| 23 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_signer.c |
| 24 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_util.c |
| 25 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/tls_verify.c |
| 26 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/by_mem.c |
| 27 |
smtp_SOURCES+= $(top_srcdir)/openbsd-compat/libtls/openssl.c |
| 28 |
|
| 29 |
AM_CPPFLAGS= -DIO_TLS \ |
| 30 |
-I$(top_srcdir)/usr.sbin/smtpd \ |
| 31 |
-I$(top_srcdir)/openbsd-compat \ |
| 32 |
-I$(top_srcdir)/openbsd-compat/libtls \ |
| 33 |
-I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@ |
| 34 |
|
| 35 |
LDADD= $(LIBOBJS) |
| 36 |
|
| 37 |
MANPAGES= smtp.1.out |
| 38 |
MANPAGES_IN= $(top_srcdir)/usr.sbin/smtpd/smtp.1 |
| 39 |
|
| 40 |
EXTRA_DIST= $(MANPAGES_IN) |
| 41 |
|
| 42 |
PATHSUBS= -e 's|/var/run/smtpd.sock|$(sockdir)/smtpd.sock|g' \ |
| 43 |
-e 's|/usr/libexec|$(libexecdir)|g' \ |
| 44 |
-e 's|/etc/mail/|$(sysconfdir)/|g' |
| 45 |
|
| 46 |
FIXPATHSCMD= $(SED) $(PATHSUBS) |
| 47 |
|
| 48 |
|
| 49 |
$(MANPAGES): $(MANPAGES_IN) |
| 50 |
manpage=$(top_srcdir)/usr.sbin/smtpd/`echo $@ | sed 's/\.out$$//'`; \ |
| 51 |
if test "$(MANTYPE)" = "man"; then \ |
| 52 |
$(FIXPATHSCMD) $${manpage} | $(AWK) -f $(srcdir)/../mdoc2man.awk > $@; \ |
| 53 |
else \ |
| 54 |
$(FIXPATHSCMD) $${manpage} > $@; \ |
| 55 |
fi |
| 56 |
|
| 57 |
install-exec-hook: $(CONFIGFILES) $(MANPAGES) |
| 58 |
$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)1 |
| 59 |
$(INSTALL) -m 644 smtp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/smtp.1 |
| 60 |
rm smtp.1.out |
| 61 |
|
| 62 |
uninstall-hook: |
| 63 |
rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/smtp.1 |
| 64 |
rmdir $(DESTDIR)$(mandir)/$(mansubdir)1 2> /dev/null || true |