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
57 smb_common_transact.o \
70 smb_lock_byte_range.o \
74 smb_mbuf_marshaling.o \
80 smb_nt_create_andx.o \
81 smb_nt_transact_create.o \
82 smb_nt_transact_ioctl.o \
83 smb_nt_transact_notify_change.o \
84 smb_nt_transact_quota.o \
85 smb_nt_transact_security.o \
94 smb_query_fileinfo.o \
101 smb_session_setup_andx.o \
106 smb_trans2_create_directory.o \
110 smb_unlock_byte_range.o \
117 # Can't just link with -lsmb because of user vs kernel API
118 # i.e. can't call free with mem from kmem_alloc, which is
119 # what happens if we just link with -lsmb
146 include ../../../Makefile.lib
147 include ../../Makefile.lib
150 CSOURCEDEBUGFLAGS = -g
151 CCSOURCEDEBUGFLAGS = -g
155 # Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
156 CPPFLAGS.first += -I../../../libfakekernel/common
157 CPPFLAGS.first += -I../common
159 INCS += -I$(SRC)/uts/common
160 INCS += -I$(SRC)/common/smbsrv
161 INCS += -I$(SRC)/common
163 LINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
164 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
165 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
167 LDLIBS += $(MACH_LDLIBS)
168 LDLIBS += -lfakekernel -lidmap -lcmdutils
169 LDLIBS += -lavl -lnvpair -lnsl -lpkcs11 -lreparse -lc
171 CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
172 CPPFLAGS += -D_FILE_OFFSET_BITS=64
173 # Always want DEBUG here
176 CERRWARN += -_gcc=-Wno-parentheses
177 CERRWARN += -_gcc=-Wno-switch
179 SRCS= $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \
180 $(OBJS_FS_SMBSRV:%.o=$(SRC)/uts/common/fs/smbsrv/%.c) \
181 $(OBJS_CMN_SMBSRV:%.o=$(SRC)/common/smbsrv/%.c)
185 pics/%.o: $(SRC)/uts/common/fs/smbsrv/%.c
186 $(COMPILE.c) -o $@ $<
189 pics/acl_common.o: $(SRC)/common/acl/acl_common.c
190 $(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c
193 pics/pathname.o: $(SRC)/uts/common/fs/pathname.c
194 $(COMPILE.c) -o $@ $(SRC)/uts/common/fs/pathname.c
197 pics/refstr.o: $(SRC)/uts/common/os/refstr.c
198 $(COMPILE.c) -o $@ $(SRC)/uts/common/os/refstr.c
201 pics/xattr_common.o: $(SRC)/common/xattr/xattr_common.c
202 $(COMPILE.c) -o $@ $(SRC)/common/xattr/xattr_common.c
205 # Makefile.targ has rule for $(SRC)/common/smbsrv/%.c
209 include ../../Makefile.targ
210 include ../../../Makefile.targ