Print this page
5468 Missing dependencies in lib/Makefile
5709 Add binary compatibility with Solaris 10 update 10.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/fm/fmd/Makefile.fmd
+++ new/usr/src/cmd/fm/fmd/Makefile.fmd
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
23 +# Copyright 2015 RackTop Systems.
23 24 #
24 25
25 26 .KEEP_STATE:
26 27
27 28 SRCS += fmd.c \
28 29 fmd_api.c \
29 30 fmd_alloc.c \
30 31 fmd_asru.c \
31 32 fmd_buf.c \
32 33 fmd_builtin.c \
33 34 fmd_case.c \
34 35 fmd_ckpt.c \
35 36 fmd_conf.c \
36 37 fmd_ctl.c \
37 38 fmd_dispq.c \
38 39 fmd_dr.c \
39 40 fmd_error.c \
40 41 fmd_event.c \
41 42 fmd_eventq.c \
42 43 fmd_fmri.c \
43 44 fmd_idspace.c \
44 45 fmd_list.c \
45 46 fmd_log.c \
46 47 fmd_main.c \
47 48 fmd_module.c \
48 49 fmd_nv.c \
49 50 fmd_proc.c \
50 51 fmd_protocol.c \
51 52 fmd_rpc.c \
52 53 fmd_rpc_adm.c \
53 54 fmd_rpc_api.c \
54 55 fmd_rtld.c \
55 56 fmd_scheme.c \
56 57 fmd_self.c \
57 58 fmd_serd.c \
58 59 fmd_string.c \
59 60 fmd_subr.c \
60 61 fmd_svc_adm.c \
61 62 fmd_svc_api.c \
62 63 fmd_sysevent.c \
63 64 fmd_thread.c \
64 65 fmd_time.c \
65 66 fmd_timerq.c \
66 67 fmd_topo.c \
67 68 fmd_trace.c \
68 69 fmd_ustat.c \
69 70 fmd_xdr_adm.c \
70 71 fmd_xdr_api.c \
71 72 fmd_xprt.c
72 73
73 74 PROG = fmd
74 75 MANIFEST = ../common/$(PROG).xml
75 76
76 77 MAPFILE-DMOD = $(SRC)/cmd/mdb/common/modules/conf/mapfile-extern
77 78
78 79
79 80 LOGADMFILE = $(PROG).logadm.conf
80 81 LOGADMDIR = $(ROOT)/etc/logadm.d
81 82 LOGADMENT = $(LOGADMDIR)/$(LOGADMFILE)
82 83 $(LOGADMENT) := FILEMODE = 444
83 84
84 85 ROOTPDIR = $(ROOT)/usr/lib/fm/$(PROG)
85 86 ROOTVDIR = $(ROOT)/var/fm/$(PROG)
86 87 ROOTVSUB = $(ROOTVDIR)/ckpt $(ROOTVDIR)/rsrc $(ROOTVDIR)/xprt
87 88 ROOTPROG = $(ROOTPDIR)/$(PROG)
88 89
89 90 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
90 91 ROOTMANIFEST = $(ROOTMANIFESTDIR)/$(PROG).xml
91 92
92 93 OBJS = $(SRCS:%.c=%.o)
93 94 LINTFILES = $(SRCS:%.c=%.ln)
94 95
95 96 CLEANFILES += ../common/fmd_rpc_api.h ../common/fmd_rpc_adm.h
96 97 CLEANFILES += fmd_svc_adm.c fmd_svc_api.c fmd_xdr_adm.c fmd_xdr_api.c
97 98 CLEANFILES += ../common/fmd_error.c
98 99
99 100 DMOD = fmd.so
100 101 ROOTDMOD = $(ROOT)/usr/lib/mdb/proc/$(DMOD)
101 102 DMOD_SRCS = fmd_mdb.c
102 103 DMOD_OBJS = $(DMOD_SRCS:%.c=%.o)
103 104 DMOD_LINT = $(DMOD_SRCS:%.c=%.ln)
104 105
105 106 HDRS = fmd_api.h fmd_fmri.h
106 107 ROOTCDIR = $(ROOT)/etc/fm/$(PROG)
107 108 ROOTHDIR = $(ROOT)/usr/include/fm
108 109 ROOTHDRS = $(HDRS:%=$(ROOTHDIR)/%)
109 110
110 111 $(ROOTHDRS) := FILEMODE = 0644
111 112 $(ROOTVSUB) := DIRMODE = 0755
112 113 $(ROOTMANIFEST) := FILEMODE = 0444
113 114
114 115 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
115 116 CPPFLAGS += -I. -I../common
116 117 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
117 118 CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST)
118 119 LINTFLAGS += -mu
119 120 CERRWARN += -_gcc=-Wno-switch
120 121 CERRWARN += -_gcc=-Wno-parentheses
121 122 CERRWARN += -_gcc=-Wno-uninitialized
122 123 CERRWARN += -_gcc=-Wno-unused-variable
123 124 CERRWARN += -_gcc=-Wno-clobbered
124 125
125 126 $(PROG) := LDFLAGS += -R/usr/lib/fm
126 127 $(PROG) := LDLIBS += -L$(ROOTLIB)/fm -ltopo -ldiagcode -lsysevent -lsmbios \
127 128 -luuid -lnvpair -lexacct -lnsl -lumem -ldevinfo -lfmd_msg
128 129
129 130 $(DMOD) := CFLAGS += $(CC_PICFLAGS) -G $(XREGSFLAG)
130 131 $(DMOD) := LDFLAGS += $(ZTEXT) $(ZDEFS) $(MAPFILE-DMOD:%=-M%)
131 132
132 133 #
133 134 # rpcgen(1) produces code that wants to be in the foreground if we're compiled
134 135 # DEBUG, which isn't appropriate for our daemon. Forcibly undefine this code.
135 136 # It also produces various lint warnings; turn these off for these files only.
136 137 # Unfortunately we also have to turn off IGNOR2 for pass2 lint as well.
137 138 #
138 139 fmd_svc_adm.o fmd_svc_api.o := CPPFLAGS += -UDEBUG -URPC_SVC_FG
139 140 fmd_xdr_adm.o fmd_xdr_api.o := CPPFLAGS += -UDEBUG -URPC_SVC_FG
140 141
141 142 fmd_svc_adm.ln fmd_svc_api.ln fmd_xdr_adm.ln fmd_xdr_api.ln := LINTFLAGS += \
142 143 -xerroff=E_FUNC_ARG_UNUSED -xerroff=E_FUNC_VAR_UNUSED -xerroff=E_STATIC_UNUSED
143 144
144 145 lint_prog := LINTFLAGS += -xerroff=E_FUNC_RET_ALWAYS_IGNOR2
145 146
146 147 .NO_PARALLEL:
147 148 .PARALLEL: $(OBJS) $(LINTFILES)
148 149
149 150 all: $(PROG) $(DMOD) install_h
150 151
151 152 $(LOGADMDIR):
152 153 $(INS.dir)
↓ open down ↓ |
120 lines elided |
↑ open up ↑ |
153 154
154 155 $(LOGADMDIR)/%.conf: ../common/%.conf
155 156 $(INS.file)
156 157
157 158 $(PROG): $(OBJS)
158 159 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
159 160 $(CTFMERGE) -L VERSION -o $@ $(OBJS)
160 161 $(POST_PROCESS)
161 162
162 163 $(DMOD): $(DMOD_OBJS)
163 - $(LINK.c) $(DMOD_OBJS) -o $@ -lc
164 + $(LINK.c) $(DMOD_OBJS) -o $@ $(LDLIBS) -lc
164 165 $(POST_PROCESS)
165 166
166 167 %.o: ../common/%.c
167 168 $(COMPILE.c) $<
168 169 $(CTFCONVERT_O)
169 170
170 171 %.o: %.c
171 172 $(COMPILE.c) $<
172 173 $(CTFCONVERT_O)
173 174
174 175 ../common/fmd_error.c: ../common/mkerror.sh ../common/fmd_error.h
175 176 sh ../common/mkerror.sh < ../common/fmd_error.h > $@
176 177
177 178 ../common/fmd_rpc_%.c: ../common/fmd_rpc_%.h
178 179
179 180 ../common/fmd_rpc.c: ../common/fmd_rpc_adm.h ../common/fmd_rpc_api.h
180 181
181 182 ../common/fmd_rpc_%.h: ../common/fmd_rpc_%.x
182 183 $(RPCGEN) -CMN -h -o $@ $<
183 184
184 185 fmd_svc_%.c: ../common/fmd_rpc_%.h
185 186 $(RPCGEN) -CMN -m -o $@ `echo $< | sed 's/h$$/x/'`
186 187
187 188 fmd_xdr_%.c: ../common/fmd_rpc_%.h
188 189 $(RPCGEN) -CMN -c -o $@ `echo $< | sed 's/h$$/x/'`
189 190
190 191 clean:
191 192 $(RM) $(OBJS) $(DMOD_OBJS) $(LINTFILES) $(DMOD_LINT)
192 193 $(RM) $(CLEANFILES)
193 194
194 195 clobber: clean
195 196 $(RM) $(PROG) $(DMOD)
196 197
197 198 %.ln: ../common/%.c
198 199 $(LINT.c) -c $<
199 200
200 201 %.ln: %.c
201 202 $(LINT.c) -c $<
202 203
203 204 lint_prog: $(LINTFILES)
204 205 $(LINT) $(LINTFLAGS) $(LINTFILES) $(LDLIBS)
205 206
206 207 lint_dmod: $(DMOD_LINT)
207 208 $(LINT) $(LINTFLAGS) $(DMOD_LINT) $(LDLIBS)
208 209
209 210 lint: lint_prog lint_dmod
210 211
211 212 $(ROOT)/etc/fm:
212 213 $(INS.dir)
213 214
214 215 $(ROOTCDIR): $(ROOT)/etc/fm
215 216 $(INS.dir)
216 217
217 218 $(ROOTHDIR):
218 219 $(INS.dir)
219 220
220 221 $(ROOTHDIR)/%.h: ../common/%.h
221 222 $(INS.file)
222 223
223 224 $(ROOTMANIFESTDIR)/%.xml: ../common/%.xml
224 225 $(INS.file)
225 226
226 227 $(ROOT)/var/%:
227 228 $(INS.dir)
228 229
229 230 $(ROOTVDIR): $(ROOT)/var/fm
230 231 $(INS.dir)
231 232
232 233 $(ROOTVSUB): $(ROOTVDIR)
233 234 $(INS.dir)
234 235
235 236 $(ROOT)/usr/lib/fm:
236 237 $(INS.dir)
237 238
238 239 $(ROOTPDIR): $(ROOT)/usr/lib/fm
239 240 $(INS.dir)
240 241
241 242 $(ROOTPROG): $(ROOTPDIR) $(PROG)
242 243 $(RM) $@; $(INS) -s -m 0555 -f $(@D) $(PROG)
243 244
244 245 $(ROOT)/usr/lib/mdb/proc: $(ROOT)/usr/lib/mdb
245 246 $(INS.dir)
246 247
247 248 $(ROOTDMOD): $(ROOT)/usr/lib/mdb/proc $(DMOD)
248 249 $(RM) $@; $(INS) -s -m 0555 -f $(@D) $(DMOD)
249 250
250 251 install_h: $(ROOTHDIR) $(ROOTHDRS)
251 252
252 253 install: all install_h $(ROOTPROG) $(ROOTDMOD) $(LOGADMDIR) $(LOGADMENT) \
253 254 $(ROOTCDIR) $(ROOTVDIR) $(ROOTVSUB) $(ROOTMANIFEST)
254 255
255 256 check: $(CHKMANIFEST)
↓ open down ↓ |
82 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX