1 0 stevel # 2 0 stevel # CDDL HEADER START 3 0 stevel # 4 0 stevel # The contents of this file are subject to the terms of the 5 1676 jpk # Common Development and Distribution License (the "License"). 6 1676 jpk # You may not use this file except in compliance with the License. 7 0 stevel # 8 0 stevel # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 0 stevel # or http://www.opensolaris.org/os/licensing. 10 0 stevel # See the License for the specific language governing permissions 11 0 stevel # and limitations under the License. 12 0 stevel # 13 0 stevel # When distributing Covered Code, include this CDDL HEADER in each 14 0 stevel # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 0 stevel # If applicable, add the following below this CDDL HEADER, with the 16 0 stevel # fields enclosed by brackets "[]" replaced with your own identifying 17 0 stevel # information: Portions Copyright [yyyy] [name of copyright owner] 18 0 stevel # 19 0 stevel # CDDL HEADER END 20 0 stevel # 21 4162 kupfer 22 0 stevel # 23 8485 Peter # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 0 stevel # Use is subject to license terms. 25 0 stevel # 26 0 stevel 27 0 stevel SYNCPROG= syncinit syncloop syncstat 28 0 stevel DHCPPROG= dhcpconfig dhtadm pntadm 29 0 stevel 30 0 stevel # EXPORT DELETE START 31 0 stevel XMODPROG= wanbootutil 32 0 stevel # EXPORT DELETE END 33 0 stevel 34 4235 markfen PROG= 6to4relay arp gettable if_mpadm \ 35 3048 amaguire in.comsat in.fingerd in.rarpd in.rexecd in.rlogind \ 36 4097 gd78059 in.rshd in.rwhod in.telnetd in.tftpd ipaddrsel \ 37 4235 markfen ndd $(SYNCPROG) $(DHCPPROG) $(XMODPROG) 38 0 stevel 39 0 stevel MANIFEST= rarp.xml telnet.xml comsat.xml finger.xml \ 40 4097 gd78059 login.xml shell.xml rexec.xml 41 0 stevel 42 3048 amaguire ROOTFS_PROG= hostconfig route soconfig 43 3048 amaguire SBINLINKS= hostconfig route 44 0 stevel 45 0 stevel RPCSVCPROG= hostconfig 46 0 stevel AUDITPROG= in.rexecd in.rlogind in.rshd in.telnetd 47 0 stevel PAMPROG= in.rexecd in.rlogind in.rshd in.telnetd 48 0 stevel SOCKETPROG= 6to4relay arp gettable hostconfig if_mpadm in.comsat \ 49 3048 amaguire in.fingerd in.rarpd in.rexecd in.rlogind in.rshd \ 50 4235 markfen in.rwhod in.telnetd in.tftpd ipaddrsel route 51 4235 markfen NSLPROG= 6to4relay arp gettable hostconfig in.comsat in.rarpd \ 52 3048 amaguire in.rexecd in.rlogind in.rshd in.rwhod in.telnetd \ 53 4235 markfen in.tftpd ipaddrsel route 54 0 stevel CMDPROG= in.telnetd 55 0 stevel K5PROGS= in.telnetd in.rlogind in.rshd 56 1676 jpk TSNETPROG= route 57 10616 Sebastien DLADMPROG= 6to4relay ndd 58 89 meem DEFAULTFILES= telnetd.dfl 59 0 stevel 60 0 stevel PROGSRCS= $(PROG:%=%.c) 61 0 stevel TFTPDOBJS= in.tftpd.o tftpsubs.o 62 0 stevel OTHERSRC= ../usr.bin/tftp/tftpsubs.c 63 0 stevel K5RLOGINOBJS= in.rlogind.o 64 0 stevel K5RSHDOBJS= in.rshd.o 65 6536 gtb K5TELNETOBJS= in.telnetd.o 66 0 stevel SRCS= $(PROGSRCS) $(OTHERSRC) 67 0 stevel 68 10946 Sangeeta SUBDIRS= bootconfchk htable ifconfig ilbadm in.ftpd in.rdisc in.routed \ 69 8485 Peter in.talkd inetadm inetconv ipmpstat ipqosconf ipsecutils \ 70 8485 Peter kssl/kssladm kssl/ksslcfg ping routeadm snoop sppptun \ 71 8485 Peter traceroute wificonfig 72 0 stevel 73 10946 Sangeeta MSGSUBDIRS= bootconfchk htable ifconfig ilbadm in.ftpd in.routed in.talkd \ 74 10946 Sangeeta inetadm inetconv ipmpstat ipqosconf ipsecutils kssl/ksslcfg \ 75 10946 Sangeeta routeadm sppptun snoop wificonfig 76 0 stevel 77 0 stevel # As programs get lint-clean, add them here and to the 'lint' target. 78 0 stevel # Eventually this hack should go away, and all in PROG should be 79 0 stevel # lint-clean. 80 4235 markfen LINTCLEAN= 6to4relay arp in.rlogind in.rshd in.telnetd in.tftpd \ 81 4235 markfen ipaddrsel route \ 82 515 meem in.rarpd if_mpadm $(SYNCPROG) 83 0 stevel # Likewise, as subdirs get lint-clean, add them here. Once 84 0 stevel # they're all clean, replace the dependency of the lint target 85 0 stevel # with SUBDIRS. Also (sigh) deal with the commented-out build lines 86 0 stevel # for the lint rule. 87 10946 Sangeeta LINTSUBDIRS= bootconfchk ilbadm in.rdisc in.routed in.talkd inetadm \ 88 10946 Sangeeta inetconv ipmpstat ipqosconf ipsecutils ping routeadm sppptun \ 89 10946 Sangeeta traceroute wificonfig 90 0 stevel # And as programs are verified not to attempt to write into constants, 91 0 stevel # -xstrconst should be used to ensure they stay that way. 92 4235 markfen CONSTCLEAN= 93 0 stevel 94 0 stevel include ../../Makefile.cmd 95 0 stevel ROOTMANIFESTDIR= $(ROOTSVCNETWORK) 96 0 stevel $(ROOTMANIFEST) := FILEMODE= 444 97 0 stevel include ../Makefile.cmd-inet 98 0 stevel 99 0 stevel ROOTSBINPROG = $(ROOTFS_PROG:%=$(ROOTSBIN)/%) 100 0 stevel ROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%) 101 0 stevel 102 6536 gtb COMMONOBJS= addr_match.o kcmd.o store_forw_creds.o 103 3011 jbeck COMMONSRCS= $(COMMONOBJS:%.o=$(CMDINETCOMMONDIR)/%.c) 104 0 stevel SRCS+= $(COMMONSRCS) 105 0 stevel 106 0 stevel # 107 0 stevel # Message catalog 108 0 stevel # 109 4235 markfen POFILES= 6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po 110 0 stevel POFILE= usr.sbin.po 111 0 stevel 112 0 stevel all:= TARGET= all 113 0 stevel install:= TARGET= install 114 0 stevel clean:= TARGET= clean 115 0 stevel clobber:= TARGET= clobber 116 0 stevel lint:= TARGET= lint 117 0 stevel _msg:= TARGET= _msg 118 0 stevel 119 6727 gtb CLOBBERFILES += $(ROOTFS_PROG) $(PROG) 120 0 stevel CLEANFILES += $(COMMONOBJS) $(K5RLOGINOBJS) $(K5RSHDOBJS) $(TFTPDOBJS) 121 0 stevel 122 3048 amaguire CPPFLAGS += -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I 123 0 stevel 124 0 stevel include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 125 0 stevel K5LIBS= 126 0 stevel 127 0 stevel # Eventually just plain CFLAGS should be += -v, but not until all in 128 0 stevel # PROGS are lint clean. 129 0 stevel $(LINTCLEAN) := CFLAGS += $(CCVERBOSE) 130 0 stevel $(CONSTCLEAN) := CFLAGS += $(XSTRCONST) 131 0 stevel 132 0 stevel $(SYNCPROG) := LDLIBS += -ldlpi 133 0 stevel $(SOCKETPROG) := LDLIBS += -lsocket 134 0 stevel $(NSLPROG) := LDLIBS += -lnsl 135 0 stevel $(AUDITPROG) := LDLIBS += -lbsm 136 0 stevel $(PAMPROG) := LDLIBS += -lpam 137 0 stevel $(RPCSVCPROG) := LDLIBS += -lrpcsvc 138 6543 rie $(K5PROGS) := LDFLAGS += $(KRUNPATH) \ 139 0 stevel -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL) 140 0 stevel $(K5PROGS) := K5LIBS= -lmech_krb5 141 0 stevel $(K5PROGS) := CPPFLAGS += -I$(SRC)/head \ 142 0 stevel -I$(SRC)/uts/common/ \ 143 0 stevel -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ 144 0 stevel -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 145 0 stevel -I$(SRC)/lib/pam_modules/krb5 146 0 stevel LDLIBS += $(K5LIBS) 147 6543 rie $(TSNETPROG) := LDLIBS += -ltsnet 148 10616 Sebastien $(DLADMPROG) := LDLIBS += -ldladm 149 0 stevel 150 4456 ss150715 in.rarpd := LDLIBS += -linetutil -ldlpi 151 8485 Peter if_mpadm := LDLIBS += -linetutil -lipmp 152 8485 Peter if_mpadm.po := XGETFLAGS += -a 153 0 stevel route := CPPFLAGS += -DNDEBUG 154 4271 rie gettable in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-M%) 155 0 stevel 156 0 stevel .KEEP_STATE: 157 0 stevel 158 0 stevel .PARALLEL: 159 0 stevel 160 4162 kupfer all: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) THIRDPARTYLICENSE.arp 161 0 stevel 162 0 stevel # 163 0 stevel # message catalog 164 0 stevel # 165 0 stevel _msg: $(MSGSUBDIRS) $(POFILE) 166 0 stevel 167 0 stevel syncutil: $(SYNCPROG) 168 0 stevel 169 0 stevel $(POFILE): $(POFILES) 170 0 stevel $(RM) $@ 171 0 stevel cat $(POFILES) > $@ 172 0 stevel 173 3011 jbeck %.o: $(CMDINETCOMMONDIR)/%.c 174 3011 jbeck $(COMPILE.c) -o $@ $< 175 0 stevel 176 6727 gtb in.telnetd: $(K5TELNETOBJS) 177 6727 gtb $(LINK.c) $(K5TELNETOBJS) -o $@ $(LDLIBS) 178 0 stevel $(POST_PROCESS) 179 0 stevel 180 6727 gtb in.rlogind: $(K5RLOGINOBJS) $(COMMONOBJS) 181 6727 gtb $(LINK.c) $(K5RLOGINOBJS) $(COMMONOBJS) -o $@ $(LDLIBS) 182 6536 gtb $(POST_PROCESS) 183 6536 gtb 184 6727 gtb in.rshd: $(K5RSHDOBJS) $(COMMONOBJS) 185 6727 gtb $(LINK.c) $(K5RSHDOBJS) $(COMMONOBJS) -o $@ $(LDLIBS) 186 0 stevel $(POST_PROCESS) 187 0 stevel 188 0 stevel in.tftpd: $(TFTPDOBJS) 189 0 stevel $(LINK.c) $(TFTPDOBJS) -o $@ $(LDLIBS) 190 0 stevel $(POST_PROCESS) 191 0 stevel 192 0 stevel tftpsubs.o: $(OTHERSRC) 193 0 stevel $(COMPILE.c) $(OTHERSRC) -o $@ 194 0 stevel $(POST_PROCESS_O) 195 0 stevel 196 0 stevel $(ROOTUSRSBINLINKS): 197 0 stevel -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@ 198 0 stevel 199 0 stevel install: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) .WAIT $(ROOTUSRSBINPROG) \ 200 0 stevel $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) \ 201 4162 kupfer $(ROOTMANIFEST) THIRDPARTYLICENSE.arp 202 4162 kupfer 203 4162 kupfer THIRDPARTYLICENSE.arp: arp.c 204 4162 kupfer $(SED) -n '/University of California/,/SUCH DAMAGE/p' arp.c > $@ 205 4162 kupfer 206 4162 kupfer CLOBBERFILES += THIRDPARTYLICENSE.arp 207 0 stevel 208 0 stevel # 209 0 stevel # The reason this rule checks for the existence of the 210 0 stevel # Makefile is that some of the directories do not exist 211 0 stevel # in our exportable source builds. 212 0 stevel # 213 0 stevel $(SUBDIRS): FRC 214 0 stevel @if [ -f $@/Makefile ]; then \ 215 0 stevel cd $@; pwd; $(MAKE) $(TARGET); \ 216 0 stevel else \ 217 0 stevel true; \ 218 0 stevel fi 219 0 stevel 220 0 stevel FRC: 221 0 stevel 222 0 stevel check: $(CHKMANIFEST) 223 0 stevel 224 0 stevel clean: $(SUBDIRS) 225 0 stevel -$(RM) $(CLEANFILES) 226 0 stevel 227 0 stevel clobber: $(SUBDIRS) 228 0 stevel -$(RM) $(CLEANFILES) $(CLOBBERFILES) 229 0 stevel 230 0 stevel lint: $(LINTSUBDIRS) 231 10616 Sebastien $(LINT.c) 6to4relay.c $(LDLIBS) -lsocket -ldladm 232 0 stevel $(LINT.c) arp.c $(LDLIBS) -lsocket -lnsl 233 0 stevel @# $(LINT.c) in.rexecd.c $(LDLIBS) -lbsm -lpam 234 0 stevel $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \ 235 0 stevel -I$(SRC)/head -I$(SRC)/uts/common/ \ 236 0 stevel -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ 237 0 stevel -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 238 0 stevel -I$(SRC)/lib/pam_modules/krb5 \ 239 0 stevel in.rlogind.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl 240 0 stevel $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \ 241 0 stevel -I$(SRC)/head -I$(SRC)/uts/common/ \ 242 0 stevel -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ 243 0 stevel -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 244 0 stevel -I$(SRC)/lib/pam_modules/krb5 \ 245 0 stevel in.rshd.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl 246 0 stevel $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 \ 247 0 stevel -erroff=E_GLOBAL_COULD_BE_STATIC2 \ 248 0 stevel -I$(SRC)/head -I$(SRC)/uts/common/ \ 249 0 stevel -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ 250 0 stevel -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 251 0 stevel -I$(SRC)/lib/pam_modules/krb5 \ 252 0 stevel in.telnetd.c $(LDLIBS) -lbsm -lpam -lsocket -lnsl 253 8485 Peter $(LINT.c) if_mpadm.c $(LDLIBS) -lsocket -lnsl -lipmp -linetutil 254 0 stevel $(LINT.c) ipaddrsel.c $(LDLIBS) -lsocket -lnsl 255 1676 jpk $(LINT.c) route.c $(LDLIBS) -lsocket -lnsl -ltsnet 256 0 stevel $(LINT.c) syncinit.c $(LDLIBS) -ldlpi 257 0 stevel $(LINT.c) syncloop.c $(LDLIBS) -ldlpi 258 0 stevel $(LINT.c) syncstat.c $(LDLIBS) -ldlpi 259 0 stevel $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 in.rarpd.c $(LDLIBS) \ 260 0 stevel -lsocket -lnsl 261 0 stevel $(LINT.c) in.tftpd.c ../usr.bin/tftp/tftpsubs.c $(LDLIBS) \ 262 0 stevel -lsocket -lnsl 263 0 stevel 264 0 stevel # EXPORT DELETE START 265 0 stevel EXPORT_SRC: 266 0 stevel $(RM) Makefile+ 267 0 stevel sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 268 0 stevel < Makefile > Makefile+ 269 0 stevel $(RM) Makefile 270 0 stevel $(MV) Makefile+ Makefile 271 0 stevel $(CHMOD) 444 Makefile 272 0 stevel # EXPORT DELETE END 273