xref: /titanic_41/usr/src/cmd/drd/Makefile (revision 63360950109af2ce85a962ca61f40b8782f11100)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# Makefile definitions for sun4v DR Daemon (drd)
29#
30
31PROG=		drd
32MANIFEST=	drd.xml
33SVCMETHOD=	svc-drd
34
35include ../Makefile.cmd
36include ../../Makefile.psm
37
38CLASS=		32
39
40PLATFORM=	sun4v
41
42SRCS=		drd.c		\
43		drd_log.c	\
44		drd_rcm.c
45
46HDRS=		drd.h
47
48OBJS=		$(SRCS:%.c=%.o)
49
50LINT_SRCS=	$(SRCS)
51LINT_FILES=	$(LINT_SRCS:%.c=%.ln)
52
53ROOTCMDDIR=		$(ROOTLIB)/ldoms
54ROOTMANIFESTDIR=	$(ROOTSVCPLATFORMSUN4V)
55$(ROOTMANIFEST)		:= FILEMODE= 444
56
57#
58# FLAGS:
59#
60CPPFLAGS= 	-I$(SRC)/uts/sun4v $(CPPFLAGS.master) -D_REENTRANT
61
62LINT_FLAGS=	-c -Nlevel=4 -Ncheck
63
64XGETFLAGS +=	-a -s -x $(PROG).xcl
65
66
67#
68# LIBRARIES:
69#
70LDLIBS +=	-lkstat		\
71		-lnvpair	\
72		-lrcm
73
74.KEEP_STATE:
75
76
77all: $(PROG)
78
79$(PROG): $(OBJS) $(HDRS)
80	$(CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
81	$(POST_PROCESS)
82
83install: all .WAIT $(ROOTCMD) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
84
85check:	$(CHKMANIFEST)
86
87lint:
88	$(LINT) $(LINT_FLAGS) $(CPPFLAGS) $(LINT_SRCS)
89
90clean:
91	$(RM) $(PROG) $(OBJS) $(LINT_FILES)
92
93include ../Makefile.targ
94include ../../Makefile.psm.targ
95