# # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2022 Garrett D'Amore # Copyright 2019, Joyent, Inc. # SYNCPROG= syncinit syncloop syncstat # Hammerhead: Removed in Phase A: in.comsat, in.fingerd (obsolete) # Hammerhead: Removed in Phase A: in.rexecd, in.rlogind, in.rshd, in.rwhod # (insecure r-commands, use SSH) # Hammerhead: Removed in Phase A: in.telnetd (insecure, use SSH; client kept) # Hammerhead: Removed in Phase B: in.rarpd (obsolete, replaced by DHCP) # Hammerhead: Removed in Phase B: in.tftpd (obsolete trivial FTP daemon) PROG= 6to4relay if_mpadm \ ipaddrsel \ ndd ndp $(SYNCPROG) # Hammerhead: Removed manifests for removed services MANIFEST= SVCMETHOD= svc-sockfilter ROOTFS_PROG= arp hostconfig route soconfig SBINLINKS= arp hostconfig route RPCSVCPROG= hostconfig SOCKETPROG= 6to4relay arp hostconfig if_mpadm \ ipaddrsel ndp route NSLPROG= 6to4relay arp hostconfig \ ipaddrsel ndp route TSNETPROG= route DLADMPROG= 6to4relay PROGSRCS= $(PROG:%=%.c) SRCS= $(PROGSRCS) # Hammerhead: Removed in Phase A: in.talkd, nwamadm, nwamcfg (obsolete) # Hammerhead: Removed in Phase B: in.rdisc (obsolete router discovery) # Hammerhead: Removed in Phase B: in.routed (obsolete RIP routing daemon) SUBDIRS= ifconfig ilbadm \ inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \ ping routeadm \ snoop sppptun traceroute wificonfig MSGSUBDIRS= ifconfig ilbadm \ inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \ routeadm sppptun snoop wificonfig # This controls the degree of compiler warnings emitted, and is named for # 'lint' for historical reasons. Eventually this hack should go away, and all # in PROG should be clean. LINTCLEAN= 6to4relay arp \ ipaddrsel ndp route \ if_mpadm $(SYNCPROG) include ../../Makefile.cmd ROOTMANIFESTDIR= $(ROOTSVCNETWORK) $(ROOTMANIFEST) : FILEMODE= 444 include ../Makefile.cmd-inet ROOTSBINPROG = $(ROOTFS_PROG:%=$(ROOTSBIN)/%) ROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%) # Hammerhead: COMMONOBJS (kcmd, addr_match, store_forw_creds) removed with r-commands CERRWARN += -Wno-implicit-function-declaration CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -Wno-unused-variable CERRWARN += -Wno-unused-function CERRWARN += -Wno-parentheses CERRWARN += -Wno-char-subscripts CERRWARN += -Wno-extra CERRWARN += -Wno-address # Hammerhead: Suppress DLPI and socket type mismatch warnings CERRWARN += -Wno-incompatible-pointer-types # Hammerhead: Suppress pointer/int cast and overflow warnings in legacy networking code CERRWARN += -Wno-pointer-to-int-cast CERRWARN += -Wno-int-to-pointer-cast CERRWARN += -Wno-overflow # "missing type for func" SMATCH=off # # Message catalog # POFILES= 6to4relay.po if_mpadm.po ipaddrsel.po route.po \ soconfig.po POFILE= usr.sbin.po all: TARGET= all install: TARGET= install clean: TARGET= clean clobber: TARGET= clobber _msg: TARGET= _msg CLOBBERFILES += $(ROOTFS_PROG) $(PROG) CLEANFILES += CPPFLAGS += -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) # Hammerhead: Kerberos r-command support removed (Phase A) # Eventually just plain CFLAGS should be += -v, but not until all in # PROGS are lint clean. $(LINTCLEAN) : CFLAGS += $(CCVERBOSE) $(SYNCPROG) : LDLIBS += -ldlpi $(SOCKETPROG) : LDLIBS += -lsocket $(NSLPROG) : LDLIBS += -lnsl $(RPCSVCPROG) : LDLIBS += -lrpcsvc $(TSNETPROG) : LDLIBS += -ltsnet $(DLADMPROG) : LDLIBS += -ldladm if_mpadm : LDLIBS += -linetutil -lipmp if_mpadm.po : XGETFLAGS += -a route : CPPFLAGS += -DNDEBUG ndd : LDLIBS += -ldladm -lipadm $(RELEASE_BUILD)ndd : CERRWARN += -Wno-unused .KEEP_STATE: .PARALLEL: all: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) THIRDPARTYLICENSE.arp # # message catalog # _msg: $(MSGSUBDIRS) $(POFILE) syncutil: $(SYNCPROG) $(POFILE): $(POFILES) $(RM) $@ cat $(POFILES) > $@ %.o: $(CMDINETCOMMONDIR)/%.c $(COMPILE.c) -o $@ $< # Hammerhead: Phase A/B removed build rules for in.telnetd, in.rlogind, # in.rshd, in.tftpd $(ROOTUSRSBINLINKS): -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@ install: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) .WAIT $(ROOTUSRSBINPROG) \ $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) \ $(ROOTMANIFEST) $(ROOTSVCMETHOD) THIRDPARTYLICENSE.arp THIRDPARTYLICENSE.arp: arp.c $(SED) -n '/University of California/,/SUCH DAMAGE/p' arp.c > $@ CLOBBERFILES += THIRDPARTYLICENSE.arp $(SUBDIRS): FRC cd $@; pwd; $(MAKE) $(TARGET) FRC: check: $(CHKMANIFEST) clean: $(SUBDIRS) clean_local clean_local: $(RM) $(CLEANFILES) clobber: $(SUBDIRS) clobber_local clobber_local: clean_local $(RM) $(CLOBBERFILES)