xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/routeadm/Makefile (revision 99ebb4ca412cb0a19d77a3899a87c055b9c30fa8)
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# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28
29SVCMETHOD=	svc-legacy-routing svc-forwarding
30MANIFEST=	legacy-routing.xml forwarding.xml
31
32PROG=		routeadm
33ROOTFS_PROG=	$(PROG)
34
35include ../../../Makefile.cmd
36
37#
38# We cannot use the usual manifest rules here since we deliver
39# manifests to two different locations, /var/svc/manifest/network/forwarding.xml
40# and /var/svc/manifest/network/routing/legacy-routing.xml
41#
42
43ROOTSVCMANIFESTDIR=	$(ROOTSVCNETWORK) $(ROOTSVCNETWORKROUTING)
44ROOTSVCMANIFEST=	$(ROOTSVCNETWORKROUTING)/legacy-routing.xml \
45			$(ROOTSVCNETWORK)/forwarding.xml
46
47$(ROOTSVCMANIFEST)	:=	OWNER= root
48$(ROOTSVCMANIFEST)	:=	GROUP= sys
49$(ROOTSVCMANIFEST)	:=	FILEMODE= 444
50
51ROOTUSRSBINLINKS=	$(PROG:%=$(ROOTUSRSBIN)/%)
52
53CPPFLAGS +=	-I../../../../common/svc
54$(NOT_RELEASE_BUILD)CPPFLAGS +=	-DDEBUG
55
56LDLIBS +=		-lscf -luutil
57
58ROOTSBINPROG=		$(ROOTFS_PROG:%=$(ROOTSBIN)/%)
59
60.KEEP_STATE:
61
62all: $(PROG)
63
64install: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTSVCMANIFEST) \
65	$(ROOTSVCMETHOD)
66
67$(ROOTUSRSBINLINKS):
68	-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
69
70check: 	$(CHKMANIFEST)
71
72clean:
73
74lint: lint_PROG
75
76$(ROOTSVCMANIFEST): $(ROOTSVCMANIFESTDIR)
77
78$(ROOTSVCMANIFESTDIR):
79	$(INS.dir)
80
81$(ROOTSVCNETWORK)/%: %
82	$(INS.file)
83
84$(ROOTSVCNETWORKROUTING)/%: %
85	$(INS.file)
86
87include ../../../Makefile.targ
88