author | amaguire |
Thu, 02 Nov 2006 15:30:18 -0800 | |
changeset 3048 | ce5ba5995ea4 |
parent 2923 | da82ab368162 |
child 5295 | a21f2449e5f9 |
permissions | -rw-r--r-- |
0 | 1 |
# |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
2923 | 5 |
# Common Development and Distribution License (the "License"). |
6 |
# You may not use this file except in compliance with the License. |
|
0 | 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 |
# |
|
2923 | 22 |
# Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
0 | 23 |
# Use is subject to license terms. |
24 |
# |
|
25 |
# ident "%Z%%M% %I% %E% SMI" |
|
26 |
# |
|
27 |
# cmd/power/Makefile |
|
28 |
# |
|
29 |
||
30 |
DAEMON_SRCS = powerd.c sysstat.c |
|
31 |
DAEMON_OBJS = $(DAEMON_SRCS:%.c=%.o) |
|
32 |
DAEMON = powerd |
|
33 |
PMCFG_SRCS = conf.c parse.c handlers.c |
|
34 |
PMCFG_OBJS = $(PMCFG_SRCS:%.c=%.o) |
|
35 |
PMCFG = pmconfig |
|
36 |
SRCS = $(DAEMON_SRCS) $(PMCFG_SRCS) |
|
37 |
OBJS = $(SRCS:%.c=%.o) |
|
38 |
SCRIPTS = sysidpm.sh |
|
39 |
SYSIDPM = sysidpm |
|
40 |
PROG = $(DAEMON) $(PMCFG) $(SYSIDPM) |
|
41 |
ETCFILES = power.conf |
|
42 |
POWERPERM = power |
|
89
ba4d0152c0bd
4533144 ON needs a single set of rules for installing default files
meem
parents:
0
diff
changeset
|
43 |
DEFAULTFILES = power.dfl |
0 | 44 |
|
3048 | 45 |
MANIFEST= power.xml |
46 |
SVCMETHOD= svc-power |
|
47 |
||
0 | 48 |
include ../Makefile.cmd |
49 |
||
50 |
ROOTMANIFESTDIR = $(ROOTSVCSYSTEM) |
|
51 |
||
52 |
TEXT_DOMAIN= SUNW_OST_OSCMD |
|
53 |
||
763
83a9a006a448
6332731 pmconfig .po files are missing a lot of strings
mh27603
parents:
89
diff
changeset
|
54 |
XGETFLAGS += -a -x power_all.xcl |
0 | 55 |
POFILE= power_all.po |
56 |
POFILES= $(PMCFG_SRCS:%.c=%.po) |
|
57 |
# needed because POFILES is deleted by clobber, but it's under |
|
58 |
# SCCS control here. |
|
59 |
OPOFILES= sysidpm.po |
|
60 |
||
61 |
# |
|
62 |
# we only need libdevinfo on sparc |
|
63 |
sparc_LDEVINFO= -ldevinfo |
|
64 |
i386_LDEVINFO= |
|
65 |
||
66 |
DAEMON_LDLIBS = $(LDLIBS.cmd) -lkstat $($(MACH)_LDEVINFO) |
|
2923 | 67 |
PMCFG_LDLIBS = $(LDLIBS.cmd) $($(MACH)_LDEVINFO) |
0 | 68 |
|
69 |
OWNER= root |
|
70 |
ROOTUSRSBINPMCFG= $(PMCFG:%=$(ROOTUSRSBIN)/%) |
|
71 |
$(ROOTUSRSBINPMCFG) := GROUP= bin |
|
72 |
$(ROOTUSRSBINPMCFG) := FILEMODE= 4555 |
|
73 |
||
74 |
GROUP= sys |
|
75 |
ROOTLIBPOWER= $(ROOTLIB)/power |
|
76 |
ROOTLIBPOWERDAEMON= $(DAEMON:%=$(ROOTLIBPOWER)/%) |
|
77 |
$(ROOTLIBPOWER) := GROUP= sys |
|
78 |
$(ROOTLIBPOWER) := FILEMODE= 755 |
|
79 |
$(ROOTLIBPOWERDAEMON) := GROUP= bin |
|
80 |
$(ROOTLIBPOWERDAEMON) := FILEMODE= 555 |
|
81 |
||
89
ba4d0152c0bd
4533144 ON needs a single set of rules for installing default files
meem
parents:
0
diff
changeset
|
82 |
ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%) |
ba4d0152c0bd
4533144 ON needs a single set of rules for installing default files
meem
parents:
0
diff
changeset
|
83 |
$(ROOTETCFILES) := FILEMODE= 644 |
0 | 84 |
|
85 |
ROOTUSRSBINSYSIDPM= $(SYSIDPM:%=$(ROOTUSRSBIN)/%) |
|
86 |
$(ROOTUSRSBINSYSIDPM) := FILEMODE= 755 |
|
87 |
||
88 |
# |
|
89 |
# lint pass one enforcement |
|
90 |
# |
|
91 |
CFLAGS += $(CCVERBOSE) |
|
92 |
||
93 |
.PARALLEL: $(OBJS) |
|
94 |
||
95 |
.KEEP_STATE: |
|
96 |
||
97 |
all: $(PROG) $(POWERPERM).dfl $(ETCFILES) $(SCRIPTS) |
|
98 |
||
99 |
install clean: |
|
100 |
||
101 |
$(DAEMON_OBJS): $(DAEMON_SRCS) |
|
102 |
$(CC) $(CFLAGS) -D_REENTRANT $(CPPFLAGS) -o $@ -c $< |
|
103 |
$(PROCESS_COMMENT) $@ |
|
104 |
||
105 |
$(DAEMON): $(DAEMON_OBJS) |
|
106 |
$(CC) -o $@ $(DAEMON_OBJS) $(LDFLAGS) $(DAEMON_LDLIBS) |
|
107 |
$(POST_PROCESS) |
|
108 |
||
109 |
$(PMCFG_OBJS): pmconfig.h |
|
110 |
||
111 |
$(PMCFG): $(PMCFG_OBJS) |
|
112 |
$(LINK.c) -o $@ $(PMCFG_OBJS) $(PMCFG_LDLIBS) |
|
113 |
$(POST_PROCESS) |
|
114 |
||
115 |
install: all $(ROOTUSRSBINPMCFG) $(ROOTLIBPOWERDAEMON) \ |
|
89
ba4d0152c0bd
4533144 ON needs a single set of rules for installing default files
meem
parents:
0
diff
changeset
|
116 |
$(ROOTETCFILES) $(ROOTUSRSBINSYSIDPM) $(ROOTETCDEFAULTFILES) \ |
3048 | 117 |
$(ROOTMANIFEST) $(ROOTSVCMETHOD) |
0 | 118 |
|
119 |
$(ROOTLIBPOWER): |
|
120 |
$(INS.dir) |
|
121 |
||
122 |
$(ROOTLIBPOWER)/%: % |
|
123 |
$(INS.file) |
|
124 |
||
125 |
$(ROOTLIBPOWERDAEMON): $(ROOTLIBPOWER) |
|
126 |
||
127 |
$(OPOFILES): |
|
128 |
@ |
|
129 |
||
130 |
$(POFILE): $(POFILES) $(OPOFILES) |
|
131 |
$(RM) $@ |
|
132 |
cat $(POFILES) $(OPOFILES) > $@ |
|
133 |
||
134 |
check: $(CHKMANIFEST) |
|
135 |
||
136 |
clean: |
|
137 |
$(RM) $(OBJS) $(SYSIDPM) |
|
138 |
$(RM) $(POFILE) $(POFILES) |
|
139 |
||
140 |
lint := LINTFLAGS=-auxn |
|
141 |
lint: |
|
142 |
$(LINT.c) $(DAEMON_SRCS) |
|
143 |
$(LINT.c) $(PMCFG_SRCS) |
|
144 |
||
145 |
cstyle: |
|
146 |
$(CSTYLE) $(SRCS) |
|
147 |
||
148 |
include ../Makefile.targ |