8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / mail / Makefile
blob0bd18f502371d11d920703a8f8ae837f2e6d9b71
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.
27 BINPROG= mail
29 PROG= $(BINPROG)
31 GREP= grep
33 include ../Makefile.cmd
35 CLOBBERFILES= $(PROG)
36 CLEANFILES= $(MAILOBJS)
38 MAILOBJS= add_recip.o cat.o ckdlivopts.o \
39 cksaved.o clr_hinfo.o copyback.o copylet.o \
40 copymt.o createmf.o del_recipl.o Dout.o delete.o \
41 done.o doopen.o dumpaff.o dumprcv.o \
42 errmsg.o gendeliv.o getarg.o getcomment.o \
43 gethead.o goback.o init.o \
44 isheader.o isit.o islocal.o istext.o legal.o \
45 lock.o main.o mkdead.o mta_ercode.o \
46 new_recipl.o parse.o pckaffspot.o pckrcvspot.o \
47 pickFrom.o pipletr.o poplist.o printhdr.o printmail.o \
48 pushlist.o savehdrs.o sel_disp.o sendlist.o \
49 sendmail.o setsig.o \
50 stamp.o Tout.o
52 MAILSRC= $(MAILOBJS:%.o=%.c)
54 CPROG= mail
55 CPROGSRC= $(CPROG:%=_%.c)
57 # ROOT directories
58 ROOTMAILD= $(ROOTLIB)/mail
59 ROOTINC= $(ROOT)/usr/include
61 # installed modules
62 ROOTBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
64 ROOTSYMLINKS= $(ROOTBIN)/rmail
67 EDITPATH= \
68 sed -e 's!REAL_PATH!/usr/bin!g' \
69 -e 's!USR_SHARE_LIB!/usr/share/lib!g' \
70 -e 's!VAR_MAIL!/var/mail!g' < $? > $@
72 CPPFLAGS = -DSVR4 -I. $(CPPFLAGS.master)
73 CERRWARN += -_gcc=-Wno-implicit-function-declaration
74 CERRWARN += -_gcc=-Wno-unused-variable
75 CERRWARN += -_gcc=-Wno-uninitialized
76 CERRWARN += -_gcc=-Wno-clobbered
77 CERRWARN += -_gcc=-Wno-extra
79 LDLIBS += -lmail -lsocket
81 # mail defines its own delete() - reduce symbols to locals to remove name clash.
82 LDFLAGS += $(MAPFILE.NGB:%=-M%)
84 # conditional assignments
86 all:= TARGET= all
87 install:= TARGET= install
88 clean:= TARGET= clean
89 clobber:= TARGET= clobber
90 lint:= TARGET= lint
92 # file modes, owners and groups for the install target
96 $(ROOTBIN)/mail := FILEMODE = 02511
99 # install rules
100 $(ROOTINC)/% : %
101 $(INS.file)
103 .KEEP_STATE:
105 .PARALLEL: $(MAILOBJS) $(OBJS)
107 all: $(PROG)
109 mail: $(MAILOBJS)
110 $(LINK.c) -o $@ $(MAILOBJS) $(LDLIBS)
111 $(POST_PROCESS)
113 install: all .WAIT $(ROOTBINPROG) $(ROOTSYMLINKS)
115 # ROOTSYMLINKS
117 $(ROOTBIN)/rmail:
118 $(RM) $@; $(SYMLINK) mail $@
120 lint:
121 $(LINT.c) $(MAILSRC)
123 clean:
124 $(RM) $(OBJS) $(MAILOBJS)
126 clobber:
127 $(RM) $(OBJS) $(MAILOBJS) mail