8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / mailx / Makefile
blob4fb19334f2533a3f55a588d79047deb68b9d4355
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright 2014 Joyent, Inc.
27 # cmd/mailx/Makefile
29 PROG= mailx
31 OBJS= 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
39 SRCS= $(OBJS:.o=.c)
41 MISC= misc
43 include ../Makefile.cmd
45 # for messaging catalogue file
47 POFILE= mailx.po
48 POFILES= $(SRCS:%.c=%.po)
50 ROOTMAILXD= $(ROOTSHLIB)/mailx
51 ROOTETCMAILD= $(ROOTETC)/mail
52 MAILXHELP= mailx.help mailx.help.~
53 ROOTMAILXHELP= $(MAILXHELP:%=$(ROOTMAILXD)/%)
54 MAILXRC= $(MISC)/mailx.rc
55 UCBMAILRC= $(MISC)/Mail.rc
56 ROOTMAILXRC= $(MAILXRC:$(MISC)/%=$(ROOTETCMAILD)/%)
57 ROOTUCBMAILRC= $(UCBMAILRC:$(MISC)/%=$(ROOTETCMAILD)/%)
58 ROOTUCBMAIL= $(ROOT)/usr/ucb/mail
59 ROOTUCBCAPMAIL= $(ROOT)/usr/ucb/Mail
61 $(ROOTPROG) := FILEMODE = 02511
62 $(ROOTMAILXHELP) := FILEMODE = 0644
63 $(ROOTMAILXRC) := FILEMODE = 0644
64 $(ROOTUCBMAILRC) := FILEMODE = 0644
66 CPPFLAGS= -Ihdr -DUSG -DOPTIM $(CPPFLAGS.master)
67 CERRWARN += -_gcc=-Wno-parentheses
68 CERRWARN += -_gcc=-Wno-uninitialized
69 CERRWARN += -_gcc=-Wno-unused-variable
70 CERRWARN += -_gcc=-Wno-clobbered
71 LINTFLAGS= -hb
72 LDLIBS += -lmail -lcmdutils
73 LDFLAGS += $(MAPFILE.NGB:%=-M%)
75 CLOBBERFILES += $(MAILXHELP)
77 # install rules
78 $(ROOTMAILXD)/% : %
79 $(INS.file)
81 $(ROOTETCMAILD)/% : $(MISC)/%
82 $(INS.file)
84 .KEEP_STATE:
86 all: $(PROG) $(MAILXHELP) $(MAILXRC) $(UCBMAILRC)
88 $(PROG): $(OBJS) $(LIBMAIL)
89 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
90 $(POST_PROCESS)
92 install: all $(ROOTMAILXD) $(ROOTPROG) $(ROOTMAILXHELP) \
93 $(ROOTMAILXRC) $(ROOTUCBMAIL) $(ROOTUCBCAPMAIL) $(ROOTUCBMAILRC)
95 $(ROOTUCBMAIL) $(ROOTUCBCAPMAIL):
96 $(RM) $@; $(SYMLINK) ../bin/mailx $@
98 $(ROOTMAILXD):
99 $(INS.dir)
101 $(MAILXHELP): $(MISC)/$$@
102 $(GREP) -v '^#.*@(' $(MISC)/$@ > $@
104 $(POFILE): $(POFILES)
105 $(RM) $@
106 cat $(POFILES) > $@
108 clean:
109 $(RM) $(OBJS)
111 lint: lint_SRCS
113 include ../Makefile.targ
115 FRC: