xref: /titanic_52/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com (revision a9685eaab1313767d1d4dac672c3a468519aa899)
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_authenticate.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
116
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
120OBJS_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
133
134OBJS_MISC = \
135		acl_common.o \
136		pathname.o \
137		refstr.o \
138		xattr_common.o
139
140OBJECTS = \
141	$(OBJS_LOCAL) \
142	$(OBJS_FS_SMBSRV) \
143	$(OBJS_CMN_SMBSRV) \
144	$(OBJS_MISC)
145
146include ../../../Makefile.lib
147include ../../Makefile.lib
148
149# Force SOURCEDEBUG
150CSOURCEDEBUGFLAGS	= -g
151CCSOURCEDEBUGFLAGS	= -g
152STRIP_STABS 	= :
153
154
155# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
156CPPFLAGS.first += -I../../../libfakekernel/common
157CPPFLAGS.first += -I../common
158
159INCS += -I$(SRC)/uts/common
160INCS += -I$(SRC)/common/smbsrv
161INCS += -I$(SRC)/common
162
163LINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
164LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
165LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
166
167LDLIBS +=	$(MACH_LDLIBS)
168LDLIBS +=	-lfakekernel -lidmap -lcmdutils
169LDLIBS +=	-lavl -lnvpair -lnsl -lpkcs11 -lreparse -lc
170
171CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
172CPPFLAGS += -D_FILE_OFFSET_BITS=64
173# Always want DEBUG here
174CPPFLAGS += -DDEBUG
175
176CERRWARN += -_gcc=-Wno-parentheses
177CERRWARN += -_gcc=-Wno-switch
178
179SRCS=   $(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)
182
183all:
184
185pics/%.o:	$(SRC)/uts/common/fs/smbsrv/%.c
186	$(COMPILE.c) -o $@ $<
187	$(POST_PROCESS_O)
188
189pics/acl_common.o:	   $(SRC)/common/acl/acl_common.c
190	$(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c
191	$(POST_PROCESS_O)
192
193pics/pathname.o:	   $(SRC)/uts/common/fs/pathname.c
194	$(COMPILE.c) -o $@ $(SRC)/uts/common/fs/pathname.c
195	$(POST_PROCESS_O)
196
197pics/refstr.o:		   $(SRC)/uts/common/os/refstr.c
198	$(COMPILE.c) -o $@ $(SRC)/uts/common/os/refstr.c
199	$(POST_PROCESS_O)
200
201pics/xattr_common.o:	   $(SRC)/common/xattr/xattr_common.c
202	$(COMPILE.c) -o $@ $(SRC)/common/xattr/xattr_common.c
203	$(POST_PROCESS_O)
204
205# Makefile.targ has rule for $(SRC)/common/smbsrv/%.c
206
207.KEEP_STATE:
208
209include ../../Makefile.targ
210include ../../../Makefile.targ
211