xref: /titanic_41/usr/src/cmd/mailx/Makefile (revision 74e20cfe817b82802b16fac8690dadcda76f54f5)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# cmd/mailx/Makefile
28
29PROG= mailx
30
31OBJS=	myfopen.o aux.o cmd1.o cmd2.o cmd3.o \
32	cmd4.o cmdtab.o collect.o config.o edit.o \
33	init.o fio.o getname.o head.o \
34	hostname.o lex.o list.o lock.o lpaths.o \
35	main.o names.o optim.o popen.o quit.o \
36	receipt.o send.o sigretro.o stralloc.o temp.o \
37	translate.o tty.o usg.local.o vars.o
38
39SRCS=	$(OBJS:.o=.c)
40
41MISC= misc
42
43include ../Makefile.cmd
44#
45# for messaging catalogue file
46#
47POFILE= mailx.po
48POFILES= $(SRCS:%.c=%.po)
49
50ROOTMAILXD=	$(ROOTSHLIB)/mailx
51ROOTETCMAILD=	$(ROOTETC)/mail
52MAILXHELP=	mailx.help mailx.help.~
53ROOTMAILXHELP=	$(MAILXHELP:%=$(ROOTMAILXD)/%)
54MAILXRC=	$(MISC)/mailx.rc
55UCBMAILRC=	$(MISC)/Mail.rc
56ROOTMAILXRC=	$(MAILXRC:$(MISC)/%=$(ROOTETCMAILD)/%)
57ROOTUCBMAILRC=	$(UCBMAILRC:$(MISC)/%=$(ROOTETCMAILD)/%)
58ROOTUCBMAIL=	$(ROOT)/usr/ucb/mail
59ROOTUCBCAPMAIL=	$(ROOT)/usr/ucb/Mail
60
61$(ROOTPROG) :=		FILEMODE =	02511
62$(ROOTPROG) :=		GROUP =		mail
63$(ROOTMAILXHELP) :=	FILEMODE =	0644
64$(ROOTMAILXRC) :=	FILEMODE =	0644
65$(ROOTUCBMAILRC) :=	FILEMODE =	0644
66
67CPPFLAGS=	-Ihdr -DUSG -DOPTIM $(CPPFLAGS.master)
68LINTFLAGS= 	-hb
69LDLIBS +=	-lmail
70
71# install rules
72$(ROOTMAILXD)/% : %
73	$(INS.file)
74
75$(ROOTETCMAILD)/% : $(MISC)/%
76	$(INS.file)
77
78.KEEP_STATE:
79
80all: $(PROG) $(MAILXHELP) $(MAILXRC) $(UCBMAILRC)
81
82$(PROG): $(OBJS) $(LIBMAIL)
83	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
84	$(POST_PROCESS)
85
86install: all $(ROOTMAILXD) $(ROOTPROG) $(ROOTMAILXHELP) \
87	$(ROOTMAILXRC) $(ROOTUCBMAIL) $(ROOTUCBCAPMAIL) $(ROOTUCBMAILRC)
88
89$(ROOTUCBMAIL) $(ROOTUCBCAPMAIL):
90	$(RM) $@; $(SYMLINK) ../bin/mailx $@
91
92$(ROOTMAILXD):
93	$(INS.dir)
94
95$(MAILXHELP): $(MISC)/$$@
96	$(GREP) -v '^#.*@(' $(MISC)/$@ > $@
97
98$(POFILE):      $(POFILES)
99	$(RM)	$@
100	cat     $(POFILES)      > $@
101
102clean:
103	$(RM) $(OBJS)
104
105lint: lint_SRCS
106
107include ../Makefile.targ
108
109FRC:
110