17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 545916cd2Sjpk# Common Development and Distribution License (the "License"). 645916cd2Sjpk# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2226fd7700SKrishnendu Sadhukhan - Sun Microsystems# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# Copyright (c) 1990 Mentat Inc. 267c478bd9Sstevel@tonic-gate# 275661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 2878a2e113SAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 29608eb926SHans Rosenfeld# Copyright 2025 Hans Rosenfeld 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gatePROG= netstat 327c478bd9Sstevel@tonic-gate 3378a2e113SAndy FiddamanLOCALOBJS= netstat.o 347c478bd9Sstevel@tonic-gateCOMMONOBJS= compat.o 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 3778a2e113SAndy Fiddaman# netstat uses libproc to grab processes and extract information about their 3878a2e113SAndy Fiddaman# sockets. In order to be able to grab 64-bit processes, netstat itself must 3978a2e113SAndy Fiddaman# be built 64-bit. 4078a2e113SAndy Fiddaman$(BUILD64) include ../../../Makefile.cmd.64 4178a2e113SAndy Fiddaman 427c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd-inet 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gateLOCALSRCS= $(LOCALOBJS:%.o=%.c) 457c478bd9Sstevel@tonic-gateCOMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:%.o=%.c) 467c478bd9Sstevel@tonic-gate 47608eb926SHans RosenfeldOBJS= $(LOCALOBJS) $(COMMONOBJS) 48608eb926SHans RosenfeldSRCS= $(LOCALSRCS) $(COMMONSRCS) 4926fd7700SKrishnendu Sadhukhan - Sun Microsystems 50*da3b00f4SHans RosenfeldCLEANFILES = $(OBJS) 51*da3b00f4SHans Rosenfeld 52608eb926SHans Rosenfeldinclude $(SRC)/cmd/stat/Makefile.stat 5326fd7700SKrishnendu Sadhukhan - Sun Microsystems 54608eb926SHans RosenfeldCPPFLAGS += -DNDEBUG -I$(CMDINETCOMMONDIR) 5578a2e113SAndy FiddamanLDLIBS += -ldhcpagent -lsocket -lnsl -lkstat -ltsnet -ltsol -lproc 567c478bd9Sstevel@tonic-gate 5778a2e113SAndy FiddamanCSTD= $(CSTD_GNU99) 585661bb76SJohn Levon 597c478bd9Sstevel@tonic-gate.KEEP_STATE: 607c478bd9Sstevel@tonic-gate 61608eb926SHans Rosenfeldall: $(PROG) 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gateROOTPROG= $(PROG:%=$(ROOTBIN)/%) 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 667c478bd9Sstevel@tonic-gate $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 677c478bd9Sstevel@tonic-gate $(POST_PROCESS) 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateinstall: all $(ROOTPROG) 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gateclean: 72*da3b00f4SHans Rosenfeld $(RM) $(CLEANFILES) 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 757c478bd9Sstevel@tonic-gate 76