Print this page
10685 SMB code needs smatch fixes


   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2017 Nexenta Systems, Inc.  All rights reserved.

  24 #
  25 
  26 PROG=   fksmbcl
  27 
  28 OBJS_LOCAL = \
  29         fksmbcl_main.o \
  30         fkdev.o \
  31         fknewvc.o \
  32         fkiod_cl.o \
  33         shares.o
  34 
  35 OBJS=   ${OBJS_LOCAL}
  36 SRCS=   ${OBJS_LOCAL:.o=.c}
  37 
  38 include ../../../Makefile.cmd
  39 include ../../../Makefile.ctf
  40 
  41 # Force SOURCEDEBUG
  42 CSOURCEDEBUGFLAGS       = -g
  43 CCSOURCEDEBUGFLAGS      = -g


  51 
  52 INCS += -I$(SRC)/uts/common/fs/smbclnt
  53 INCS += -I$(SRC)/uts/common
  54 INCS += -I$(SRC)/common/smbclnt
  55 INCS += -I$(SRC)/common
  56 
  57 # Allow cpp to find libfknsmb.h etc. via
  58 # include <libfknsmb/common/libfknsmb.h>
  59 INCS += -I$(SRC)/lib/smbclnt
  60 INCS += -I$(SRC)/lib/libsmbfs
  61 INCS += -I$(SRC)/lib/libsmbfs/netsmb
  62 
  63 CPPFLAGS += $(INCS)
  64 CPPFLAGS += -D_REENTRANT
  65 CPPFLAGS += -D_FILE_OFFSET_BITS=64
  66 CPPFLAGS += -D_LARGEFILE64_SOURCE=1
  67 CPPFLAGS += -DFKSMBCL
  68 # Always want DEBUG here
  69 CPPFLAGS += -DDEBUG
  70 



  71 CSTD=           $(CSTD_GNU99)
  72 
  73 CFLAGS += $(CCVERBOSE)
  74 CFLAGS64 += $(CCVERBOSE)
  75 
  76 LDFLAGS += $(ZNOLAZYLOAD)
  77 LDFLAGS += -R/usr/lib/smbfs
  78 LDLIBS += -L$(ROOT)/usr/lib/smbfs
  79 LDLIBS += -lsmbfs -lfksmbfs -lfknsmb
  80 LDLIBS += -lsocket
  81 
  82 ROOTSMBDDIR = $(ROOTLIB)/smbfs
  83 ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
  84 
  85 .KEEP_STATE:
  86 
  87 all: $(PROG)
  88 
  89 $(PROG): $(OBJS)
  90         $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)


   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  24 # Copyright 2019, Joyent, Inc.
  25 #
  26 
  27 PROG=   fksmbcl
  28 
  29 OBJS_LOCAL = \
  30         fksmbcl_main.o \
  31         fkdev.o \
  32         fknewvc.o \
  33         fkiod_cl.o \
  34         shares.o
  35 
  36 OBJS=   ${OBJS_LOCAL}
  37 SRCS=   ${OBJS_LOCAL:.o=.c}
  38 
  39 include ../../../Makefile.cmd
  40 include ../../../Makefile.ctf
  41 
  42 # Force SOURCEDEBUG
  43 CSOURCEDEBUGFLAGS       = -g
  44 CCSOURCEDEBUGFLAGS      = -g


  52 
  53 INCS += -I$(SRC)/uts/common/fs/smbclnt
  54 INCS += -I$(SRC)/uts/common
  55 INCS += -I$(SRC)/common/smbclnt
  56 INCS += -I$(SRC)/common
  57 
  58 # Allow cpp to find libfknsmb.h etc. via
  59 # include <libfknsmb/common/libfknsmb.h>
  60 INCS += -I$(SRC)/lib/smbclnt
  61 INCS += -I$(SRC)/lib/libsmbfs
  62 INCS += -I$(SRC)/lib/libsmbfs/netsmb
  63 
  64 CPPFLAGS += $(INCS)
  65 CPPFLAGS += -D_REENTRANT
  66 CPPFLAGS += -D_FILE_OFFSET_BITS=64
  67 CPPFLAGS += -D_LARGEFILE64_SOURCE=1
  68 CPPFLAGS += -DFKSMBCL
  69 # Always want DEBUG here
  70 CPPFLAGS += -DDEBUG
  71 
  72 # needs work
  73 SMOFF += all_func_returns
  74 
  75 CSTD=           $(CSTD_GNU99)
  76 
  77 CFLAGS += $(CCVERBOSE)
  78 CFLAGS64 += $(CCVERBOSE)
  79 
  80 LDFLAGS += $(ZNOLAZYLOAD)
  81 LDFLAGS += -R/usr/lib/smbfs
  82 LDLIBS += -L$(ROOT)/usr/lib/smbfs
  83 LDLIBS += -lsmbfs -lfksmbfs -lfknsmb
  84 LDLIBS += -lsocket
  85 
  86 ROOTSMBDDIR = $(ROOTLIB)/smbfs
  87 ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
  88 
  89 .KEEP_STATE:
  90 
  91 all: $(PROG)
  92 
  93 $(PROG): $(OBJS)
  94         $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)