xref: /titanic_52/usr/src/cmd/mail/Makefile (revision ba4e3c84e6b9390bbf7df80b5f1d11dec34cc525)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23#
24# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# ident	"%Z%%M%	%I%	%E% SMI"
28#
29
30
31BINPROG=	mail
32
33PROG= 	       $(BINPROG)
34
35GREP=		grep
36
37include ../Makefile.cmd
38
39CLOBBERFILES=	$(PROG)
40CLEANFILES=	$(MAILOBJS)
41
42MAILOBJS= 	add_recip.o cat.o ckdlivopts.o \
43		cksaved.o clr_hinfo.o copyback.o copylet.o \
44		copymt.o createmf.o del_recipl.o Dout.o  delete.o \
45		done.o doopen.o dumpaff.o dumprcv.o \
46		errmsg.o gendeliv.o getarg.o getcomment.o \
47		gethead.o goback.o init.o \
48		isheader.o isit.o islocal.o istext.o legal.o \
49		lock.o  main.o mkdead.o mta_ercode.o \
50		new_recipl.o parse.o pckaffspot.o pckrcvspot.o \
51		pickFrom.o pipletr.o poplist.o printhdr.o printmail.o \
52		pushlist.o savehdrs.o sel_disp.o  sendlist.o \
53		sendmail.o  setsig.o \
54		stamp.o Tout.o
55
56MAILSRC=	 $(MAILOBJS:%.o=%.c)
57
58CPROG=		mail
59CPROGSRC= 	$(CPROG:%=_%.c)
60
61# ROOT directories
62ROOTMAILD=	$(ROOTLIB)/mail
63ROOTINC=	$(ROOT)/usr/include
64
65# installed modules
66ROOTBINPROG=	$(BINPROG:%=$(ROOTBIN)/%)
67
68ROOTSYMLINKS=	$(ROOTBIN)/rmail
69
70
71EDITPATH= \
72	sed -e 's!REAL_PATH!/usr/bin!g' \
73	    -e 's!USR_SHARE_LIB!/usr/share/lib!g' \
74	    -e 's!VAR_MAIL!/var/mail!g' < $? > $@
75
76CPPFLAGS =	-DSVR4 -I. $(CPPFLAGS.master)
77
78LDLIBS +=	-lmail -lsocket
79
80# conditional assignments
81#
82all:=		TARGET= all
83install:=	TARGET= install
84clean:=		TARGET= clean
85clobber:=	TARGET= clobber
86lint:=		TARGET= lint
87
88# file modes, owners and groups for the install target
89#
90
91
92$(ROOTBIN)/mail :=	FILEMODE =	02511
93$(ROOTBIN)/mail :=	GROUP =	mail
94
95
96# install rules
97$(ROOTINC)/% : %
98	$(INS.file)
99
100.KEEP_STATE:
101
102.PARALLEL: $(MAILOBJS) $(OBJS)
103
104all:		$(PROG)
105
106mail: 		$(MAILOBJS)
107	$(LINK.c) -o $@ $(MAILOBJS) $(LDLIBS)
108	$(POST_PROCESS)
109
110install: all .WAIT $(ROOTBINPROG) $(ROOTSYMLINKS)
111
112# ROOTSYMLINKS
113#
114$(ROOTBIN)/rmail:
115	$(RM) $@; $(SYMLINK) mail $@
116
117lint:
118	$(LINT.c) $(MAILSRC)
119
120clean:
121	$(RM) $(OBJS) $(MAILOBJS)
122
123clobber:
124	$(RM) $(OBJS) $(MAILOBJS) mail
125