xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/routeadm/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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#
229444c26fSTom Whitten# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23a192e900Samaguire# Use is subject to license terms.
24a192e900Samaguire#
25a192e900Samaguire
26a192e900Samaguire
27a192e900SamaguireSVCMETHOD=	svc-legacy-routing svc-forwarding
28a192e900SamaguireMANIFEST=	legacy-routing.xml forwarding.xml
29a192e900Samaguire
30a192e900SamaguirePROG=		routeadm
31a192e900SamaguireROOTFS_PROG=	$(PROG)
32a192e900Samaguire
33a192e900Samaguireinclude ../../../Makefile.cmd
34a192e900Samaguire
35a192e900Samaguire#
36a192e900Samaguire# We cannot use the usual manifest rules here since we deliver
379444c26fSTom Whitten# manifests to two different locations, /lib/svc/manifest/network/forwarding.xml
389444c26fSTom Whitten# and /lib/svc/manifest/network/routing/legacy-routing.xml
39a192e900Samaguire#
40a192e900Samaguire
41a192e900SamaguireROOTSVCMANIFESTDIR=	$(ROOTSVCNETWORK) $(ROOTSVCNETWORKROUTING)
429444c26fSTom WhittenROOTSVCMANIFESTS=	$(ROOTSVCNETWORKROUTING)/legacy-routing.xml \
43a192e900Samaguire			$(ROOTSVCNETWORK)/forwarding.xml
44a192e900Samaguire
45ceb97a6aSamaguireinclude ../../Makefile.cmd-inet
46ceb97a6aSamaguire
479444c26fSTom Whitten$(ROOTSVCMANIFESTS)	:=	FILEMODE= 444
48a192e900Samaguire
49a192e900SamaguireROOTUSRSBINLINKS=	$(PROG:%=$(ROOTUSRSBIN)/%)
50a192e900Samaguire
51ceb97a6aSamaguireCPPFLAGS +=	-I../../../../common/svc -I$(CMDINETCOMMONDIR)
52*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
53*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
54a192e900Samaguire$(NOT_RELEASE_BUILD)CPPFLAGS +=	-DDEBUG
55a192e900Samaguire
56ceb97a6aSamaguireLDLIBS +=		-lscf -luutil -lsocket
57a192e900Samaguire
58a192e900SamaguireROOTSBINPROG=		$(ROOTFS_PROG:%=$(ROOTSBIN)/%)
59a192e900Samaguire
60a192e900Samaguire.KEEP_STATE:
61a192e900Samaguire
62a192e900Samaguireall: $(PROG)
63a192e900Samaguire
649444c26fSTom Whitteninstall: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTSVCMANIFESTS) \
65a192e900Samaguire	$(ROOTSVCMETHOD)
66a192e900Samaguire
67a192e900Samaguire$(ROOTUSRSBINLINKS):
68a192e900Samaguire	-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
69a192e900Samaguire
70a192e900Samaguirecheck: 	$(CHKMANIFEST)
71a192e900Samaguire
72a192e900Samaguireclean:
73a192e900Samaguire
74a192e900Samaguirelint: lint_PROG
75a192e900Samaguire
769444c26fSTom Whitten$(ROOTSVCMANIFESTS): $(ROOTSVCMANIFESTDIR)
77a192e900Samaguire
78a192e900Samaguire$(ROOTSVCMANIFESTDIR):
79a192e900Samaguire	$(INS.dir)
80a192e900Samaguire
81a192e900Samaguire$(ROOTSVCNETWORK)/%: %
82a192e900Samaguire	$(INS.file)
83a192e900Samaguire
84a192e900Samaguire$(ROOTSVCNETWORKROUTING)/%: %
85a192e900Samaguire	$(INS.file)
86a192e900Samaguire
87a192e900Samaguireinclude ../../../Makefile.targ
88