Print this page
8114 EOF rwho
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/cmd-inet/usr.bin/Makefile
+++ new/usr/src/cmd/cmd-inet/usr.bin/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26 26 # Copyright 2016 Toomas Soome <tsoome@me.com>
27 27 #
28 28
29 -PROG= finger rdate ruptime rwho whois
29 +PROG= finger rdate whois
30 30 SUIDPROG= rcp rlogin rsh
31 31 ALL= $(PROG) $(SUIDPROG)
32 32 SRCS= $(ALL:%=%.c)
33 33 KCMDPROGS= rcp rlogin rsh
34 34
35 35 SUBDIRS= chat dns-sd ftp nc nca netstat \
36 36 pppd pppdump pppstats rdist talk telnet tftp
37 37 SUBDIR1= talk
38 38 MSGSUBDIRS= nca talk
39 39
40 40 # As programs get lint-clean, add them here. Eventually.
41 41 # This hack should go away, and all in PROG should be lint-clean.
42 -LINTCLEAN= rlogin.c rsh.c rcp.c rdate.c rwho.c whois.c
42 +LINTCLEAN= rlogin.c rsh.c rcp.c rdate.c whois.c
43 43
44 44 # Likewise, as subdirs get lint-clean, add them here. Once
45 45 # they're all clean, replace the dependency of the lint target
46 46 # with SUBDIRS. Also (sigh) deal with the commented-out build lines
47 47 # for the lint rule.
48 48 LINTSUBDIRS= nca netstat pppd pppstats tftp
49 49
50 50 include ../../Makefile.cmd
51 51 include ../Makefile.cmd-inet
52 52
53 53 COMMONOBJS= kcmd.o
54 54 COMMONPOFILES= $(COMMONOBJS:.o=.po)
55 55 COMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:.o=.c)
56 56
57 57 POFILES= rlogin.po rsh.po rcp.po $(COMMONPOFILES)
58 58 POFILE= usr.bin.po
59 59
60 60 CLOBBERFILES += $(ALL)
61 61 CLEANFILES += kcmd.o rcp.o rlogin.o rsh.o
62 62
63 63 all:= TARGET= all
64 64 install:= TARGET= install
65 65 clean:= TARGET= clean
66 66 clobber:= TARGET= clobber
67 67 lint:= TARGET= lint
68 68 _msg:= TARGET= _msg
69 69
70 70 ROOTSUIDPROG= $(SUIDPROG:%=$(ROOTBIN)/%)
71 71 $(ROOTSUIDPROG) := FILEMODE= 04555
72 72
73 73 CPPFLAGS += -DSYSV -DSTRNET -DBSD_COMP -I$(CMDINETCOMMONDIR)
74 74 CERRWARN += -_gcc=-Wno-parentheses
75 75 CERRWARN += -_gcc=-Wno-uninitialized
76 76 CERRWARN += -_gcc=-Wno-unused-function
77 77
78 78 # Eventually just plain CFLAGS should be += -v, but not until all in
79 79 # PROGS are lint clean.
80 80 $(LINTCLEAN) := CFLAGS += $(CCVERBOSE)
81 81
82 82 finger := CFLAGS += $(CCVERBOSE)
83 83 # Enable large file support for reading the lastlog file.
84 84 finger := CPPFLAGS += -D_FILE_OFFSET_BITS=64
85 85
86 86 finger := LDLIBS += -lnsl -lcurses -lsocket
87 87 rcp lint-rcp := LDLIBS += -lsocket -lsec -lsendfile
88 88 rdate lint-rdate:= LDLIBS += -lsocket
89 89 rlogin lint-rlogin := LDLIBS += -lnsl -lsocket
90 90 rsh lint-rsh := LDLIBS += -lsocket
91 91 whois lint-whois := LDLIBS += -lsocket
92 92
93 93 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
94 94 $(KCMDPROGS) := LDLIBS += -lnsl -lmech_krb5
95 95 $(KCMDPROGS) := LDFLAGS += $(ZIGNORE) $(KRUNPATH) \
96 96 -L$(ROOT)$(KLIBDIR_DO) \
97 97 -L$(ROOT)$(KLIBDIR_GL)
98 98 KCMDLINTS= $(KCMDPROGS:%=lint-%)
99 99
100 100 $(COMMONPOFILES) \
101 101 rlogin.po rcp.po rsh.po \
102 102 $(KCMDPROGS) \
103 103 $(KCMDLINTS) := CPPFLAGS += -DKERBEROS \
104 104 -I$(CMDINETCOMMONDIR) \
105 105 -I$(SRC)/lib/gss_mechs/mech_krb5 \
106 106 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
107 107 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
108 108 -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5
109 109
110 110 # "-erroff=E_NAME_USED_NOT_DEF2" and "-erroff=E_NAME_DEF_NOT_USED2"
111 111 # are required because lint problems in the Kerberos 5 framework.
112 112 $(KCMDLINTS) := LINTFLAGS += -lnsl \
113 113 -erroff=E_NAME_USED_NOT_DEF2 \
114 114 -erroff=E_NAME_DEF_NOT_USED2
115 115
116 116 # Extra source files to lint with
117 117 LINTXTRA=
118 118 $(KCMDLINTS) := LINTXTRA += $(COMMONSRCS)
119 119
120 120 ROOTSUNWRCP= $(ROOT)/usr/lib/sunw,rcp
121 121 ROOTRSHSYMLINK= $(ROOT)/usr/ucb/rsh
122 122 ROOTREMSHSYMLINK=$(ROOT)/usr/bin/remsh
123 123
124 124 .KEEP_STATE:
125 125
126 126 all: $(ALL) $(SUBDIRS)
127 127
128 128 install: all .WAIT $(ROOTPROG) $(ROOTSUIDPROG) \
129 129 $(SUBDIRS) $(ROOTSUNWRCP) $(ROOTRSHSYMLINK) $(ROOTREMSHSYMLINK)
130 130
131 131 # Messaging - copy $POFILES to $POFILE to work with the parent directory
132 132 # Makefile's '_msg' target.
133 133 #
134 134 _msg: $(MSGSUBDIRS) $(POFILES)
135 135 $(RM) $(POFILE)
136 136 $(CAT) $(POFILES) > $(POFILE)
137 137
138 138 $(COMMONPOFILES): $(COMMONSRCS)
139 139 $(COMPILE.cpp) $(COMMONSRCS) > $(@:.po=.c).i
140 140 $(XGETTEXT) $(XGETFLAGS) $(@:.po=.c).i
141 141 $(RM) $@
142 142 sed "/^domain/d" < messages.po > $@
143 143 $(RM) messages.po $(@:.po=.c).i
144 144
145 145 $(COMMONOBJS): $(COMMONSRCS)
146 146 $(COMPILE.c) $(COMMONSRCS)
147 147
148 148 rlogin: rlogin.o $(COMMONOBJS)
149 149 $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
150 150 $(POST_PROCESS)
151 151
152 152 rcp: rcp.o $(COMMONOBJS)
153 153 $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
154 154 $(POST_PROCESS)
155 155
156 156 rsh: rsh.o $(COMMONOBJS)
157 157 $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
158 158 $(POST_PROCESS)
159 159
160 160 $(ROOTSUNWRCP):
161 161 $(RM) $@; $(SYMLINK) ../bin/rcp $@
162 162
163 163 $(ROOTRSHSYMLINK):
164 164 $(RM) $@; $(SYMLINK) ../bin/rsh $@
165 165
166 166 $(ROOTREMSHSYMLINK):
167 167 $(RM) $@; $(SYMLINK) rsh $@
168 168
169 169 $(SUBDIRS): FRC
170 170 @cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
171 171
172 172 FRC:
173 173
174 174 clean: $(SUBDIRS) clean_local
175 175 clean_local:
176 176 $(RM) $(CLEANFILES)
177 177
178 178 clobber: $(SUBDIRS) clobber_local
179 179 clobber_local: clean_local
180 180 $(RM) $(CLOBBERFILES)
181 181
182 182 LINTLOCALS= $(LINTCLEAN:%.c=lint-%)
183 183
184 184 lint: $(LINTSUBDIRS) $(LINTLOCALS)
185 185
186 186 $(LINTLOCALS):
187 187 $(LINT.c) $(@:lint-%=%.c) $(LINTXTRA) $(LDLIBS)
↓ open down ↓ |
135 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX