xref: /illumos-gate/usr/src/cmd/oplhpd/Makefile (revision e4b86885570d77af552e9cf94f142f4d744fb8c8)
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# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/oplhpd/Makefile
29#
30
31PROG =          oplhpd
32PLATFORM =      SUNW,SPARC-Enterprise
33MANIFEST =      oplhpd.xml
34SVCMETHOD =     svc-oplhpd
35
36include ../Makefile.cmd
37include ../Makefile.cmd.64
38include ../../Makefile.psm
39
40SRCS = oplhpd.c scf_notify.c
41OBJS = $(SRCS:%.c=%.o)
42LINTFILES = $(SRCS:%.c=%.ln)
43
44ROOTMANIFESTDIR = $(ROOTSVCPLATFORMSUN4U)
45
46CPPFLAGS += -I$(SRC)/uts/sun4u/opl
47LDLIBS64 += -lsysevent -lnvpair -lcfgadm -ldevinfo
48
49PSMPROG = $(USR_PSM_LIB64_DIR)/$(PROG)
50
51$(PSMPROG) :=	FILEMODE = 0755
52$(PSMPROG) :=	OWNER = root
53$(PSMPROG) :=	GROUP = sys
54
55.KEEP_STATE:
56
57all: $(PROG)
58
59$(PROG):	$(OBJS)
60	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
61	$(POST_PROCESS)
62
63install: all $(PSMPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
64
65check:	$(CHKMANIFEST)
66
67clean:
68	$(RM) $(OBJS)
69
70lint:	lint_SRCS
71
72$(USR_PLAT_DIR):
73	-$(INS.dir.root.sys)
74
75$(USR_PSM_DIR):	$(USR_PLAT_DIR)
76	-$(INS.dir.root.sys)
77
78$(USR_PSM_LIB_DIR):	$(USR_PSM_DIR)
79	-$(INS.dir.root.sys)
80
81$(USR_PSM_LIB64_DIR):	$(USR_PSM_LIB_DIR)
82	-$(INS.dir.root.sys)
83
84$(USR_PSM_LIB64_DIR)/%: % $(USR_PSM_LIB64_DIR)
85	$(INS.file)
86
87include ../Makefile.targ
88