xref: /titanic_52/usr/src/cmd/cmd-inet/usr.sbin/routeadm/Makefile (revision 940d71d237794874e18a0eb72f6564821a823517)
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
47include ../../Makefile.cmd-inet
48
49$(ROOTSVCMANIFEST)	:=	OWNER= root
50$(ROOTSVCMANIFEST)	:=	GROUP= sys
51$(ROOTSVCMANIFEST)	:=	FILEMODE= 444
52
53ROOTUSRSBINLINKS=	$(PROG:%=$(ROOTUSRSBIN)/%)
54
55CPPFLAGS +=	-I../../../../common/svc -I$(CMDINETCOMMONDIR)
56$(NOT_RELEASE_BUILD)CPPFLAGS +=	-DDEBUG
57
58LDLIBS +=		-lscf -luutil -lsocket
59
60ROOTSBINPROG=		$(ROOTFS_PROG:%=$(ROOTSBIN)/%)
61
62.KEEP_STATE:
63
64all: $(PROG)
65
66install: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTSVCMANIFEST) \
67	$(ROOTSVCMETHOD)
68
69$(ROOTUSRSBINLINKS):
70	-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
71
72check: 	$(CHKMANIFEST)
73
74clean:
75
76lint: lint_PROG
77
78$(ROOTSVCMANIFEST): $(ROOTSVCMANIFESTDIR)
79
80$(ROOTSVCMANIFESTDIR):
81	$(INS.dir)
82
83$(ROOTSVCNETWORK)/%: %
84	$(INS.file)
85
86$(ROOTSVCNETWORKROUTING)/%: %
87	$(INS.file)
88
89include ../../../Makefile.targ
90