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.
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.
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]
22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright 2014 Nexenta Systems, Inc. All rights reserved.
28 LIBRARY = libfksmbsrv.a
48 # See also: $SRC/uts/common/Makefile.files
49 # NB: Intentionally ommitted, compared w/ the above:
50 # smb_cred, smb_fem, smb_idmap, smb_init, smb_kdoor
60 smb_common_transact.o \
75 smb_lock_byte_range.o \
79 smb_mbuf_marshaling.o \
86 smb_nt_create_andx.o \
87 smb_nt_transact_create.o \
88 smb_nt_transact_ioctl.o \
89 smb_nt_transact_notify_change.o \
90 smb_nt_transact_quota.o \
91 smb_nt_transact_security.o \
100 smb_query_fileinfo.o \
108 smb_session_setup_andx.o \
113 smb_trans2_create_directory.o \
117 smb_unlock_byte_range.o \
126 smb2_change_notify.o \
144 smb2_session_setup.o \
146 smb2_setinfo_file.o \
148 smb2_setinfo_quota.o \
151 smb2_tree_connect.o \
152 smb2_tree_disconn.o \
155 # Can't just link with -lsmb because of user vs kernel API
156 # i.e. can't call free with mem from kmem_alloc, which is
157 # what happens if we just link with -lsmb
176 smb_status2winerr.o \
185 include ../../../Makefile.lib
186 include ../../Makefile.lib
189 CSOURCEDEBUGFLAGS = -g
190 CCSOURCEDEBUGFLAGS = -g
194 # Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
195 CPPFLAGS.first += -I../../../libfakekernel/common
196 CPPFLAGS.first += -I../common
198 INCS += -I$(SRC)/uts/common
199 INCS += -I$(SRC)/common/smbsrv
200 INCS += -I$(SRC)/common
202 LINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
203 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
204 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
206 LDLIBS += $(MACH_LDLIBS)
207 LDLIBS += -lfakekernel -lidmap -lcmdutils
208 LDLIBS += -lavl -lnvpair -lnsl -lpkcs11 -lreparse -lc
210 CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
211 CPPFLAGS += -D_FILE_OFFSET_BITS=64
212 # Always want DEBUG here
215 CERRWARN += -_gcc=-Wno-parentheses
216 CERRWARN += -_gcc=-Wno-switch
218 SRCS= $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \
219 $(OBJS_FS_SMBSRV:%.o=$(SRC)/uts/common/fs/smbsrv/%.c) \
220 $(OBJS_CMN_SMBSRV:%.o=$(SRC)/common/smbsrv/%.c)
224 pics/%.o: $(SRC)/uts/common/fs/smbsrv/%.c
225 $(COMPILE.c) -o $@ $<
228 pics/acl_common.o: $(SRC)/common/acl/acl_common.c
229 $(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c
232 pics/smb_status2winerr.o: $(SRC)/common/smbclnt/smb_status2winerr.c
233 $(COMPILE.c) -o $@ $(SRC)/common/smbclnt/smb_status2winerr.c
236 pics/pathname.o: $(SRC)/uts/common/fs/pathname.c
237 $(COMPILE.c) -o $@ $(SRC)/uts/common/fs/pathname.c
240 pics/refstr.o: $(SRC)/uts/common/os/refstr.c
241 $(COMPILE.c) -o $@ $(SRC)/uts/common/os/refstr.c
244 pics/xattr_common.o: $(SRC)/common/xattr/xattr_common.c
245 $(COMPILE.c) -o $@ $(SRC)/common/xattr/xattr_common.c
248 # Makefile.targ has rule for $(SRC)/common/smbsrv/%.c
252 include ../../Makefile.targ
253 include ../../../Makefile.targ