Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt#
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# CDDL HEADER START
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt#
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt# or http://www.opensolaris.org/os/licensing.
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# See the License for the specific language governing permissions
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# and limitations under the License.
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt#
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# When distributing Covered Code, include this CDDL HEADER in each
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# If applicable, add the following below this CDDL HEADER, with the
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# information: Portions Copyright [yyyy] [name of copyright owner]
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt#
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# CDDL HEADER END
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt#
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt#
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt# Use is subject to license terms.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt#
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# Copyright (c) 1990 Mentat Inc.
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt#
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt# cmd/cmd-inet/usr.bin/netstat/Makefile
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntPROG= netstat
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntLOCALOBJS= netstat.o unix.o
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntCOMMONOBJS= compat.o
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Huntinclude ../../../Makefile.cmd
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Huntinclude ../../Makefile.cmd-inet
a27dc50157eb8267becffcd800eb1abf7e16ae7cEvan Hunt
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntLOCALSRCS= $(LOCALOBJS:%.o=%.c)
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntCOMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:%.o=%.c)
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt
STATCOMMONDIR = $(SRC)/cmd/stat/common
STAT_COMMON_OBJS = timestamp.o
STAT_COMMON_SRCS = $(STAT_COMMON_OBJS:%.o=$(STATCOMMONDIR)/%.c)
OBJS= $(LOCALOBJS) $(COMMONOBJS) $(STAT_COMMON_OBJS)
SRCS= $(LOCALSRCS) $(COMMONSRCS) $(STAT_COMMON_SRCS)
CPPFLAGS += -DNDEBUG -I$(CMDINETCOMMONDIR) -I$(STATCOMMONDIR)
CERRWARN += -_gcc=-Wno-uninitialized
CERRWARN += -_gcc=-Wno-parentheses
LDLIBS += -ldhcpagent -lsocket -lnsl -lkstat -ltsnet -ltsol
.KEEP_STATE:
all: $(PROG) $(NPROG)
ROOTPROG= $(PROG:%=$(ROOTBIN)/%)
$(PROG): $(OBJS)
$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
%.o : $(STATCOMMONDIR)/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
install: all $(ROOTPROG)
clean:
$(RM) $(OBJS)
lint: lint_SRCS
include ../../../Makefile.targ