Print this page
10685 SMB code needs smatch fixes
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/fs.d/smbclnt/fksmbcl/Makefile
+++ new/usr/src/cmd/fs.d/smbclnt/fksmbcl/Makefile
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 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright 2017 Nexenta Systems, Inc. All rights reserved.
24 +# Copyright 2019, Joyent, Inc.
24 25 #
25 26
26 27 PROG= fksmbcl
27 28
28 29 OBJS_LOCAL = \
29 30 fksmbcl_main.o \
30 31 fkdev.o \
31 32 fknewvc.o \
32 33 fkiod_cl.o \
33 34 shares.o
34 35
35 36 OBJS= ${OBJS_LOCAL}
36 37 SRCS= ${OBJS_LOCAL:.o=.c}
37 38
38 39 include ../../../Makefile.cmd
39 40 include ../../../Makefile.ctf
40 41
41 42 # Force SOURCEDEBUG
42 43 CSOURCEDEBUGFLAGS = -g
43 44 CCSOURCEDEBUGFLAGS = -g
44 45 STRIP_STABS = :
45 46
46 47 # Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
47 48 # Also, like Makefile.uts, reset CPPFLAGS
48 49 # CPPFLAGS.first += -I$(SRC)/lib/libfakekernel/common
49 50 CPPFLAGS.first += -I$(SRC)/lib/smbclnt/libfknsmb/common
50 51 CPPFLAGS= $(CPPFLAGS.first)
51 52
52 53 INCS += -I$(SRC)/uts/common/fs/smbclnt
53 54 INCS += -I$(SRC)/uts/common
54 55 INCS += -I$(SRC)/common/smbclnt
55 56 INCS += -I$(SRC)/common
56 57
57 58 # Allow cpp to find libfknsmb.h etc. via
58 59 # include <libfknsmb/common/libfknsmb.h>
59 60 INCS += -I$(SRC)/lib/smbclnt
60 61 INCS += -I$(SRC)/lib/libsmbfs
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
61 62 INCS += -I$(SRC)/lib/libsmbfs/netsmb
62 63
63 64 CPPFLAGS += $(INCS)
64 65 CPPFLAGS += -D_REENTRANT
65 66 CPPFLAGS += -D_FILE_OFFSET_BITS=64
66 67 CPPFLAGS += -D_LARGEFILE64_SOURCE=1
67 68 CPPFLAGS += -DFKSMBCL
68 69 # Always want DEBUG here
69 70 CPPFLAGS += -DDEBUG
70 71
72 +# needs work
73 +SMOFF += all_func_returns
74 +
71 75 CSTD= $(CSTD_GNU99)
72 76
73 77 CFLAGS += $(CCVERBOSE)
74 78 CFLAGS64 += $(CCVERBOSE)
75 79
76 80 LDFLAGS += $(ZNOLAZYLOAD)
77 81 LDFLAGS += -R/usr/lib/smbfs
78 82 LDLIBS += -L$(ROOT)/usr/lib/smbfs
79 83 LDLIBS += -lsmbfs -lfksmbfs -lfknsmb
80 84 LDLIBS += -lsocket
81 85
82 86 ROOTSMBDDIR = $(ROOTLIB)/smbfs
83 87 ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
84 88
85 89 .KEEP_STATE:
86 90
87 91 all: $(PROG)
88 92
89 93 $(PROG): $(OBJS)
90 94 $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
91 95 $(POST_PROCESS)
92 96
93 97 clean:
94 98 -$(RM) $(OBJS)
95 99
96 100 # lots of lint due to mixing kernel+user stuff. give up.
97 101 lint: # lint_SRCS
98 102
99 103 include ../../../Makefile.targ
100 104
101 105 install: all $(ROOTSMBDFILE)
102 106
103 107 $(ROOTSMBDDIR)/%: %
104 108 $(INS.file)
↓ open down ↓ |
24 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX