xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/routeadm/Makefile (revision ceb97a6a3232437e1f0b4c6b8604bc1b4245ccc5)
1a192e900Samaguire#
2a192e900Samaguire# CDDL HEADER START
3a192e900Samaguire#
4a192e900Samaguire# The contents of this file are subject to the terms of the
5a192e900Samaguire# Common Development and Distribution License (the "License").
6a192e900Samaguire# You may not use this file except in compliance with the License.
7a192e900Samaguire#
8a192e900Samaguire# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9a192e900Samaguire# or http://www.opensolaris.org/os/licensing.
10a192e900Samaguire# See the License for the specific language governing permissions
11a192e900Samaguire# and limitations under the License.
12a192e900Samaguire#
13a192e900Samaguire# When distributing Covered Code, include this CDDL HEADER in each
14a192e900Samaguire# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15a192e900Samaguire# If applicable, add the following below this CDDL HEADER, with the
16a192e900Samaguire# fields enclosed by brackets "[]" replaced with your own identifying
17a192e900Samaguire# information: Portions Copyright [yyyy] [name of copyright owner]
18a192e900Samaguire#
19a192e900Samaguire# CDDL HEADER END
20a192e900Samaguire#
21a192e900Samaguire#
22a192e900Samaguire# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23a192e900Samaguire# Use is subject to license terms.
24a192e900Samaguire#
25a192e900Samaguire# ident	"%Z%%M%	%I%	%E% SMI"
26a192e900Samaguire#
27a192e900Samaguire
28a192e900Samaguire
29a192e900SamaguireSVCMETHOD=	svc-legacy-routing svc-forwarding
30a192e900SamaguireMANIFEST=	legacy-routing.xml forwarding.xml
31a192e900Samaguire
32a192e900SamaguirePROG=		routeadm
33a192e900SamaguireROOTFS_PROG=	$(PROG)
34a192e900Samaguire
35a192e900Samaguireinclude ../../../Makefile.cmd
36a192e900Samaguire
37a192e900Samaguire#
38a192e900Samaguire# We cannot use the usual manifest rules here since we deliver
39a192e900Samaguire# manifests to two different locations, /var/svc/manifest/network/forwarding.xml
40a192e900Samaguire# and /var/svc/manifest/network/routing/legacy-routing.xml
41a192e900Samaguire#
42a192e900Samaguire
43a192e900SamaguireROOTSVCMANIFESTDIR=	$(ROOTSVCNETWORK) $(ROOTSVCNETWORKROUTING)
44a192e900SamaguireROOTSVCMANIFEST=	$(ROOTSVCNETWORKROUTING)/legacy-routing.xml \
45a192e900Samaguire			$(ROOTSVCNETWORK)/forwarding.xml
46a192e900Samaguire
47*ceb97a6aSamaguireinclude ../../Makefile.cmd-inet
48*ceb97a6aSamaguire
49a192e900Samaguire$(ROOTSVCMANIFEST)	:=	OWNER= root
50a192e900Samaguire$(ROOTSVCMANIFEST)	:=	GROUP= sys
51a192e900Samaguire$(ROOTSVCMANIFEST)	:=	FILEMODE= 444
52a192e900Samaguire
53a192e900SamaguireROOTUSRSBINLINKS=	$(PROG:%=$(ROOTUSRSBIN)/%)
54a192e900Samaguire
55*ceb97a6aSamaguireCPPFLAGS +=	-I../../../../common/svc -I$(CMDINETCOMMONDIR)
56a192e900Samaguire$(NOT_RELEASE_BUILD)CPPFLAGS +=	-DDEBUG
57a192e900Samaguire
58*ceb97a6aSamaguireLDLIBS +=		-lscf -luutil -lsocket
59a192e900Samaguire
60a192e900SamaguireROOTSBINPROG=		$(ROOTFS_PROG:%=$(ROOTSBIN)/%)
61a192e900Samaguire
62a192e900Samaguire.KEEP_STATE:
63a192e900Samaguire
64a192e900Samaguireall: $(PROG)
65a192e900Samaguire
66a192e900Samaguireinstall: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTSVCMANIFEST) \
67a192e900Samaguire	$(ROOTSVCMETHOD)
68a192e900Samaguire
69a192e900Samaguire$(ROOTUSRSBINLINKS):
70a192e900Samaguire	-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
71a192e900Samaguire
72a192e900Samaguirecheck: 	$(CHKMANIFEST)
73a192e900Samaguire
74a192e900Samaguireclean:
75a192e900Samaguire
76a192e900Samaguirelint: lint_PROG
77a192e900Samaguire
78a192e900Samaguire$(ROOTSVCMANIFEST): $(ROOTSVCMANIFESTDIR)
79a192e900Samaguire
80a192e900Samaguire$(ROOTSVCMANIFESTDIR):
81a192e900Samaguire	$(INS.dir)
82a192e900Samaguire
83a192e900Samaguire$(ROOTSVCNETWORK)/%: %
84a192e900Samaguire	$(INS.file)
85a192e900Samaguire
86a192e900Samaguire$(ROOTSVCNETWORKROUTING)/%: %
87a192e900Samaguire	$(INS.file)
88a192e900Samaguire
89a192e900Samaguireinclude ../../../Makefile.targ
90