xref: /titanic_50/usr/src/cmd/avs/rdc/etc/Makefile (revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4)
1# CDDL HEADER START
2#
3# The contents of this file are subject to the terms of the
4# Common Development and Distribution License (the "License").
5# You may not use this file except in compliance with the License.
6#
7# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8# or http://www.opensolaris.org/os/licensing.
9# See the License for the specific language governing permissions
10# and limitations under the License.
11#
12# When distributing Covered Code, include this CDDL HEADER in each
13# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14# If applicable, add the following below this CDDL HEADER, with the
15# fields enclosed by brackets "[]" replaced with your own identifying
16# information: Portions Copyright [yyyy] [name of copyright owner]
17#
18# CDDL HEADER END
19#
20#
21# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24include ../../../Makefile.cmd
25include ../../Makefile.com
26
27PROG1 = rdc
28PROG2 = rdcfinish
29PROG3 = rdc.cluster
30SHFILES = $(PROG1) $(PROG2) $(PROG3)
31ROOTINIT_D = $(ROOTETC)/init.d
32
33FILEMODE = 0744
34
35ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%)
36
37ROOTINIT_DPROG1 = $(ROOTINIT_D)/$(PROG1)
38ROOTINIT_DPROG2 = $(ROOTINIT_D)/$(PROG2)
39ROOTINIT_DPROG3 = $(ROOTINIT_D)/$(PROG3)
40
41.KEEP_STATE:
42
43all:	$(SHFILES) $(ETCFILES) $(INITFILES)
44
45install: $(ROOTINIT_DPROG1) $(ROOTINIT_DPROG2) $(ROOTINIT_DPROG3) $(ROOTLIBSVCMETHOD) $(CLUSTERSBINDIR)
46	-$(RM) $(CLUSTERLIBDSCFGSTOPDIR)/15rdc
47	-$(RM) $(CLUSTERLIBDSCFGSTARTDIR)/10rdc
48	-$(RM) $(ROOTLIBSVCMETHOD)/svc-rdc
49	-$(RM) $(ROOTLIBSVCMETHOD)/svc-rdcsyncd
50	-$(RM) $(CLUSTERSBINDIR)/rdc
51	-$(SYMLINK) ../../../sbin/rdc $(CLUSTERLIBDSCFGSTOPDIR)/15rdc
52	-$(SYMLINK) ../../../sbin/rdc $(CLUSTERLIBDSCFGSTARTDIR)/10rdc
53	$(LN) $(ROOTINIT_D)/rdc $(ROOTLIBSVCMETHOD)/svc-rdc
54	$(LN) $(ROOTINIT_D)/rdcfinish $(ROOTLIBSVCMETHOD)/svc-rdcsyncd
55	$(CP) $(ROOTINIT_D)/rdc.cluster $(CLUSTERSBINDIR)/rdc
56
57$(ROOTINIT_DPROG1): $(PROG1)
58	$(INS.file) $(PROG1)
59
60$(ROOTINIT_DPROG2): $(PROG2)
61	$(INS.file) $(PROG2)
62
63$(ROOTINIT_DPROG3): $(PROG3)
64	$(INS.file) $(PROG3)
65
66clean:
67	$(RM) $(SHFILES)
68
69clobber: clean
70
71lint:
72