Makefile revision ceb97a6a3232437e1f0b4c6b8604bc1b4245ccc5
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# CDDL HEADER START
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# The contents of this file are subject to the terms of the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Common Development and Distribution License (the "License").
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# You may not use this file except in compliance with the License.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# or http://www.opensolaris.org/os/licensing.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# See the License for the specific language governing permissions
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and limitations under the License.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# If applicable, add the following below this CDDL HEADER, with the
f8f37672a57524560fbdde52484e6ae3de1c3354Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# CDDL HEADER END
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews#
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews#
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Use is subject to license terms.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# ident "%Z%%M% %I% %E% SMI"
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSVCMETHOD= svc-legacy-routing svc-forwarding
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsMANIFEST= legacy-routing.xml forwarding.xml
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsPROG= routeadm
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsROOTFS_PROG= $(PROG)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsinclude ../../../Makefile.cmd
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
4038ab55037184d76153afd3c469aa8c85adf85dMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# We cannot use the usual manifest rules here since we deliver
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# manifests to two different locations, /var/svc/manifest/network/forwarding.xml
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# and /var/svc/manifest/network/routing/legacy-routing.xml
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
a0624cf8d5711cca4e3907859fbc8062a7e460faMark AndrewsROOTSVCMANIFESTDIR= $(ROOTSVCNETWORK) $(ROOTSVCNETWORKROUTING)
a0624cf8d5711cca4e3907859fbc8062a7e460faMark AndrewsROOTSVCMANIFEST= $(ROOTSVCNETWORKROUTING)/legacy-routing.xml \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews $(ROOTSVCNETWORK)/forwarding.xml
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsinclude ../../Makefile.cmd-inet
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson$(ROOTSVCMANIFEST) := OWNER= root
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews$(ROOTSVCMANIFEST) := GROUP= sys
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews$(ROOTSVCMANIFEST) := FILEMODE= 444
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsROOTUSRSBINLINKS= $(PROG:%=$(ROOTUSRSBIN)/%)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsCPPFLAGS += -I../../../../common/svc -I$(CMDINETCOMMONDIR)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsLDLIBS += -lscf -luutil -lsocket
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsROOTSBINPROG= $(ROOTFS_PROG:%=$(ROOTSBIN)/%)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews.KEEP_STATE:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsall: $(PROG)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsinstall: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTSVCMANIFEST) \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(ROOTSVCMETHOD)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews$(ROOTUSRSBINLINKS):
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewscheck: $(CHKMANIFEST)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonclean:
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonlint: lint_PROG
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson$(ROOTSVCMANIFEST): $(ROOTSVCMANIFESTDIR)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson$(ROOTSVCMANIFESTDIR):
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(INS.dir)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson$(ROOTSVCNETWORK)/%: %
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(INS.file)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson$(ROOTSVCNETWORKROUTING)/%: %
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(INS.file)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
c25080dc50542213058c240226c9f342186e6285Mark Andrewsinclude ../../../Makefile.targ
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews