5917 User-mode SMB server
[unleashed.git] / usr / src / lib / smbsrv / libfksmbsrv / Makefile.com
blob92afcba6ae68bba72c09a08a159cd20743ca0e57
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
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
29 VERS =          .1
31 OBJS_LOCAL = \
32                 fksmb_cred.o \
33                 fksmb_fem.o \
34                 fksmb_idmap.o \
35                 fksmb_init.o \
36                 fksmb_kdoor.o \
37                 fksmb_opipe_door.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
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
52 OBJS_FS_SMBSRV = \
53                 smb_acl.o                               \
54                 smb_alloc.o                             \
55                 smb_close.o                             \
56                 smb_common_open.o                       \
57                 smb_common_transact.o                   \
58                 smb_create.o                            \
59                 smb_delete.o                            \
60                 smb_directory.o                         \
61                 smb_dispatch.o                          \
62                 smb_echo.o                              \
63                 smb_find.o                              \
64                 smb_flush.o                             \
65                 smb_fsinfo.o                            \
66                 smb_fsops.o                             \
67                 smb_kshare.o                            \
68                 smb_kutil.o                             \
69                 smb_lock.o                              \
70                 smb_lock_byte_range.o                   \
71                 smb_locking_andx.o                      \
72                 smb_logoff_andx.o                       \
73                 smb_mangle_name.o                       \
74                 smb_mbuf_marshaling.o                   \
75                 smb_mbuf_util.o                         \
76                 smb_negotiate.o                         \
77                 smb_net.o                               \
78                 smb_node.o                              \
79                 smb_nt_cancel.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              \
86                 smb_odir.o                              \
87                 smb_ofile.o                             \
88                 smb_open_andx.o                         \
89                 smb_opipe.o                             \
90                 smb_oplock.o                            \
91                 smb_pathname.o                          \
92                 smb_print.o                             \
93                 smb_process_exit.o                      \
94                 smb_query_fileinfo.o                    \
95                 smb_read.o                              \
96                 smb_rename.o                            \
97                 smb_sd.o                                \
98                 smb_seek.o                              \
99                 smb_server.o                            \
100                 smb_session.o                           \
101                 smb_session_setup_andx.o                \
102                 smb_set_fileinfo.o                      \
103                 smb_signing.o                           \
104                 smb_thread.o                            \
105                 smb_tree.o                              \
106                 smb_trans2_create_directory.o           \
107                 smb_trans2_dfs.o                        \
108                 smb_trans2_find.o                       \
109                 smb_tree_connect.o                      \
110                 smb_unlock_byte_range.o                 \
111                 smb_user.o                              \
112                 smb_vfs.o                               \
113                 smb_vops.o                              \
114                 smb_vss.o                               \
115                 smb_write.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
120 OBJS_CMN_SMBSRV = \
121                 smb_inet.o \
122                 smb_match.o \
123                 smb_msgbuf.o \
124                 smb_native.o \
125                 smb_netbios_util.o \
126                 smb_oem.o \
127                 smb_sid.o \
128                 smb_string.o \
129                 smb_token.o \
130                 smb_token_xdr.o \
131                 smb_utf8.o \
132                 smb_xdr.o
134 OBJS_MISC = \
135                 acl_common.o \
136                 pathname.o \
137                 refstr.o \
138                 xattr_common.o
140 OBJECTS = \
141         $(OBJS_LOCAL) \
142         $(OBJS_FS_SMBSRV) \
143         $(OBJS_CMN_SMBSRV) \
144         $(OBJS_MISC)
146 include ../../../Makefile.lib
147 include ../../Makefile.lib
149 # Force SOURCEDEBUG
150 CSOURCEDEBUGFLAGS       = -g
151 CCSOURCEDEBUGFLAGS      = -g
152 STRIP_STABS     = :
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
174 CPPFLAGS += -DDEBUG
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)
183 all:
185 pics/%.o:       $(SRC)/uts/common/fs/smbsrv/%.c
186         $(COMPILE.c) -o $@ $<
187         $(POST_PROCESS_O)
189 pics/acl_common.o:         $(SRC)/common/acl/acl_common.c
190         $(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c
191         $(POST_PROCESS_O)
193 pics/pathname.o:           $(SRC)/uts/common/fs/pathname.c
194         $(COMPILE.c) -o $@ $(SRC)/uts/common/fs/pathname.c
195         $(POST_PROCESS_O)
197 pics/refstr.o:             $(SRC)/uts/common/os/refstr.c
198         $(COMPILE.c) -o $@ $(SRC)/uts/common/os/refstr.c
199         $(POST_PROCESS_O)
201 pics/xattr_common.o:       $(SRC)/common/xattr/xattr_common.c
202         $(COMPILE.c) -o $@ $(SRC)/common/xattr/xattr_common.c
203         $(POST_PROCESS_O)
205 # Makefile.targ has rule for $(SRC)/common/smbsrv/%.c
207 .KEEP_STATE:
209 include ../../Makefile.targ
210 include ../../../Makefile.targ