Print this page
8411 Build should warn when linking against libraries outside proto area
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/fm/notify/snmp-notify/Makefile.com
+++ new/usr/src/cmd/fm/notify/snmp-notify/Makefile.com
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
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
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 #
23 23 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 +# Copyright 2017 RackTop Systems.
24 25 #
25 26
26 27 .KEEP_STATE:
27 28 .SUFFIXES:
28 29
29 30 SRCS += snmp-notify.c
30 31 OBJS = $(SRCS:%.c=%.o)
31 32 LINTFILES = $(SRCS:%.c=%.ln)
32 33
33 34 PROG = snmp-notify
34 35 ROOTLIBFM = $(ROOT)/usr/lib/fm
35 36 ROOTLIBNOTIFY = $(ROOT)/usr/lib/fm/notify
36 37 ROOTPROG = $(ROOTLIBNOTIFY)/$(PROG)
37 38
38 39 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)/fm
39 40 ROOTMANIFEST = $(ROOTMANIFESTDIR)/$(PROG).xml
40 41 ROOTNOTIFYPARAMS = $(ROOTMANIFESTDIR)/notify-params.xml
41 42 $(ROOTMANIFEST) := FILEMODE = 0444
42 43 $(ROOTNOTIFYPARAMS) := FILEMODE = 0444
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
43 44
44 45 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
45 46 CPPFLAGS += -I. -I../common -I../../../../../lib/fm/libfmnotify/common
46 47 C99MODE = $(C99_ENABLE)
47 48 CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST)
48 49 LDLIBS += -L$(ROOT)/usr/lib/fm -lnvpair -lfmevent -lfmd_msg -lfmnotify \
49 50 -lumem -lnetsnmp -lnetsnmpagent
50 51 LDFLAGS += -R/usr/lib/fm
51 52 LINTFLAGS += -mnu
52 53
54 +# Allow Net-SNMP libs to be taken from outside the proto area.
55 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libnetsnmp.so
56 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libnetsnmpagent.so
57 +
53 58 CERRWARN += -_gcc=-Wno-parentheses
54 59
55 60 .NO_PARALLEL:
56 61 .PARALLEL: $(OBJS) $(LINTFILES)
57 62
58 63 all: $(PROG)
59 64
60 65 $(PROG): $(OBJS)
61 66 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
62 67 $(CTFMERGE) -L VERSION -o $@ $(OBJS)
63 68 $(POST_PROCESS)
64 69
65 70 %.o: ../common/%.c
66 71 $(COMPILE.c) $<
67 72 $(CTFCONVERT_O)
68 73
69 74 %.o: %.c
70 75 $(COMPILE.c) $<
71 76 $(CTFCONVERT_O)
72 77
73 78 clean:
74 79 $(RM) $(OBJS) $(LINTFILES)
75 80
76 81 clobber: clean
77 82 $(RM) $(PROG)
78 83
79 84 %.ln: ../common/%.c
80 85 $(LINT.c) -c $<
81 86
82 87 %.ln: %.c
83 88 $(LINT.c) -c $<
84 89
85 90 lint: $(LINTFILES)
86 91 $(LINT) $(LINTFLAGS) $(LINTFILES)
87 92
88 93 $(ROOTLIBNOTIFY):
89 94 $(INS.dir)
90 95
91 96 $(ROOTLIBNOTIFY)/%: %
92 97 $(INS.file)
93 98
94 99 $(ROOTMANIFESTDIR):
95 100 $(INS.dir)
96 101
97 102 $(ROOTMANIFESTDIR)/%.xml: ../common/%.xml
98 103 $(INS.file)
99 104
100 105 $(ROOTMANIFESTDIR)/notify-params.xml: ../../notify-params.xml
101 106 $(INS.file) ../../notify-params.xml
102 107
103 108 install_h:
104 109
105 110 install: all $(ROOTLIBNOTIFY) $(ROOTPROG) $(ROOTMANIFESTDIR) $(ROOTMANIFEST) $(ROOTNOTIFYPARAMS)
↓ open down ↓ |
43 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX