xref: /titanic_52/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile (revision f808c858fa61e7769218966759510a8b1190dfcf)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20
21
22#
23#
24#ident	"%Z%%M%	%I%	%E% SMI"
25#
26# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
27# Use is subject to license terms.
28#
29# Copyright (c) 1990 Mentat Inc.
30#
31# cmd/cmd-inet/usr.bin/netstat/Makefile
32
33PROG=		netstat
34
35LOCALOBJS=	netstat.o unix.o
36COMMONOBJS=	compat.o
37OBJS=		$(LOCALOBJS) $(COMMONOBJS)
38
39include ../../../Makefile.cmd
40include ../../Makefile.cmd-inet
41
42LOCALSRCS=	$(LOCALOBJS:%.o=%.c)
43COMMONSRCS=	$(CMDINETCOMMONDIR)/$(COMMONOBJS:%.o=%.c)
44SRCS=		$(LOCALSRCS) $(COMMONSRCS)
45
46CPPFLAGS += -DNDEBUG -I$(CMDINETCOMMONDIR)
47LAZYLIBS = $(ZLAZYLOAD) -ltsol $(ZNOLAZYLOAD)
48lint := LAZYLIBS = -ltsol
49LDLIBS += -ldhcpagent -lcmd -lsocket -lnsl -lkstat -ltsnet $(LAZYLIBS)
50
51.KEEP_STATE:
52
53all: $(PROG) $(NPROG)
54
55ROOTPROG=   $(PROG:%=$(ROOTBIN)/%)
56
57$(PROG): $(OBJS)
58	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
59	$(POST_PROCESS)
60
61install: all $(ROOTPROG)
62
63clean:
64	$(RM) $(OBJS)
65
66lint:	lint_SRCS
67
68include ../../../Makefile.targ
69
70