xref: /titanic_51/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com (revision 6a72db4a7fa12c3e0d1c1cf91a07390739fa0fbf)
1#
2# CDDL HEADER START
3#
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 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
28LIBRARY =	libfksmbsrv.a
29VERS =		.1
30
31OBJS_LOCAL = \
32		fksmb_cred.o \
33		fksmb_fem.o \
34		fksmb_idmap.o \
35		fksmb_init.o \
36		fksmb_kdoor.o \
37		fksmb_sign_pkcs.o \
38		fake_lookup.o \
39		fake_nblk.o \
40		fake_vfs.o \
41		fake_vnode.o \
42		fake_vop.o \
43		fake_xattr.o \
44		reparse.o \
45		vncache.o
46
47# See also: $SRC/uts/common/Makefile.files
48# NB: Intentionally ommitted, compared w/ the above:
49#   smb_cred, smb_fem, smb_idmap, smb_init, smb_kdoor
50#
51OBJS_FS_SMBSRV = \
52		smb_acl.o				\
53		smb_alloc.o				\
54		smb_close.o				\
55		smb_common_open.o			\
56		smb_common_transact.o			\
57		smb_create.o				\
58		smb_delete.o				\
59		smb_directory.o				\
60		smb_dispatch.o				\
61		smb_echo.o				\
62		smb_find.o				\
63		smb_flush.o				\
64		smb_fsinfo.o				\
65		smb_fsops.o				\
66		smb_kshare.o				\
67		smb_kutil.o				\
68		smb_lock.o				\
69		smb_lock_byte_range.o			\
70		smb_locking_andx.o			\
71		smb_logoff_andx.o			\
72		smb_mangle_name.o			\
73		smb_mbuf_marshaling.o			\
74		smb_mbuf_util.o				\
75		smb_negotiate.o				\
76		smb_net.o				\
77		smb_node.o				\
78		smb_nt_cancel.o				\
79		smb_nt_create_andx.o			\
80		smb_nt_transact_create.o		\
81		smb_nt_transact_ioctl.o			\
82		smb_nt_transact_notify_change.o		\
83		smb_nt_transact_quota.o			\
84		smb_nt_transact_security.o		\
85		smb_odir.o				\
86		smb_ofile.o				\
87		smb_open_andx.o				\
88		smb_opipe.o				\
89		smb_oplock.o				\
90		smb_pathname.o				\
91		smb_print.o				\
92		smb_process_exit.o			\
93		smb_query_fileinfo.o			\
94		smb_read.o				\
95		smb_rename.o				\
96		smb_sd.o				\
97		smb_seek.o				\
98		smb_server.o				\
99		smb_session.o				\
100		smb_session_setup_andx.o		\
101		smb_set_fileinfo.o			\
102		smb_signing.o				\
103		smb_thread.o				\
104		smb_tree.o				\
105		smb_trans2_create_directory.o		\
106		smb_trans2_dfs.o			\
107		smb_trans2_find.o			\
108		smb_tree_connect.o			\
109		smb_unlock_byte_range.o			\
110		smb_user.o				\
111		smb_vfs.o				\
112		smb_vops.o				\
113		smb_vss.o				\
114		smb_write.o
115
116# Can't just link with -lsmb because of user vs kernel API
117# i.e. can't call free with mem from kmem_alloc, which is
118# what happens if we just link with -lsmb
119OBJS_CMN_SMBSRV = \
120		smb_inet.o \
121		smb_match.o \
122		smb_msgbuf.o \
123		smb_native.o \
124		smb_netbios_util.o \
125		smb_oem.o \
126		smb_sid.o \
127		smb_string.o \
128		smb_token.o \
129		smb_token_xdr.o \
130		smb_utf8.o \
131		smb_xdr.o
132
133OBJS_MISC = \
134		acl_common.o \
135		pathname.o \
136		refstr.o \
137		xattr_common.o
138
139OBJECTS = \
140	$(OBJS_LOCAL) \
141	$(OBJS_FS_SMBSRV) \
142	$(OBJS_CMN_SMBSRV) \
143	$(OBJS_MISC)
144
145include ../../../Makefile.lib
146include ../../Makefile.lib
147
148# Force SOURCEDEBUG
149CSOURCEDEBUGFLAGS	= -g
150CCSOURCEDEBUGFLAGS	= -g
151STRIP_STABS 	= :
152
153
154# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
155CPPFLAGS.first += -I../../../libfakekernel/common
156CPPFLAGS.first += -I../common
157
158INCS += -I$(SRC)/uts/common
159INCS += -I$(SRC)/common/smbsrv
160INCS += -I$(SRC)/common
161
162LINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
163LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
164LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
165
166LDLIBS +=	$(MACH_LDLIBS)
167LDLIBS +=	-lfakekernel -lidmap -lcmdutils
168LDLIBS +=	-lavl -lnvpair -lnsl -lpkcs11 -lreparse -lc
169
170CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
171CPPFLAGS += -D_FILE_OFFSET_BITS=64
172# Always want DEBUG here
173CPPFLAGS += -DDEBUG
174
175CERRWARN += -_gcc=-Wno-parentheses
176CERRWARN += -_gcc=-Wno-switch
177
178SRCS=   $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \
179	$(OBJS_FS_SMBSRV:%.o=$(SRC)/uts/common/fs/smbsrv/%.c) \
180	$(OBJS_CMN_SMBSRV:%.o=$(SRC)/common/smbsrv/%.c)
181
182all:
183
184pics/%.o:	$(SRC)/uts/common/fs/smbsrv/%.c
185	$(COMPILE.c) -o $@ $<
186	$(POST_PROCESS_O)
187
188pics/acl_common.o:	   $(SRC)/common/acl/acl_common.c
189	$(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c
190	$(POST_PROCESS_O)
191
192pics/pathname.o:	   $(SRC)/uts/common/fs/pathname.c
193	$(COMPILE.c) -o $@ $(SRC)/uts/common/fs/pathname.c
194	$(POST_PROCESS_O)
195
196pics/refstr.o:		   $(SRC)/uts/common/os/refstr.c
197	$(COMPILE.c) -o $@ $(SRC)/uts/common/os/refstr.c
198	$(POST_PROCESS_O)
199
200pics/xattr_common.o:	   $(SRC)/common/xattr/xattr_common.c
201	$(COMPILE.c) -o $@ $(SRC)/common/xattr/xattr_common.c
202	$(POST_PROCESS_O)
203
204# Makefile.targ has rule for $(SRC)/common/smbsrv/%.c
205
206.KEEP_STATE:
207
208include ../../Makefile.targ
209include ../../../Makefile.targ
210