Makefile revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4
2810N/A#
2810N/A# CDDL HEADER START
2810N/A#
2810N/A# The contents of this file are subject to the terms of the
2810N/A# Common Development and Distribution License (the "License").
2810N/A# You may not use this file except in compliance with the License.
2810N/A#
2810N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2810N/A# or http://www.opensolaris.org/os/licensing.
2810N/A# See the License for the specific language governing permissions
2810N/A# and limitations under the License.
2810N/A#
2810N/A# When distributing Covered Code, include this CDDL HEADER in each
2810N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2810N/A# If applicable, add the following below this CDDL HEADER, with the
2810N/A# fields enclosed by brackets "[]" replaced with your own identifying
2810N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2810N/A#
2810N/A# CDDL HEADER END
2810N/A#
2810N/A#
2810N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2810N/A# Use is subject to license terms.
2810N/A#
2810N/A# cmd/power/Makefile
2810N/A#
2810N/A
2810N/ADAEMON_SRCS = powerd.c sysstat.c
2810N/ADAEMON_OBJS = $(DAEMON_SRCS:%.c=%.o)
2810N/ADAEMON = powerd
2810N/APMCFG_SRCS = conf.c parse.c handlers.c
2810N/APMCFG_OBJS = $(PMCFG_SRCS:%.c=%.o)
2900N/APMCFG = pmconfig
2900N/ASUSPEND_SRCS = sys-suspend.c pm_pam_conv.c
2900N/ASUSPEND_OBJS = $(SUSPEND_SRCS:%.c=%.o)
2900N/ASUSPEND = sys-suspend
2900N/ASRCS = $(DAEMON_SRCS) $(PMCFG_SRCS) $(SUSPEND_SRCS)
2900N/AOBJS = $(SRCS:%.c=%.o)
2900N/ASCRIPTS = sysidpm.sh
2810N/ASYSIDPM = sysidpm
2810N/APROG = $(DAEMON) $(PMCFG) $(SYSIDPM) $(SUSPEND)
2810N/APOWERCONF= power.conf
2810N/AETCFILES = $(POWERCONF)
2810N/APOWERPERM = power
2810N/ADEFAULTFILES = power.dfl
2810N/A
2810N/AMANIFEST= power.xml
2810N/ASVCMETHOD= svc-power
2810N/A
2810N/Ainclude ../Makefile.cmd
2810N/A
2810N/AROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
2810N/A
2810N/ATEXT_DOMAIN= SUNW_OST_OSCMD
2810N/A
2810N/AXGETFLAGS += -a -x power_all.xcl
2810N/APOFILE= power_all.po
2810N/APOFILES= $(PMCFG_SRCS:%.c=%.po) $(SUSPEND_SRCS:%.c=%.po)
2810N/A# needed because POFILES is deleted by clobber, but it's under
2810N/A# SCCS control here.
2810N/AOPOFILES= sysidpm.po
2810N/A
2810N/A# pmconfig only needs libdevinfo on sparc
2810N/Asparc_LDEVINFO= -ldevinfo -lefi -ladm -lzfs -lnvpair
2810N/Ai386_LDEVINFO=
2810N/A
2810N/ALDEVINFO= -ldevinfo
2810N/A
2810N/ADAEMON_LDLIBS = $(LDLIBS.cmd) -lkstat $(LDEVINFO)
2810N/APMCFG_LDLIBS = $(LDLIBS.cmd) -lcmd -lsmbios -lkstat $($(MACH)_LDEVINFO)
2810N/ASUSPEND_LDLIBS = $(LDLIBS.cmd) -lbsm -lpam -lsecdb
2810N/A
2810N/AROOTUSRSBINPMCFG= $(PMCFG:%=$(ROOTUSRSBIN)/%)
2810N/A$(ROOTUSRSBINPMCFG) := FILEMODE= 4555
2810N/AROOTUSRBINSUSPEND= $(SUSPEND:%=$(ROOTBIN)/%)
2810N/A$(ROOTUSRBINSUSPEND) := FILEMODE= 4555
2810N/A
ROOTLIBPOWER= $(ROOTLIB)/power
ROOTLIBPOWERDAEMON= $(DAEMON:%=$(ROOTLIBPOWER)/%)
$(ROOTLIBPOWER) := FILEMODE= 755
$(ROOTLIBPOWERDAEMON) := FILEMODE= 555
ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%)
$(ROOTETCFILES) := FILEMODE= 644
ROOTUSRSBINSYSIDPM= $(SYSIDPM:%=$(ROOTUSRSBIN)/%)
$(ROOTUSRSBINSYSIDPM) := FILEMODE= 755
#
# lint pass one enforcement
#
CFLAGS += $(CCVERBOSE)
.PARALLEL: $(OBJS)
.KEEP_STATE:
all: $(PROG) $(POWERPERM).dfl $(ETCFILES) $(SCRIPTS)
install clean:
$(POWERCONF): $(POWERCONF).$(MACH)
$(DAEMON_OBJS): $(DAEMON_SRCS)
$(CC) $(CFLAGS) -D_REENTRANT $(CPPFLAGS) -o $@ -c $<
$(PROCESS_COMMENT) $@
$(DAEMON): $(DAEMON_OBJS)
$(CC) -o $@ $(DAEMON_OBJS) $(LDFLAGS) $(DAEMON_LDLIBS)
$(POST_PROCESS)
$(PMCFG_OBJS): pmconfig.h
$(PMCFG): $(PMCFG_OBJS)
$(LINK.c) -o $@ $(PMCFG_OBJS) $(PMCFG_LDLIBS)
$(POST_PROCESS)
$(SUSPEND): $(SUSPEND_OBJS)
$(LINK.c) -o $@ $(SUSPEND_OBJS) $(SUSPEND_LDLIBS)
$(POST_PROCESS)
install: all $(ROOTUSRSBINPMCFG) $(ROOTLIBPOWERDAEMON) $(ROOTUSRBINSUSPEND) \
$(ROOTETCFILES) $(ROOTUSRSBINSYSIDPM) $(ROOTETCDEFAULTFILES) \
$(ROOTMANIFEST) $(ROOTSVCMETHOD)
$(ROOTLIBPOWER):
$(INS.dir)
$(ROOTLIBPOWER)/%: %
$(INS.file)
$(ROOTLIBPOWERDAEMON): $(ROOTLIBPOWER)
$(OPOFILES):
@
$(POFILE): $(POFILES) $(OPOFILES)
$(RM) $@
cat $(POFILES) $(OPOFILES) > $@
check: $(CHKMANIFEST)
clean:
$(RM) $(OBJS) $(SYSIDPM) $(POWERCONF)
$(RM) $(POFILE) $(POFILES)
lint := LINTFLAGS=-auxn
lint:
$(LINT.c) $(DAEMON_SRCS)
$(LINT.c) $(PMCFG_SRCS)
$(LINT.c) $(SUSPEND_SRCS)
cstyle:
$(CSTYLE) $(SRCS)
%: %.$(MACH)
$(RM) $@
cat $< > $@
include ../Makefile.targ