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 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25 # Copyright 2014 Nexenta Systems, Inc. All rights reserved.
26 #
27
28 LIBRARY = libfksmbsrv.a
29 VERS = .1
30
31 OBJS_LOCAL = \
32 fksmb_cred.o \
33 fksmb_dt.o \
34 fksmb_fem.o \
35 fksmb_idmap.o \
36 fksmb_init.o \
37 fksmb_kdoor.o \
38 fksmb_sign_pkcs.o \
39 fake_lookup.o \
40 fake_nblk.o \
41 fake_vfs.o \
42 fake_vnode.o \
43 fake_vop.o \
44 fake_xattr.o \
45 reparse.o \
46 vncache.o
47
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
51 #
52 OBJS_FS_SMBSRV = \
53 smb_acl.o \
54 smb_alloc.o \
55 smb_authenticate.o \
56 smb_close.o \
57 smb_cmn_rename.o \
58 smb_cmn_setfile.o \
59 smb_common_open.o \
60 smb_common_transact.o \
61 smb_create.o \
62 smb_delete.o \
63 smb_dfs.o \
64 smb_directory.o \
65 smb_dispatch.o \
66 smb_echo.o \
67 smb_errno.o \
68 smb_find.o \
69 smb_flush.o \
70 smb_fsinfo.o \
71 smb_fsops.o \
72 smb_kshare.o \
73 smb_kutil.o \
74 smb_lock.o \
75 smb_lock_byte_range.o \
76 smb_locking_andx.o \
91 smb_nt_transact_security.o \
92 smb_odir.o \
93 smb_ofile.o \
94 smb_open_andx.o \
95 smb_opipe.o \
96 smb_oplock.o \
97 smb_pathname.o \
98 smb_print.o \
99 smb_process_exit.o \
100 smb_query_fileinfo.o \
101 smb_quota.o \
102 smb_read.o \
103 smb_rename.o \
104 smb_sd.o \
105 smb_seek.o \
106 smb_server.o \
107 smb_session.o \
108 smb_session_setup_andx.o \
109 smb_set_fileinfo.o \
110 smb_signing.o \
111 smb_thread.o \
112 smb_tree.o \
113 smb_trans2_create_directory.o \
114 smb_trans2_dfs.o \
115 smb_trans2_find.o \
116 smb_tree_connect.o \
117 smb_unlock_byte_range.o \
118 smb_user.o \
119 smb_vfs.o \
120 smb_vops.o \
121 smb_vss.o \
122 smb_write.o \
123 \
124 smb2_dispatch.o \
125 smb2_cancel.o \
126 smb2_change_notify.o \
127 smb2_close.o \
128 smb2_create.o \
129 smb2_echo.o \
130 smb2_flush.o \
131 smb2_ioctl.o \
132 smb2_lock.o \
133 smb2_logoff.o \
134 smb2_negotiate.o \
135 smb2_ofile.o \
136 smb2_oplock.o \
137 smb2_qinfo_file.o \
138 smb2_qinfo_fs.o \
139 smb2_qinfo_sec.o \
140 smb2_qinfo_quota.o \
141 smb2_query_dir.o \
142 smb2_query_info.o \
143 smb2_read.o \
144 smb2_session_setup.o \
145 smb2_set_info.o \
146 smb2_setinfo_file.o \
147 smb2_setinfo_fs.o \
148 smb2_setinfo_quota.o \
149 smb2_setinfo_sec.o \
150 smb2_signing.o \
151 smb2_tree_connect.o \
152 smb2_tree_disconn.o \
153 smb2_write.o
154
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
158 OBJS_CMN_SMBSRV = \
159 smb_inet.o \
160 smb_match.o \
161 smb_msgbuf.o \
162 smb_native.o \
163 smb_netbios_util.o \
164 smb_oem.o \
165 smb_sid.o \
166 smb_string.o \
167 smb_token.o \
168 smb_token_xdr.o \
169 smb_utf8.o \
170 smb_xdr.o
171
172 OBJS_MISC = \
173 acl_common.o \
174 pathname.o \
175 refstr.o \
176 smb_status2winerr.o \
177 xattr_common.o
178
179 OBJECTS = \
180 $(OBJS_LOCAL) \
181 $(OBJS_FS_SMBSRV) \
182 $(OBJS_CMN_SMBSRV) \
183 $(OBJS_MISC)
184
185 include ../../../Makefile.lib
186 include ../../Makefile.lib
187
188 # Force SOURCEDEBUG
189 CSOURCEDEBUGFLAGS = -g
190 CCSOURCEDEBUGFLAGS = -g
191 STRIP_STABS = :
192
193
194 # Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
195 CPPFLAGS.first += -I../../../libfakekernel/common
196 CPPFLAGS.first += -I../common
197
198 INCS += -I$(SRC)/uts/common
199 INCS += -I$(SRC)/common/smbsrv
200 INCS += -I$(SRC)/common
201
202 LINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
203 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
204 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
205
206 LDLIBS += $(MACH_LDLIBS)
207 LDLIBS += -lfakekernel -lidmap -lcmdutils
208 LDLIBS += -lavl -lnvpair -lnsl -lpkcs11 -lreparse -lc
209
210 CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
211 CPPFLAGS += -D_FILE_OFFSET_BITS=64
212 # Always want DEBUG here
213 CPPFLAGS += -DDEBUG
214
215 CERRWARN += -_gcc=-Wno-parentheses
216 CERRWARN += -_gcc=-Wno-switch
217
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)
221
222 all:
223
224 pics/%.o: $(SRC)/uts/common/fs/smbsrv/%.c
225 $(COMPILE.c) -o $@ $<
226 $(POST_PROCESS_O)
227
228 pics/acl_common.o: $(SRC)/common/acl/acl_common.c
229 $(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c
230 $(POST_PROCESS_O)
231
232 pics/smb_status2winerr.o: $(SRC)/common/smbclnt/smb_status2winerr.c
233 $(COMPILE.c) -o $@ $(SRC)/common/smbclnt/smb_status2winerr.c
234 $(POST_PROCESS_O)
235
236 pics/pathname.o: $(SRC)/uts/common/fs/pathname.c
237 $(COMPILE.c) -o $@ $(SRC)/uts/common/fs/pathname.c
238 $(POST_PROCESS_O)
239
240 pics/refstr.o: $(SRC)/uts/common/os/refstr.c
241 $(COMPILE.c) -o $@ $(SRC)/uts/common/os/refstr.c
242 $(POST_PROCESS_O)
243
244 pics/xattr_common.o: $(SRC)/common/xattr/xattr_common.c
245 $(COMPILE.c) -o $@ $(SRC)/common/xattr/xattr_common.c
246 $(POST_PROCESS_O)
247
248 # Makefile.targ has rule for $(SRC)/common/smbsrv/%.c
249
250 .KEEP_STATE:
251
252 include ../../Makefile.targ
253 include ../../../Makefile.targ
|
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 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25 # Copyright 2018 Nexenta Systems, Inc. All rights reserved.
26 #
27
28 LIBRARY = libfksmbsrv.a
29 VERS = .1
30
31 OBJS_LOCAL = \
32 fksmb_audit.o \
33 fksmb_cred.o \
34 fksmb_encrypt_pkcs.o \
35 fksmb_fem.o \
36 fksmb_idmap.o \
37 fksmb_init.o \
38 fksmb_kdoor.o \
39 fksmb_sign_pkcs.o \
40 fake_lookup.o \
41 fake_nblk.o \
42 fake_vfs.o \
43 fake_vnode.o \
44 fake_vop.o \
45 fake_xattr.o \
46 reparse.o \
47 vncache.o
48
49 # See also: $SRC/uts/common/Makefile.files
50 # NB: Intentionally ommitted, compared w/ the above:
51 # smb_cred, smb_fem, smb_idmap, smb_init, smb_kdoor
52 #
53 OBJS_FS_SMBSRV = \
54 smb_acl.o \
55 smb_alloc.o \
56 smb_authenticate.o \
57 smb_close.o \
58 smb_cmn_oplock.o \
59 smb_cmn_rename.o \
60 smb_cmn_setfile.o \
61 smb_common_open.o \
62 smb_common_transact.o \
63 smb_create.o \
64 smb_delete.o \
65 smb_dfs.o \
66 smb_directory.o \
67 smb_dispatch.o \
68 smb_echo.o \
69 smb_errno.o \
70 smb_find.o \
71 smb_flush.o \
72 smb_fsinfo.o \
73 smb_fsops.o \
74 smb_kshare.o \
75 smb_kutil.o \
76 smb_lock.o \
77 smb_lock_byte_range.o \
78 smb_locking_andx.o \
93 smb_nt_transact_security.o \
94 smb_odir.o \
95 smb_ofile.o \
96 smb_open_andx.o \
97 smb_opipe.o \
98 smb_oplock.o \
99 smb_pathname.o \
100 smb_print.o \
101 smb_process_exit.o \
102 smb_query_fileinfo.o \
103 smb_quota.o \
104 smb_read.o \
105 smb_rename.o \
106 smb_sd.o \
107 smb_seek.o \
108 smb_server.o \
109 smb_session.o \
110 smb_session_setup_andx.o \
111 smb_set_fileinfo.o \
112 smb_signing.o \
113 smb_srv_oplock.o \
114 smb_thread.o \
115 smb_tree.o \
116 smb_trans2_create_directory.o \
117 smb_trans2_dfs.o \
118 smb_trans2_find.o \
119 smb_tree_connect.o \
120 smb_unlock_byte_range.o \
121 smb_user.o \
122 smb_vops.o \
123 smb_vss.o \
124 smb_write.o \
125 \
126 smb2_aapl.o \
127 smb2_dispatch.o \
128 smb2_durable.o \
129 smb2_cancel.o \
130 smb2_change_notify.o \
131 smb2_close.o \
132 smb2_create.o \
133 smb2_echo.o \
134 smb2_flush.o \
135 smb2_fsctl_copychunk.o \
136 smb2_fsctl_fs.o \
137 smb2_fsctl_odx.o \
138 smb2_fsctl_sparse.o \
139 smb2_ioctl.o \
140 smb2_lease.o \
141 smb2_lock.o \
142 smb2_logoff.o \
143 smb2_negotiate.o \
144 smb2_ofile.o \
145 smb2_oplock.o \
146 smb2_qinfo_file.o \
147 smb2_qinfo_fs.o \
148 smb2_qinfo_sec.o \
149 smb2_qinfo_quota.o \
150 smb2_query_dir.o \
151 smb2_query_info.o \
152 smb2_read.o \
153 smb2_session_setup.o \
154 smb2_set_info.o \
155 smb2_setinfo_file.o \
156 smb2_setinfo_fs.o \
157 smb2_setinfo_quota.o \
158 smb2_setinfo_sec.o \
159 smb2_signing.o \
160 smb2_tree_connect.o \
161 smb2_tree_disconn.o \
162 smb2_write.o \
163 \
164 smb3_encrypt.o
165
166 # Can't just link with -lsmb because of user vs kernel API
167 # i.e. can't call free with mem from kmem_alloc, which is
168 # what happens if we just link with -lsmb
169 OBJS_CMN_SMBSRV = \
170 smb_cfg_util.o \
171 smb_inet.o \
172 smb_match.o \
173 smb_msgbuf.o \
174 smb_native.o \
175 smb_netbios_util.o \
176 smb_oem.o \
177 smb_sid.o \
178 smb_string.o \
179 smb_token.o \
180 smb_token_xdr.o \
181 smb_utf8.o \
182 smb_xdr.o
183
184 OBJS_MISC = \
185 acl_common.o \
186 pathname.o \
187 refstr.o \
188 smb_status2winerr.o \
189 xattr_common.o
190
191 # This one can't be in OBJECTS, as it has to depend on
192 # all of those for the COMPILE.d rule (which processes
193 # all those objects collecting probe instances).
194 DTRACE_OBJS = fksmb_dt.o
195
196 OBJECTS = \
197 $(OBJS_LOCAL) \
198 $(OBJS_FS_SMBSRV) \
199 $(OBJS_CMN_SMBSRV) \
200 $(OBJS_MISC)
201
202 include ../../../Makefile.lib
203 include ../../Makefile.lib
204
205 # Force SOURCEDEBUG
206 CSOURCEDEBUGFLAGS = -g
207 CCSOURCEDEBUGFLAGS = -g
208 STRIP_STABS = :
209
210
211 # Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
212 # Also, like Makefile.uts, reset CPPFLAGS
213 CPPFLAGS.first += -I../../../libfakekernel/common
214 CPPFLAGS.first += -I../common
215 CPPFLAGS = $(CPPFLAGS.first)
216
217 INCS += -I$(SRC)/uts/common
218 INCS += -I$(SRC)/common/smbsrv
219 INCS += -I$(SRC)/common
220
221 LINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
222 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
223 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
224
225 LDLIBS += $(MACH_LDLIBS)
226 LDLIBS += -lfakekernel -lidmap -lcmdutils
227 LDLIBS += -lavl -lnvpair -lnsl -lpkcs11 -lreparse -lc
228
229 CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
230 CPPFLAGS += -D_FILE_OFFSET_BITS=64
231 # Always want DEBUG here
232 CPPFLAGS += -DDEBUG
233
234 CERRWARN += -_gcc=-Wno-switch
235
236 SRCS= $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \
237 $(OBJS_FS_SMBSRV:%.o=$(SRC)/uts/common/fs/smbsrv/%.c) \
238 $(OBJS_CMN_SMBSRV:%.o=$(SRC)/common/smbsrv/%.c)
239
240 all:
241
242 pics/%.o: $(SRC)/uts/common/fs/smbsrv/%.c
243 $(COMPILE.c) -o $@ $<
244 $(POST_PROCESS_O)
245
246 pics/acl_common.o: $(SRC)/common/acl/acl_common.c
247 $(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c
248 $(POST_PROCESS_O)
249
250 pics/pathname.o: $(SRC)/uts/common/fs/pathname.c
251 $(COMPILE.c) -o $@ $(SRC)/uts/common/fs/pathname.c
252 $(POST_PROCESS_O)
253
254 pics/refstr.o: $(SRC)/uts/common/os/refstr.c
255 $(COMPILE.c) -o $@ $(SRC)/uts/common/os/refstr.c
256 $(POST_PROCESS_O)
257
258 pics/smb_status2winerr.o: $(SRC)/common/smbclnt/smb_status2winerr.c
259 $(COMPILE.c) -o $@ $(SRC)/common/smbclnt/smb_status2winerr.c
260 $(POST_PROCESS_O)
261
262 pics/xattr_common.o: $(SRC)/common/xattr/xattr_common.c
263 $(COMPILE.c) -o $@ $(SRC)/common/xattr/xattr_common.c
264 $(POST_PROCESS_O)
265
266 # Makefile.targ has rule for $(SRC)/common/smbsrv/%.c
267
268 .KEEP_STATE:
269
270 include ../../Makefile.targ
271 include ../../../Makefile.targ
272
273 EXTPICS= $(DTRACE_OBJS:%=pics/%)
274 CLEANFILES += $(EXTPICS)
275
276 $(OBJS) $(PICS) : ../common/fksmb_dt.h
277
278 pics/fksmb_dt.o: ../common/fksmb_dt.d $(PICS)
279 $(COMPILE.d) -C -s ../common/fksmb_dt.d -o $@ $(PICS)
280 $(POST_PROCESS_O)
|