Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/ndmpd/Makefile
+++ new/usr/src/cmd/ndmpd/Makefile
1 1 #
2 2 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
3 +# Copyright (c) 2018, Joyent, Inc.
3 4 #
4 5
5 6 #
6 7 # BSD 3 Clause License
7 8 #
8 9 # Copyright (c) 2007, The Storage Networking Industry Association.
9 10 #
10 11 # Redistribution and use in source and binary forms, with or without
11 12 # modification, are permitted provided that the following conditions
12 13 # are met:
13 14 # - Redistributions of source code must retain the above copyright
14 15 # notice, this list of conditions and the following disclaimer.
15 16 #
16 17 # - Redistributions in binary form must reproduce the above copyright
17 18 # notice, this list of conditions and the following disclaimer in
18 19 # the documentation and/or other materials provided with the
19 20 # distribution.
20 21 #
21 22 # - Neither the name of The Storage Networking Industry Association (SNIA)
22 23 # nor the names of its contributors may be used to endorse or promote
23 24 # products derived from this software without specific prior written
24 25 # permission.
25 26 #
26 27 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 28 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 29 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 30 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
30 31 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 32 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 33 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 34 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 35 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 36 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 37 # POSSIBILITY OF SUCH DAMAGE.
37 38 #
38 39 PROG = ndmpd
39 40
40 41 include $(SRC)/cmd/Makefile.cmd
41 42
42 43 NDMP_DIR = ndmp
43 44 TLM_DIR = tlm
↓ open down ↓ |
31 lines elided |
↑ open up ↑ |
44 45
45 46 include $(NDMP_DIR)/Makefile.rpcgen
46 47
47 48 CFLAGS += $(CCVERBOSE)
48 49
49 50 CPPFLAGS += $(LFLAGS64)
50 51
51 52 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DDEBUG
52 53 CPPFLAGS += -I. -Iinclude
53 54
55 +# not linted
56 +SMATCH=off
57 +
54 58 CSTD = $(CSTD_GNU99)
55 59
56 60 # lint does not like unused _umem_*_init
57 61 LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
58 62
59 63 # function argument declared inconsistently
60 64 LINTFLAGS += -xerroff=E_INCONS_ARG_DECL2
61 65 # value type used inconsistently
62 66 LINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_USED2
63 67 # value type declared inconsistently
64 68 LINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2
65 69 # argument used inconsistently
66 70 LINTFLAGS += -xerroff=E_INCONS_ARG_USED2
67 71
68 72 CERRWARN += -_gcc=-Wno-unused-variable
69 73 CERRWARN += -_gcc=-Wno-switch
70 74 CERRWARN += -_gcc=-Wno-uninitialized
71 75 CERRWARN += -_gcc=-Wno-address
72 76
73 77 LDLIBS += -lsocket -lnsl -lzfs -lsec -lndmp -lmd5 -lnvpair -lumem -lbsm -lgen -lcmdutils -linetutil
74 78
75 79 OBJS= \
76 80 $(NDMP_DIR)/ndmp_xdr.o \
77 81 $(NDMP_OBJ:%.o=$(NDMP_DIR)/%.o) $(TLM_OBJ:%.o=$(TLM_DIR)/%.o)
78 82
79 83 NDMP_OBJ = \
80 84 ndmpd_callbacks.o \
81 85 ndmpd_chkpnt.o \
82 86 ndmpd_comm.o \
83 87 ndmpd_config.o \
84 88 ndmpd_connect.o \
85 89 ndmpd_data.o \
86 90 ndmpd_door.o \
87 91 ndmpd_dtime.o \
88 92 ndmpd_fhistory.o \
89 93 ndmpd_handler.o \
90 94 ndmpd_log.o \
91 95 ndmpd_main.o \
92 96 ndmpd_mark.o \
93 97 ndmpd_mover.o \
94 98 ndmpd_prop.o \
95 99 ndmpd_scsi.o \
96 100 ndmpd_tape.o \
97 101 ndmpd_tar.o \
98 102 ndmpd_tar3.o \
99 103 ndmpd_util.o \
100 104 ndmpd_zfs.o
101 105
102 106 TLM_OBJ = \
103 107 tlm_backup_reader.o \
104 108 tlm_bitmap.o \
105 109 tlm_buffers.o \
106 110 tlm_info.o \
107 111 tlm_init.o \
108 112 tlm_lib.o \
109 113 tlm_restore_writer.o \
110 114 tlm_traverse.o \
111 115 tlm_util.o \
112 116 tlm_hardlink.o
113 117
114 118 SRCS= $(NDMP_OBJ:%.o=$(NDMP_DIR)/%.c) $(TLM_OBJ:%.o=$(TLM_DIR)/%.c)
115 119
116 120 SVCMETHOD = svc-ndmp
117 121 $(ROOTSVCMETHOD) := FILEMODE = 0555
118 122
119 123 MANIFEST = ndmp.xml
120 124 ROOTMANIFESTDIR= $(ROOTSVCSYSTEM)
121 125 $(ROOTMANIFEST) := FILEMODE = 444
122 126
123 127 ROOTNDMPDDIR= $(ROOTLIB)/ndmp
124 128 ROOTNDMPDFILE = $(PROG:%=$(ROOTNDMPDDIR)/%)
125 129
126 130 FILEMODE = 0444
127 131 $(ROOTNDMPDFILE):= FILEMODE = 0555
128 132
129 133 $(ROOTNDMPDDIR):
130 134 $(INS.dir)
131 135
132 136 $(ROOTNDMPDDIR)/%: %
133 137 $(INS.file)
134 138
135 139 .KEEP_STATE:
136 140
137 141 all: $(PROG)
138 142
139 143 install: all $(ROOTNDMPDDIR) $(ROOTNDMPDFILE) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
140 144
141 145 check: $(CHKMANIFEST)
142 146
143 147 clobber:
144 148
145 149 $(PROG) : $(OBJS)
146 150 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
147 151 $(POST_PROCESS)
148 152
149 153 $(NDMP_DIR)/%.o : $(NDMP_DIR)/%.c
150 154 $(COMPILE.c) -o $@ $<
151 155
152 156 $(TLM_DIR)/%.o : $(TLM_DIR)/%.c
153 157 $(COMPILE.c) -o $@ $<
154 158
155 159 lint: lint_SRCS
156 160
157 161 clean: rpcclean
158 162 rm -f $(NDMP_DIR)/*.o $(TLM_DIR)/*.o
159 163
160 164 include $(SRC)/cmd/Makefile.targ
↓ open down ↓ |
97 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX