xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile (revision 2e07277863d69344215bd0c72e171d0c854dbe56)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25# Copyright (c) 2018, Joyent, Inc.
26# Copyright 2024 Bill Sommerfeld <sommerfeld@hamachi.org>
27#
28
29PROG=	snoop
30OBJS=	nfs4_xdr.o snoop.o snoop_aarp.o snoop_adsp.o snoop_aecho.o \
31	snoop_apple.o snoop_arp.o snoop_atp.o snoop_bparam.o \
32	snoop_bpdu.o \
33	snoop_capture.o snoop_dhcp.o snoop_dhcpv6.o snoop_display.o \
34	snoop_dns.o snoop_ether.o \
35	snoop_filter.o snoop_http.o snoop_icmp.o snoop_igmp.o snoop_ip.o \
36	snoop_ipaddr.o snoop_ipsec.o snoop_isis.o \
37	snoop_ldap.o snoop_mip.o snoop_mount.o \
38	snoop_nbp.o snoop_netbios.o snoop_nfs.o snoop_nfs3.o snoop_nfs4.o \
39	snoop_nfs_acl.o snoop_nis.o snoop_nlm.o snoop_ntp.o \
40	snoop_pf.o snoop_ospf.o snoop_ospf6.o snoop_pmap.o snoop_ppp.o \
41	snoop_pppoe.o snoop_rip.o snoop_rip6.o snoop_rpc.o snoop_rpcprint.o \
42	snoop_rpcsec.o snoop_rport.o snoop_rquota.o snoop_rstat.o snoop_rtmp.o \
43	snoop_sctp.o snoop_slp.o snoop_smb.o snoop_socks.o snoop_solarnet.o \
44	snoop_tcp.o snoop_tftp.o snoop_trill.o snoop_udp.o snoop_vxlan.o \
45	snoop_zip.o
46
47SRCS=	$(OBJS:.o=.c)
48HDRS=	snoop.h snoop_mip.h at.h snoop_ospf.h snoop_ospf6.h
49
50include	../../../Makefile.cmd
51
52CPPFLAGS += -I. -I$(SRC)/common/net/dhcp \
53	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
54LDLIBS += -ldhcputil -ldlpi -lresolv -lsocket -lnsl -ltsol
55LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
56CERRWARN += -_gcc=-Wno-switch
57CERRWARN += -_gcc=-Wno-implicit-function-declaration
58CERRWARN += $(CNOWARN_UNINIT)
59CERRWARN += -_gcc=-Wno-clobbered
60CERRWARN += -_gcc=-Wno-unused-value
61CERRWARN += -_gcc=-Wno-parentheses
62CERRWARN += -_gcc=-Wno-unused-variable
63CERRWARN += -_gcc=-Wno-unused-label
64CERRWARN += -_gcc=-Wno-unused-function
65
66# we really should have smatch running on this code but...
67SMATCH=off
68
69.KEEP_STATE:
70
71.PARALLEL: $(OBJS)
72
73all:	$(PROG)
74
75$(PROG): $(OBJS) $(MAPFILE.NGB)
76	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
77	$(POST_PROCESS)
78
79install:	all $(ROOTUSRSBINPROG)
80
81clean:
82	$(RM) $(OBJS)
83
84include	../../../Makefile.targ
85