xref: /titanic_51/usr/src/cmd/avs/rdc/etc/Makefile (revision ee9c203b1f94e95f194b035c4166c79fab792a78)
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
33OWNER = root
34GROUP = sys
35FILEMODE = 0744
36
37ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%)
38
39ROOTINIT_DPROG1 = $(ROOTINIT_D)/$(PROG1)
40ROOTINIT_DPROG2 = $(ROOTINIT_D)/$(PROG2)
41ROOTINIT_DPROG3 = $(ROOTINIT_D)/$(PROG3)
42
43.KEEP_STATE:
44
45all:	$(SHFILES) $(ETCFILES) $(INITFILES)
46
47install: $(ROOTINIT_DPROG1) $(ROOTINIT_DPROG2) $(ROOTINIT_DPROG3) $(ROOTLIBSVCMETHOD) $(CLUSTERSBINDIR)
48	-$(RM) $(CLUSTERLIBDSCFGSTOPDIR)/15rdc
49	-$(RM) $(CLUSTERLIBDSCFGSTARTDIR)/10rdc
50	-$(RM) $(ROOTLIBSVCMETHOD)/svc-rdc
51	-$(RM) $(ROOTLIBSVCMETHOD)/svc-rdcsyncd
52	-$(RM) $(CLUSTERSBINDIR)/rdc
53	-$(SYMLINK) ../../../sbin/rdc $(CLUSTERLIBDSCFGSTOPDIR)/15rdc
54	-$(SYMLINK) ../../../sbin/rdc $(CLUSTERLIBDSCFGSTARTDIR)/10rdc
55	$(LN) $(ROOTINIT_D)/rdc $(ROOTLIBSVCMETHOD)/svc-rdc
56	$(LN) $(ROOTINIT_D)/rdcfinish $(ROOTLIBSVCMETHOD)/svc-rdcsyncd
57	$(CP) $(ROOTINIT_D)/rdc.cluster $(CLUSTERSBINDIR)/rdc
58
59$(ROOTINIT_DPROG1): $(PROG1)
60	$(INS.file) $(PROG1)
61
62$(ROOTINIT_DPROG2): $(PROG2)
63	$(INS.file) $(PROG2)
64
65$(ROOTINIT_DPROG3): $(PROG3)
66	$(INS.file) $(PROG3)
67
68clean:
69	$(RM) $(SHFILES)
70
71clobber: clean
72
73lint:
74