Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/fm/topo/modules/Makefile.plugin
+++ new/usr/src/lib/fm/topo/modules/Makefile.plugin
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 #
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 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25
26 26 .KEEP_STATE:
27 27 .SUFFIXES:
28 28
29 29 MODCLASS = plugins
30 30
31 31 include ../../../../Makefile.lib
32 32 include ../../../../../Makefile.lib
33 33
34 34 #
35 35 # Set PROG and OBJS based on the values of MODULE and SRCS. We expect that
36 36 # these macros to be defined by the Makefile that is including this file.
37 37 #
38 38 # SHAREDSRCS is used to share sources between multiple libtopo modules.
39 39 #
40 40 SRCS = $(MODULESRCS:%.c=%.c) $(SHAREDSRCS:%.c=../../common/$(SHAREDMODULE)/%.c)
41 41 PROG = $(MODULE:%=%.so)
42 42 OBJS = $(MODULESRCS:%.c=%.o) $(SHAREDSRCS:%.c=%.o)
43 43
44 44 #
45 45 # Set ROOTPROG and ROOTCONF based on the values of MODULE, CLASS, and PLATFORMS
46 46 # We expect these macros to be defined by the Makefile that is including us.
47 47 #
48 48 common_ROOTPROG = $(ROOT)/usr/lib/fm/topo/plugins/$(PROG)
49 49 arch_ROOTPROG = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/plugins/$(PROG)
50 50 plat_ROOTPROG = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/plugins/$(PROG))
↓ open down ↓ |
50 lines elided |
↑ open up ↑ |
51 51 ROOTPROG = $($(CLASS)_ROOTPROG)
52 52
53 53 common_ROOTCONF = $(ROOT)/usr/lib/fm/topo/plugins/$(CONF)
54 54 arch_ROOTCONF = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/plugins/$(CONF)
55 55 plat_ROOTCONF = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/plugins/$(CONF))
56 56 ROOTCONF = $($(CLASS)_ROOTCONF)
57 57
58 58 LINTFLAGS = -msux
59 59 LINTFILES = $(MODULESRCS:%.c=%.ln) $(SHAREDSRCS:%.c=%.ln)
60 60
61 -CERRWARN += -_gcc=-Wno-uninitialized
61 +CERRWARN += $(CNOWARN_UNINIT)
62 62 CERRWARN += -_gcc=-Wno-parentheses
63 63
64 64 APIMAP = ../../../libtopo/common/topo_mod.map
65 65 MAPFILES = # use APIMAP instead
66 66
67 67 CSTD = $(CSTD_GNU99)
68 68 CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
69 69 CFLAGS += -G $(XREGSFLAG)
70 70
71 71 CPPFLAGS += -I.
72 72 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
73 73 LDFLAGS += $(ZIGNORE) -M$(APIMAP)
74 74 LDLIBS += -L$(ROOTLIBDIR)/fm -ltopo -lnvpair -lc
75 75 DYNFLAGS += -R/usr/lib/fm
76 76
77 77 all: $(PROG)
78 78
79 79 .NO_PARALLEL:
80 80 .PARALLEL: $(OBJS) $(LINTFILES)
81 81
82 82 $(PROG): $(OBJS) $(APIMAP)
83 83 $(LINK.c) $(DYNFLAGS) $(OBJS) -o $@ $(LDLIBS)
84 84 $(CTFMERGE) -L VERSION -o $@ $(OBJS)
85 85 $(POST_PROCESS_SO)
86 86
87 87 %.o: ../../common/$(MODULE)/%.c
88 88 $(COMPILE.c) $<
89 89 $(CTFCONVERT_O)
90 90
91 91 %.o: ../../common/$(SHAREDMODULE)/%.c
92 92 $(COMPILE.c) $<
93 93 $(CTFCONVERT_O)
94 94
95 95 %.o: %.c
96 96 $(COMPILE.c) $<
97 97 $(CTFCONVERT_O)
98 98
99 99 clean:
100 100 $(RM) $(OBJS) $(LINTFILES) $(CLEANFILES)
101 101
102 102 clobber: clean
103 103 $(RM) $(PROG) $(CLOBBERFILES)
104 104
105 105 %.ln: ../../common/$(MODULE)/%.c
106 106 $(LINT.c) -c $<
107 107
108 108 %.ln: ../../common/$(SHAREDMODULE)/%.c
109 109 $(LINT.c) -c $<
110 110
111 111 %.ln: %.c
112 112 $(LINT.c) -c $<
113 113
114 114 lint: $(LINTFILES)
115 115 $(LINT) $(LINTFLAGS) $(LINTFILES) $(LDLIBS)
116 116
117 117 check: $(CHECKHDRS)
118 118
119 119 install_h:
120 120
121 121 $(ROOTPROG): $$(@D) $(PROG)
122 122 $(RM) $@; $(INS) -s -m 0555 -f $(@D) $(PROG)
123 123
124 124 install: $(ROOTPROG)
125 125
126 126 include ../../../Makefile.rootdirs
↓ open down ↓ |
55 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX