xref: /titanic_41/usr/src/cmd/cmd-inet/etc/init.d/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/cmd-inet/etc/init.d/Makefile
29
30PROG4=	ncalogd
31PROG5=	ncakmod
32MIPD=	mipagent
33PPPD=	pppd
34PROG=	$(PROG4) $(PROG5) \
35	$(MIPD) $(PPPD)
36
37include ../../../Makefile.cmd
38
39STARTINET3= $(ROOTETC)/rc2.d/S94ncalogd
40STARTINET4= $(ROOTETC)/rc2.d/S42ncakmod
41
42MIPDK= K06mipagent
43MIPDS= S80mipagent
44
45PPPDK=	K50pppd
46PPPDS=	S47pppd
47
48INITD= $(ROOTETC)/init.d
49DIRS= $(INITD) $(ROOTETC)/rc0.d $(ROOTETC)/rcS.d $(ROOTETC)/rc1.d \
50	$(ROOTETC)/rc2.d $(ROOTETC)/rc3.d
51FILEMODE= 0744
52OWNER= root
53GROUP= sys
54
55ETCINITPROG=	$(PROG:%=$(INITD)/%)
56
57.KEEP_STATE:
58
59all: $(PROG)
60
61install: all $(DIRS) $(ETCINITPROG) $(ETCDFLTPROG) ln_PROG
62
63$(INITD)/% : % $(INITD)
64	$(INS.file)
65
66ln_PROG : $(ETCINITPROG)
67	@for dir in rc0.d rcS.d rc1.d; do \
68		echo $(LN) $(INITD)/$(MIPD) $(ROOTETC)/$$dir/$(MIPDK); \
69		$(RM) $(ROOTETC)/$$dir/$(MIPDK); \
70		$(LN) $(INITD)/$(MIPD) $(ROOTETC)/$$dir/$(MIPDK); \
71		echo $(LN) $(INITD)/$(PROG4) $(ROOTETC)/$$dir/K34ncalogd; \
72		$(RM) $(ROOTETC)/$$dir/K34ncalogd; \
73		$(LN) $(INITD)/$(PROG4) $(ROOTETC)/$$dir/K34ncalogd; \
74		echo $(LN) $(INITD)/$(PPPD) $(ROOTETC)/$$dir/$(PPPDK); \
75		$(RM) $(ROOTETC)/$$dir/$(PPPDK); \
76		$(LN) $(INITD)/$(PPPD) $(ROOTETC)/$$dir/$(PPPDK); \
77	done
78	-$(RM) $(ROOTETC)/rc2.d/$(MIPDK)
79	$(LN) $(INITD)/$(MIPD) $(ROOTETC)/rc2.d/$(MIPDK)
80	-$(RM) $(ROOTETC)/rc3.d/$(MIPDS)
81	$(LN) $(INITD)/$(MIPD) $(ROOTETC)/rc3.d/$(MIPDS)
82	-$(RM) $(STARTINET3)
83	$(LN) $(INITD)/$(PROG4) $(STARTINET3)
84	-$(RM) $(STARTINET4)
85	$(LN) $(INITD)/$(PROG5) $(STARTINET4)
86	-$(RM) $(ROOTETC)/rc2.d/$(PPPDS)
87	$(LN) $(INITD)/$(PPPD) $(ROOTETC)/rc2.d/$(PPPDS)
88
89$(DIRS):
90	$(INS.dir)
91
92clean:
93
94lint:
95
96include ../../../Makefile.targ
97
98.PARALLEL:
99