forked from DavisNT/mini_sendmail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 1.25 KB
/
Makefile
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
# Makefile for mini_sendmail
# CONFIGURE: If you are using a SystemV-based operating system, such as
# Solaris, you will need to uncomment this definition.
#SYSV_LIBS = -lnsl -lsocket
BINDIR = /usr/local/sbin
MANDIR = /usr/local/man
CC = cc
CFLAGS = -O -ansi -pedantic -U__STRICT_ANSI__ -Wall -Wpointer-arith -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-long-long
LDFLAGS = -s -static
LDLIBS = $(SYSV_LIBS)
CC := $(DIET) $(CC)
all: mini_sendmail
diet:
make DIET=diet mini_sendmail
mini_sendmail: mini_sendmail.o
$(CC) $(LDFLAGS) mini_sendmail.o $(LDLIBS) -o mini_sendmail
mini_sendmail.o: mini_sendmail.c version.h
$(CC) $(CFLAGS) -c mini_sendmail.c
install: all
rm -f $(BINDIR)/mini_sendmail
cp mini_sendmail $(BINDIR)
rm -f $(MANDIR)/man8/mini_sendmail.8
cp mini_sendmail.8 $(MANDIR)/man8
clean:
rm -f mini_sendmail *.o core core.* *.core
tar:
@name=`sed -n -e '/#define MINI_SENDMAIL_VERSION /!d' -e 's,.*mini_sendmail/,mini_sendmail-,' -e 's, .*,,p' version.h` ; \
rm -rf $$name ; \
mkdir $$name ; \
tar cf - `cat FILES` | ( cd $$name ; tar xfBp - ) ; \
chmod 644 $$name/Makefile ; \
tar cf $$name.tar $$name ; \
rm -rf $$name ; \
gzip $$name.tar