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