Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/ptools/Makefile.bld
+++ new/usr/src/cmd/ptools/Makefile.bld
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
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
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 2009 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 +# Copyright (c) 2018, Joyent, Inc.
26 27
27 28 PROG:sh = basename `cd ..; pwd`
28 29
29 30 OBJS = $(PROG).o
30 31
31 32 SRCS = ../$(PROG).c
32 33
33 34 FILEMODE = 0555
34 35
35 36 # libproc is added individually as pwait doesn't need it.
36 37 # These are defined this way so lint can use them
37 38 LDLIBS_pargs = -lproc
38 39 LDLIBS_pcred = -lproc
39 40 LDLIBS_pfiles = -lproc -lnsl
40 41 LDLIBS_pflags = -lproc
41 42 LDLIBS_pldd = -lproc
42 43 LDLIBS_plgrp = -lproc -llgrp
43 44 LDLIBS_pmap = -lproc
44 45 LDLIBS_pmadvise = -lproc
45 46 LDLIBS_ppriv = -lproc
46 47 LDLIBS_preap = -lproc
47 48 LDLIBS_prun = -lproc
48 49 LDLIBS_psecflags = -lproc -lproject
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
49 50 LDLIBS_psig = -lproc
50 51 LDLIBS_pstack = -lproc -lc_db
51 52 LDLIBS_pstop = -lproc
52 53 LDLIBS_ptime = -lproc
53 54 LDLIBS_ptree = -lproc -lcontract
54 55 LDLIBS_pwdx = -lproc
55 56
56 57 LDLIBS += $(LDLIBS_$(PROG))
57 58
58 59 CERRWARN_plgrp += -_gcc=-Wno-parentheses
60 +CERRWARN_plgrp += -_smatch=off
59 61
62 +CERRWARN_pmadvise += -_smatch=off
63 +
60 64 CERRWARN_ppriv += -_gcc=-Wno-parentheses
61 65 CERRWARN_ppriv += -_gcc=-Wno-uninitialized
62 66
63 67 CERRWARN_ptree += -_gcc=-Wno-parentheses
68 +CERRWARN_ptree += -_smatch=off
64 69
65 70 CERRWARN_pstack += -_gcc=-Wno-uninitialized
66 71 CERRWARN_pstack += -_gcc=-Wno-clobbered
67 72
68 73 CERRWARN_pargs += -_gcc=-Wno-clobbered
69 74 CERRWARN_pargs += -_gcc=-Wno-type-limits
70 75
76 +CERRWARN_pwait += -_smatch=off
77 +
71 78 CERRWARN += $(CERRWARN_$(PROG))
72 79
73 80 # pargs depends on ../../common/elfcap components
74 81 # pmadvise depends on pmap components
75 82
76 83 ELFCAP = $(SRC)/common/elfcap
77 84 PMAP = $(SRC)/cmd/ptools/pmap
78 85
79 86 CPPFLAGS_pargs = -I$(ELFCAP)
80 87 OBJS_pargs = elfcap.o
81 88 SRCS_pargs = $(ELFCAP)/elfcap.c
82 89
83 90 CPPFLAGS_pmap = -I$(PMAP)
84 91 OBJS_pmap = pmap_common.o
85 92 SRCS_pmap = $(PMAP)/pmap_common.c
86 93
87 94 CPPFLAGS_pmadvise = -I$(PMAP)
88 95 OBJS_pmadvise = pmap_common.o
89 96 SRCS_pmadvise = $(PMAP)/pmap_common.c
90 97
91 98 CPPFLAGS += $(CPPFLAGS_$(PROG))
92 99 OBJS += $(OBJS_$(PROG))
93 100 SRCS += $(SRCS_$(PROG))
94 101
95 102 INSTALL_NEW=
96 103 INSTALL_LEGACY=$(RM) $(ROOTPROCBINSYMLINK) ; \
97 104 $(LN) -s ../../bin/$(PROG) $(ROOTPROCBINSYMLINK)
98 105
99 106 .KEEP_STATE:
100 107
101 108 elfcap.o: $(ELFCAP)/elfcap.c
102 109 $(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
103 110
104 111 pmap_common.o: $(PMAP)/pmap_common.c
105 112 $(COMPILE.c) -o $@ $(PMAP)/pmap_common.c
106 113
107 114 %.o: ../%.c
108 115 $(COMPILE.c) $<
109 116
110 117 all: $(PROG)
111 118
112 119 ROOTBINPROG=$(ROOTBIN)/$(PROG)
113 120 ROOTPROCBINSYMLINK=$(ROOT)/usr/proc/bin/$(PROG)
114 121
115 122 $(PROG): $$(OBJS)
116 123 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
117 124 $(POST_PROCESS)
118 125
119 126 #
120 127 # Install the ptool, symlinking it into /usr/proc/bin if PTOOL_TYPE is set
121 128 # to LEGACY.
122 129 #
123 130 install: all $(ROOTISAPROG)
124 131 -$(RM) $(ROOTBINPROG)
125 132 -$(LN) $(ISAEXEC) $(ROOTBINPROG)
126 133 -$(INSTALL_$(PTOOL_TYPE))
127 134
128 135 clean:
129 136 $(RM) $(OBJS)
130 137
131 138 lint:
132 139 $(LINT.c) $(SRCS) $(LDLIBS)
↓ open down ↓ |
52 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX