1: # Makefile for mini_sendmail
2:
3: # CONFIGURE: If you are using a SystemV-based operating system, such as
4: # Solaris, you will need to uncomment this definition.
5: #SYSV_LIBS = -lnsl -lsocket
6:
7: BINDIR = /usr/local/sbin
8: MANDIR = /usr/local/man
9: CC = gcc
10: CFLAGS = -O
11: #CFLAGS = -g
12: LDFLAGS = -s -static
13: #LDFLAGS = -g -static
14: LDLIBS = $(SYSV_LIBS)
15:
16: CC := $(DIET) $(CC)
17:
18:
19: all: mini_sendmail
20:
21: diet:
22: make DIET=diet mini_sendmail
23:
24:
25: mini_sendmail: mini_sendmail.o
26: $(CC) $(CFLAGS) $(LDFLAGS) mini_sendmail.o $(LDLIBS) -o mini_sendmail
27:
28: mini_sendmail.o: mini_sendmail.c version.h
29: $(CC) $(CFLAGS) -c mini_sendmail.c
30:
31:
32: install: all
33: rm -f $(BINDIR)/mini_sendmail
34: cp mini_sendmail $(BINDIR)
35: rm -f $(MANDIR)/man8/mini_sendmail.8
36: cp mini_sendmail.8 $(MANDIR)/man8
37:
38: clean:
39: rm -f mini_sendmail *.o core core.* *.core
40:
41: tar:
42: @name=`sed -n -e '/#define VERSION/!d' -e 's,.*mini_sendmail/,mini_sendmail-,' -e 's, .*,,p' version.h` ; \
43: rm -rf $$name ; \
44: mkdir $$name ; \
45: tar cf - `cat FILES` | ( cd $$name ; tar xfBp - ) ; \
46: chmod 644 $$name/Makefile ; \
47: tar cf $$name.tar $$name ; \
48: rm -rf $$name ; \
49: gzip $$name.tar
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>