Print this page
5468 Missing dependencies in lib/Makefile
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/fm/modules/Makefile.plugin
+++ new/usr/src/cmd/fm/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 #
↓ 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 .SUFFIXES:
27 28
28 29 include $(SRC)/cmd/Makefile.cmd
29 30 MODCLASS = plugins
30 31
31 32 #
32 33 # Set PROG and OBJS based on the values of MODULE and SRCS. We expect that
33 34 # these macros to be defined by the Makefile that is including this file.
34 35 #
35 36 PROG = $(MODULE:%=%.so)
36 37 YOBJS = $(YSRCS:%.y=%.o)
37 38 OBJS = $(YOBJS) $(SRCS:%.c=%.o)
38 39 CONF = $(MODULE:%=%.conf)
39 40
40 41 #
41 42 # We may have sources from directories other than the current, but
42 43 # we build all objects in the current directory (not necessarily in the
43 44 # directory of its source).
44 45 SEDCMDLINE = echo $(OBJS) | sed 's!\.\./[a-z_/]*/!!g'
45 46 LINKOBJS = $(SEDCMDLINE:sh)
46 47
47 48 #
48 49 # A module may set DMOD and DMOD_SRCS if it has a mdb proc module.
49 50 # DMOD, if set, must match PROG above (for mdb autoloading) so it will
50 51 # be built in a subdirectory.
51 52 #
52 53 ROOTDMOD = $(DMOD:%.so=$(ROOT)/usr/lib/mdb/proc/%.so)
53 54 DMODPROG = $(DMOD:%=dmod/%)
54 55 DMOD_OBJS = $(DMOD_SRCS:%.c=%.o)
55 56
56 57 #
57 58 # Set ROOTPROG and ROOTCONF based on the values of MODULE, CLASS, and PLATFORMS
58 59 # We expect these macros to be defined by the Makefile that is including us.
59 60 #
60 61 common_ROOTPROG = $(ROOT)/usr/lib/fm/fmd/plugins/$(PROG)
61 62 arch_ROOTPROG = $(ROOT)/usr/platform/$(ARCH)/lib/fm/fmd/plugins/$(PROG)
62 63 plat_ROOTPROG = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/fmd/plugins/$(PROG))
63 64 ROOTPROG = $($(CLASS)_ROOTPROG)
64 65
65 66 common_ROOTCONF = $(ROOT)/usr/lib/fm/fmd/plugins/$(CONF)
66 67 arch_ROOTCONF = $(ROOT)/usr/platform/$(ARCH)/lib/fm/fmd/plugins/$(CONF)
67 68 plat_ROOTCONF = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/fmd/plugins/$(CONF))
68 69 ROOTCONF = $($(CLASS)_ROOTCONF)
69 70
70 71 LINTFLAGS += -mu
71 72 LINTFILES = $(SRCS:%.c=%.ln)
72 73
73 74 DMODLINTTGT = $(DMOD:%=lint_dmod)
74 75 DMODLINTFILES = $(DMOD_SRCS:%.c=%.ln)
75 76
76 77 APIMAP = $(SRC)/cmd/fm/fmd/common/fmd_api.map
77 78 FMRIMAP = $(SRC)/cmd/fm/fmd/common/fmd_fmri.map
78 79
79 80 CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
80 81 CFLAGS += -G $(XREGSFLAG)
81 82
82 83 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
83 84 LDFLAGS += $(ZDEFS) $(ZTEXT) $(ZIGNORE)
84 85
85 86 MAPFILE-DMOD = $(SRC)/cmd/mdb/common/modules/conf/mapfile-extern
86 87
87 88
88 89 $(PROG) := LDFLAGS += -M$(APIMAP) -M$(FMRIMAP)
89 90 $(PROG) := LDLIBS += -lnvpair -lc
90 91
91 92 all: $(PROG) $(DMODPROG)
92 93
↓ open down ↓ |
60 lines elided |
↑ open up ↑ |
93 94 .NO_PARALLEL:
94 95 .PARALLEL: $(OBJS) $(LINTFILES) $(DMOD_OBJS) $(DMODLINTFILES)
95 96
96 97 $(PROG): $(OBJS) $(APIMAP)
97 98 $(LINK.c) $(LINKOBJS) -o $@ $(LDLIBS)
98 99 $(CTFMERGE) -L VERSION -o $@ $(LINKOBJS)
99 100 $(POST_PROCESS_SO)
100 101
101 102 $(DMODPROG): $(DMOD_OBJS) $(MAPFILE-DMOD)
102 103 -@mkdir -p $(@D)
103 - $(LINK.c) $(DMOD_OBJS) $(MAPFILE-DMOD:%=-M%) -o $@ -lc
104 + $(LINK.c) $(DMOD_OBJS) $(MAPFILE-DMOD:%=-M%) -o $@ $(LDLIBS) -lc
104 105 $(POST_PROCESS)
105 106
106 107 %.o: %.c
107 108 $(COMPILE.c) $< -o $(@F)
108 109 $(CTFCONVERT) $(CTFCVTFLAGS) $(@F)
109 110
110 111 clean:
111 112 $(RM) $(OBJS) $(DMOD_OBJS) $(LINTFILES) $(DMODLINTFILES) $(CLEANFILES) \
112 113 $(LINKOBJS)
113 114
114 115 clobber: clean
115 116 $(RM) $(PROG) $(DMODPROG)
116 117
117 118 %.ln: %.c
118 119 $(LINT.c) -dirout=$(@D) -c $<
119 120
120 121 lint_prog: $(LINTFILES)
121 122 $(LINT) $(LINTFLAGS) $(LINTFILES) $(LDLIBS)
122 123
123 124 lint_dmod: $(DMODLINTFILES)
124 125 $(LINT) $(LINTFLAGS) $(DMODLINTFILES) $(LDLIBS)
125 126
126 127 lint: lint_prog $(DMODLINTTGT)
127 128
128 129 install_h:
129 130
130 131 $(ROOTPROG): $$(@D) $(PROG)
131 132 $(RM) $@; $(INS) -s -m 0555 -f $(@D) $(PROG)
132 133
133 134 $(ROOTCONF): $$(@D) $(CONF)
134 135 $(RM) $@; $(INS) -s -m 0644 -f $(@D) $(CONF)
135 136
136 137 $(ROOTDMOD): $$(@D) $(DMODPROG)
137 138 $(RM) $@; $(INS) -s -m 0555 -f $(@D) $(DMODPROG)
138 139
139 140 install: $(ROOTPROG) $(ROOTCONF) $(ROOTDMOD)
140 141
141 142 include $(SRC)/cmd/fm/modules/Makefile.rootdirs
↓ open down ↓ |
28 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX