xref: /illumos-gate/usr/src/cmd/dlmgmtd/Makefile (revision d62bc4ba)
1*d62bc4baSyz#
2*d62bc4baSyz# CDDL HEADER START
3*d62bc4baSyz#
4*d62bc4baSyz# The contents of this file are subject to the terms of the
5*d62bc4baSyz# Common Development and Distribution License (the "License").
6*d62bc4baSyz# You may not use this file except in compliance with the License.
7*d62bc4baSyz#
8*d62bc4baSyz# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*d62bc4baSyz# or http://www.opensolaris.org/os/licensing.
10*d62bc4baSyz# See the License for the specific language governing permissions
11*d62bc4baSyz# and limitations under the License.
12*d62bc4baSyz#
13*d62bc4baSyz# When distributing Covered Code, include this CDDL HEADER in each
14*d62bc4baSyz# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*d62bc4baSyz# If applicable, add the following below this CDDL HEADER, with the
16*d62bc4baSyz# fields enclosed by brackets "[]" replaced with your own identifying
17*d62bc4baSyz# information: Portions Copyright [yyyy] [name of copyright owner]
18*d62bc4baSyz#
19*d62bc4baSyz# CDDL HEADER END
20*d62bc4baSyz#
21*d62bc4baSyz#
22*d62bc4baSyz# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*d62bc4baSyz# Use is subject to license terms.
24*d62bc4baSyz#
25*d62bc4baSyz# ident	"%Z%%M%	%I%	%E% SMI"
26*d62bc4baSyz#
27*d62bc4baSyz
28*d62bc4baSyzPROG=		dlmgmtd
29*d62bc4baSyzOBJS=		dlmgmt_main.o dlmgmt_door.o dlmgmt_util.o dlmgmt_db.o
30*d62bc4baSyzSRCS=		$(OBJS:.o=.c)
31*d62bc4baSyzSVCMETHOD=	svc-dlmgmtd
32*d62bc4baSyzMANIFEST=	dlmgmt.xml
33*d62bc4baSyzDOOR=     	.dlmgmt_door
34*d62bc4baSyzCFGFILES=	datalink.conf
35*d62bc4baSyz
36*d62bc4baSyzinclude ../Makefile.cmd
37*d62bc4baSyz
38*d62bc4baSyzROOTMANIFESTDIR=	$(ROOTSVCNETWORK)
39*d62bc4baSyzROOTETCDOOR=		$(DOOR:%=$(ROOTETC)/%)
40*d62bc4baSyz$(ROOTETCDOOR) := FILEMODE = 444
41*d62bc4baSyzROOTCFGDIR=		$(ROOTETC)/dladm
42*d62bc4baSyzROOTCFGFILES=		$(CFGFILES:%=$(ROOTCFGDIR)/%)
43*d62bc4baSyz
44*d62bc4baSyz$(ROOTCFGFILES)	:= OWNER= dladm
45*d62bc4baSyz$(ROOTCFGFILES)	:= GROUP= sys
46*d62bc4baSyz$(ROOTCFGDIR)/datalink.conf	:= FILEMODE= 644
47*d62bc4baSyz
48*d62bc4baSyzLDLIBS += -ldladm -ldlpi -lavl
49*d62bc4baSyz
50*d62bc4baSyz.KEEP_STATE:
51*d62bc4baSyz
52*d62bc4baSyzall: $(PROG) $(DOOR)
53*d62bc4baSyz
54*d62bc4baSyz$(DOOR):
55*d62bc4baSyz	$(TOUCH) $(DOOR)
56*d62bc4baSyz
57*d62bc4baSyz$(PROG): $(OBJS)
58*d62bc4baSyz	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
59*d62bc4baSyz	$(POST_PROCESS)
60*d62bc4baSyz
61*d62bc4baSyzinstall: all $(ROOTSBINPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD) $(ROOTETCDOOR) \
62*d62bc4baSyz	$(ROOTCFGDIR) $(ROOTCFGFILES)
63*d62bc4baSyz
64*d62bc4baSyzcheck:	$(CHKMANIFEST)
65*d62bc4baSyz
66*d62bc4baSyzclean:
67*d62bc4baSyz	$(RM) $(OBJS)
68*d62bc4baSyz
69*d62bc4baSyzlint:	lint_SRCS
70*d62bc4baSyz
71*d62bc4baSyz$(ROOTCFGDIR):
72*d62bc4baSyz	$(INS.dir)
73*d62bc4baSyz
74*d62bc4baSyz$(ROOTCFGDIR)/%: $(ROOTCFGDIR) %
75*d62bc4baSyz	$(INS.file)
76*d62bc4baSyz
77*d62bc4baSyzinclude ../Makefile.targ
78