10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 52538Sesaxe# Common Development and Distribution License (the "License"). 62538Sesaxe# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*10207SJames.McPherson@Sun.COM# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate# cmd/mailx/Makefile 260Sstevel@tonic-gate 270Sstevel@tonic-gatePROG= mailx 280Sstevel@tonic-gate 290Sstevel@tonic-gateOBJS= myfopen.o aux.o cmd1.o cmd2.o cmd3.o \ 300Sstevel@tonic-gate cmd4.o cmdtab.o collect.o config.o edit.o \ 310Sstevel@tonic-gate init.o fio.o getname.o head.o \ 320Sstevel@tonic-gate hostname.o lex.o list.o lock.o lpaths.o \ 330Sstevel@tonic-gate main.o names.o optim.o popen.o quit.o \ 340Sstevel@tonic-gate receipt.o send.o sigretro.o stralloc.o temp.o \ 350Sstevel@tonic-gate translate.o tty.o usg.local.o vars.o 360Sstevel@tonic-gate 370Sstevel@tonic-gateSRCS= $(OBJS:.o=.c) 380Sstevel@tonic-gate 390Sstevel@tonic-gateMISC= misc 400Sstevel@tonic-gate 410Sstevel@tonic-gateinclude ../Makefile.cmd 420Sstevel@tonic-gate# 430Sstevel@tonic-gate# for messaging catalogue file 440Sstevel@tonic-gate# 450Sstevel@tonic-gatePOFILE= mailx.po 460Sstevel@tonic-gatePOFILES= $(SRCS:%.c=%.po) 470Sstevel@tonic-gate 480Sstevel@tonic-gateROOTMAILXD= $(ROOTSHLIB)/mailx 490Sstevel@tonic-gateROOTETCMAILD= $(ROOTETC)/mail 500Sstevel@tonic-gateMAILXHELP= mailx.help mailx.help.~ 510Sstevel@tonic-gateROOTMAILXHELP= $(MAILXHELP:%=$(ROOTMAILXD)/%) 520Sstevel@tonic-gateMAILXRC= $(MISC)/mailx.rc 530Sstevel@tonic-gateUCBMAILRC= $(MISC)/Mail.rc 540Sstevel@tonic-gateROOTMAILXRC= $(MAILXRC:$(MISC)/%=$(ROOTETCMAILD)/%) 550Sstevel@tonic-gateROOTUCBMAILRC= $(UCBMAILRC:$(MISC)/%=$(ROOTETCMAILD)/%) 560Sstevel@tonic-gateROOTUCBMAIL= $(ROOT)/usr/ucb/mail 570Sstevel@tonic-gateROOTUCBCAPMAIL= $(ROOT)/usr/ucb/Mail 580Sstevel@tonic-gate 590Sstevel@tonic-gate$(ROOTPROG) := FILEMODE = 02511 600Sstevel@tonic-gate$(ROOTMAILXHELP) := FILEMODE = 0644 610Sstevel@tonic-gate$(ROOTMAILXRC) := FILEMODE = 0644 620Sstevel@tonic-gate$(ROOTUCBMAILRC) := FILEMODE = 0644 630Sstevel@tonic-gate 640Sstevel@tonic-gateCPPFLAGS= -Ihdr -DUSG -DOPTIM $(CPPFLAGS.master) 650Sstevel@tonic-gateLINTFLAGS= -hb 660Sstevel@tonic-gateLDLIBS += -lmail 674271SrieLDFLAGS += $(MAPFILE.NGB:%=-M%) 680Sstevel@tonic-gate 690Sstevel@tonic-gate# install rules 700Sstevel@tonic-gate$(ROOTMAILXD)/% : % 710Sstevel@tonic-gate $(INS.file) 720Sstevel@tonic-gate 730Sstevel@tonic-gate$(ROOTETCMAILD)/% : $(MISC)/% 740Sstevel@tonic-gate $(INS.file) 750Sstevel@tonic-gate 760Sstevel@tonic-gate.KEEP_STATE: 770Sstevel@tonic-gate 780Sstevel@tonic-gateall: $(PROG) $(MAILXHELP) $(MAILXRC) $(UCBMAILRC) 790Sstevel@tonic-gate 802538Sesaxe$(PROG): $(OBJS) $(LIBMAIL) 812538Sesaxe $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 820Sstevel@tonic-gate $(POST_PROCESS) 830Sstevel@tonic-gate 840Sstevel@tonic-gateinstall: all $(ROOTMAILXD) $(ROOTPROG) $(ROOTMAILXHELP) \ 850Sstevel@tonic-gate $(ROOTMAILXRC) $(ROOTUCBMAIL) $(ROOTUCBCAPMAIL) $(ROOTUCBMAILRC) 860Sstevel@tonic-gate 870Sstevel@tonic-gate$(ROOTUCBMAIL) $(ROOTUCBCAPMAIL): 880Sstevel@tonic-gate $(RM) $@; $(SYMLINK) ../bin/mailx $@ 890Sstevel@tonic-gate 900Sstevel@tonic-gate$(ROOTMAILXD): 910Sstevel@tonic-gate $(INS.dir) 920Sstevel@tonic-gate 930Sstevel@tonic-gate$(MAILXHELP): $(MISC)/$$@ 940Sstevel@tonic-gate $(GREP) -v '^#.*@(' $(MISC)/$@ > $@ 950Sstevel@tonic-gate 960Sstevel@tonic-gate$(POFILE): $(POFILES) 970Sstevel@tonic-gate $(RM) $@ 980Sstevel@tonic-gate cat $(POFILES) > $@ 990Sstevel@tonic-gate 1000Sstevel@tonic-gateclean: 1012538Sesaxe $(RM) $(OBJS) 1020Sstevel@tonic-gate 1030Sstevel@tonic-gatelint: lint_SRCS 1040Sstevel@tonic-gate 1050Sstevel@tonic-gateinclude ../Makefile.targ 1060Sstevel@tonic-gate 1070Sstevel@tonic-gateFRC: 108