xref: /titanic_50/usr/src/cmd/drd/Makefile (revision 1886f67eb9de99edbcda88765f2c603a30c87fc2)
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
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
66CERRWARN += -_gcc=-Wno-parentheses
67
68
69#
70# LIBRARIES:
71#
72LDLIBS +=	-lkstat		\
73		-lnvpair	\
74		-lrcm
75
76.KEEP_STATE:
77
78
79all: $(PROG)
80
81$(PROG): $(OBJS) $(HDRS)
82	$(CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
83	$(POST_PROCESS)
84
85install: all .WAIT $(ROOTCMD) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
86
87check:	$(CHKMANIFEST)
88
89lint:
90	$(LINT) $(LINT_FLAGS) $(CPPFLAGS) $(LINT_SRCS)
91
92clean:
93	$(RM) $(PROG) $(OBJS) $(LINT_FILES)
94
95include ../Makefile.targ
96include ../../Makefile.psm.targ
97