16537 cxgbe: update firmware version to 1.27.5.0
[illumos-gate.git] / usr / src / cmd / cmd-inet / usr.sbin / Makefile
blob590fe00eb0fe135e58c1e6c2e800495482c3534f
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
23 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2022 Garrett D'Amore <garrett@damore.org>
25 # Copyright 2019, Joyent, Inc.
28 SYNCPROG= syncinit syncloop syncstat
30 PROG= 6to4relay arp if_mpadm \
31 in.comsat in.fingerd in.rarpd in.rexecd in.rlogind \
32 in.rshd in.rwhod in.telnetd in.tftpd ipaddrsel \
33 ndd ndp $(SYNCPROG)
35 MANIFEST= rarp.xml telnet.xml comsat.xml finger.xml \
36 login.xml shell.xml rexec.xml
37 SVCMETHOD= svc-sockfilter
39 ROOTFS_PROG= hostconfig route soconfig
40 SBINLINKS= hostconfig route
42 RPCSVCPROG= hostconfig
43 AUDITPROG= in.rexecd in.rlogind in.rshd in.telnetd
44 PAMPROG= in.rexecd in.rlogind in.rshd in.telnetd
45 SOCKETPROG= 6to4relay arp hostconfig if_mpadm in.comsat \
46 in.fingerd in.rarpd in.rexecd in.rlogind in.rshd \
47 in.rwhod in.telnetd in.tftpd ipaddrsel ndp route
48 NSLPROG= 6to4relay arp hostconfig in.comsat in.rarpd \
49 in.rexecd in.rlogind in.rshd in.rwhod in.telnetd \
50 in.tftpd ipaddrsel ndp route
51 CMDPROG= in.telnetd
52 K5PROGS= in.telnetd in.rlogind in.rshd
53 TSNETPROG= route
54 DLADMPROG= 6to4relay
55 DEFAULTFILES= telnetd.dfl
57 PROGSRCS= $(PROG:%=%.c)
58 TFTPDOBJS= in.tftpd.o tftpsubs.o
59 OTHERSRC= ../usr.bin/tftp/tftpsubs.c
60 K5RLOGINOBJS= in.rlogind.o
61 K5RSHDOBJS= in.rshd.o
62 K5TELNETOBJS= in.telnetd.o
63 SRCS= $(PROGSRCS) $(OTHERSRC)
65 SUBDIRS= ifconfig ilbadm in.rdisc in.routed \
66 in.talkd inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
67 nwamadm nwamcfg ping routeadm \
68 snoop sppptun traceroute wificonfig
70 MSGSUBDIRS= ifconfig ilbadm in.routed in.talkd \
71 inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
72 nwamadm nwamcfg routeadm sppptun snoop wificonfig
74 # This controls the degree of compiler warnings emitted, and is named for
75 # 'lint' for historical reasons. Eventually this hack should go away, and all
76 # in PROG should be clean.
77 LINTCLEAN= 6to4relay arp in.rlogind in.rshd in.telnetd in.tftpd \
78 ipaddrsel ndp route \
79 in.rarpd if_mpadm $(SYNCPROG)
81 include ../../Makefile.cmd
82 ROOTMANIFESTDIR= $(ROOTSVCNETWORK)
83 $(ROOTMANIFEST) := FILEMODE= 444
84 include ../Makefile.cmd-inet
86 ROOTSBINPROG = $(ROOTFS_PROG:%=$(ROOTSBIN)/%)
87 ROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%)
89 COMMONOBJS= addr_match.o kcmd.o store_forw_creds.o
90 COMMONSRCS= $(COMMONOBJS:%.o=$(CMDINETCOMMONDIR)/%.c)
91 SRCS+= $(COMMONSRCS)
93 CERRWARN += -_gcc=-Wno-implicit-function-declaration
94 CERRWARN += $(CNOWARN_UNINIT)
95 CERRWARN += -_gcc=-Wno-unused-variable
96 CERRWARN += -_gcc=-Wno-unused-function
97 CERRWARN += -_gcc=-Wno-parentheses
98 CERRWARN += -_gcc=-Wno-char-subscripts
99 CERRWARN += -_gcc=-Wno-extra
100 CERRWARN += -_gcc=-Wno-address
102 # "missing type for func"
103 SMATCH=off
106 # Message catalog
108 POFILES= 6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po \
109 soconfig.po
110 POFILE= usr.sbin.po
112 all:= TARGET= all
113 install:= TARGET= install
114 clean:= TARGET= clean
115 clobber:= TARGET= clobber
116 _msg:= TARGET= _msg
118 CLOBBERFILES += $(ROOTFS_PROG) $(PROG)
119 CLEANFILES += $(COMMONOBJS) $(K5RLOGINOBJS) $(K5RSHDOBJS) $(TFTPDOBJS) \
120 $(K5TELNETOBJS)
122 CPPFLAGS += -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I
124 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
125 K5LIBS=
127 # Eventually just plain CFLAGS should be += -v, but not until all in
128 # PROGS are lint clean.
129 $(LINTCLEAN) := CFLAGS += $(CCVERBOSE)
131 $(SYNCPROG) := LDLIBS += -ldlpi
132 $(SOCKETPROG) := LDLIBS += -lsocket
133 $(NSLPROG) := LDLIBS += -lnsl
134 $(AUDITPROG) := LDLIBS += -lbsm
135 $(PAMPROG) := LDLIBS += -lpam
136 $(RPCSVCPROG) := LDLIBS += -lrpcsvc
137 $(K5PROGS) := LDFLAGS += $(KRUNPATH) \
138 -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
139 $(K5PROGS) := K5LIBS= -lmech_krb5
140 $(K5PROGS) := CPPFLAGS += -I$(SRC)/head \
141 -I$(SRC)/uts/common/ \
142 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
143 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
144 -I$(SRC)/lib/pam_modules/krb5
145 LDLIBS += $(K5LIBS)
146 $(TSNETPROG) := LDLIBS += -ltsnet
147 $(DLADMPROG) := LDLIBS += -ldladm
149 in.rarpd := LDLIBS += -linetutil -ldlpi
150 if_mpadm := LDLIBS += -linetutil -lipmp
151 if_mpadm.po := XGETFLAGS += -a
152 route := CPPFLAGS += -DNDEBUG
153 ndd := LDLIBS += -ldladm -lipadm
154 $(RELEASE_BUILD)ndd := CERRWARN += -_gcc=-Wno-unused
155 in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
157 .KEEP_STATE:
159 .PARALLEL:
161 all: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) THIRDPARTYLICENSE.arp
164 # message catalog
166 _msg: $(MSGSUBDIRS) $(POFILE)
168 syncutil: $(SYNCPROG)
170 $(POFILE): $(POFILES)
171 $(RM) $@
172 cat $(POFILES) > $@
174 %.o: $(CMDINETCOMMONDIR)/%.c
175 $(COMPILE.c) -o $@ $<
177 in.telnetd: $(K5TELNETOBJS)
178 $(LINK.c) $(K5TELNETOBJS) -o $@ $(LDLIBS)
179 $(POST_PROCESS)
181 in.rlogind: $(K5RLOGINOBJS) $(COMMONOBJS)
182 $(LINK.c) $(K5RLOGINOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
183 $(POST_PROCESS)
185 in.rshd: $(K5RSHDOBJS) $(COMMONOBJS)
186 $(LINK.c) $(K5RSHDOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
187 $(POST_PROCESS)
189 in.tftpd: $(TFTPDOBJS)
190 $(LINK.c) $(TFTPDOBJS) -o $@ $(LDLIBS)
191 $(POST_PROCESS)
193 tftpsubs.o: $(OTHERSRC)
194 $(COMPILE.c) $(OTHERSRC) -o $@
195 $(POST_PROCESS_O)
197 $(ROOTUSRSBINLINKS):
198 -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
200 install: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) .WAIT $(ROOTUSRSBINPROG) \
201 $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) \
202 $(ROOTMANIFEST) $(ROOTSVCMETHOD) THIRDPARTYLICENSE.arp
204 THIRDPARTYLICENSE.arp: arp.c
205 $(SED) -n '/University of California/,/SUCH DAMAGE/p' arp.c > $@
207 CLOBBERFILES += THIRDPARTYLICENSE.arp
209 $(SUBDIRS): FRC
210 cd $@; pwd; $(MAKE) $(TARGET)
212 FRC:
214 check: $(CHKMANIFEST)
216 clean: $(SUBDIRS) clean_local
217 clean_local:
218 $(RM) $(CLEANFILES)
220 clobber: $(SUBDIRS) clobber_local
221 clobber_local: clean_local
222 $(RM) $(CLOBBERFILES)