-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile.in
96 lines (72 loc) · 1.98 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
srcdir= @srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
libexecdir=@libexecdir@
bindir=$(prefix)/sbin
mandir=$(prefix)/man/man8
LN_S=@LN_S@
CC=@CC@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
etcdir=@sysconfdir@
SSMTPCONFDIR=$(etcdir)/ssmtp
# (End of relocation section)
# Configuration files
CONFIGURATION_FILE=$(SSMTPCONFDIR)/ssmtp.conf
REVALIASES_FILE=$(SSMTPCONFDIR)/revaliases
INSTALLED_CONFIGURATION_FILE=$(CONFIGURATION_FILE)
INSTALLED_REVALIASES_FILE=$(REVALIASES_FILE)
# Programs
GEN_CONFIG=$(srcdir)/generate_config
SRCS=ssmtp.c arpadate.c base64.c xgethostname.c @SRCS@
OBJS=$(SRCS:.c=.o)
INSTALL=@INSTALL@
EXTRADEFS=\
-DSSMTPCONFDIR=\"$(SSMTPCONFDIR)\" \
-DCONFIGURATION_FILE=\"$(CONFIGURATION_FILE)\" \
-DREVALIASES_FILE=\"$(REVALIASES_FILE)\" \
CFLAGS=@DEFS@ $(EXTRADEFS) @CFLAGS@
.PHONY: all
all: ssmtp
%.dvi: %.tex
latex $<
.PHONY: install
install: ssmtp $(GEN_CONFIG)
$(INSTALL) -d -m 755 $(bindir)
$(INSTALL) -s -m 755 ssmtp $(bindir)/ssmtp
$(INSTALL) -d -m 755 $(mandir)
$(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(mandir)/ssmtp.8
$(INSTALL) -d -m 755 $(SSMTPCONFDIR)
$(INSTALL) -m 644 $(srcdir)/revaliases $(INSTALLED_REVALIASES_FILE)
$(GEN_CONFIG) $(INSTALLED_CONFIGURATION_FILE)
.PHONY: install-sendmail
install-sendmail: install
$(RM) $(bindir)/sendmail
$(LN_S) ssmtp $(bindir)/sendmail
$(INSTALL) -d -m 755 $(libexecdir)
$(RM) $(libexecdir)/sendmail
$(LN_S) sendmail /lib/sendmail
$(RM) $(mandir)/sendmail.8
$(LN_S) ssmtp.8 $(mandir)/sendmail.8
.PHONY: uninstall
uninstall:
$(RM) $(bindir)/ssmtp
$(RM) $(mandir)/ssmtp.8
$(RM) $(CONFIGURATION_FILE) $(REVALIASES_FILE)
$(RM) -r $(SSMTPCONFDIR)
.PHONY: uninstall-sendmail
uninstall-sendmail: uninstall
$(RM) $(bindir)/sendmail /lib/sendmail
$(RM) $(mandir)/sendmail.8
# Binaries:
ssmtp: $(OBJS)
$(CC) -o ssmtp $(OBJS) $(LIBS) $(CFLAGS) $(LDFLAGS)
.PHONY: clean
clean:
$(RM) ssmtp *.o md5auth/*.o core
.PHONY: distclean
distclean: clean docclean
$(RM) config.* Makefile
.PHONY: docclean
docclean:
$(RM) *.dvi *.log *.aux