xref: /titanic_53/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com (revision b819cea2f73f98c5662230cc9affc8cc84f77fcf)
1*b819cea2SGordon Ross#
2*b819cea2SGordon Ross# CDDL HEADER START
3*b819cea2SGordon Ross#
4*b819cea2SGordon Ross# The contents of this file are subject to the terms of the
5*b819cea2SGordon Ross# Common Development and Distribution License (the "License").
6*b819cea2SGordon Ross# You may not use this file except in compliance with the License.
7*b819cea2SGordon Ross#
8*b819cea2SGordon Ross# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*b819cea2SGordon Ross# or http://www.opensolaris.org/os/licensing.
10*b819cea2SGordon Ross# See the License for the specific language governing permissions
11*b819cea2SGordon Ross# and limitations under the License.
12*b819cea2SGordon Ross#
13*b819cea2SGordon Ross# When distributing Covered Code, include this CDDL HEADER in each
14*b819cea2SGordon Ross# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*b819cea2SGordon Ross# If applicable, add the following below this CDDL HEADER, with the
16*b819cea2SGordon Ross# fields enclosed by brackets "[]" replaced with your own identifying
17*b819cea2SGordon Ross# information: Portions Copyright [yyyy] [name of copyright owner]
18*b819cea2SGordon Ross#
19*b819cea2SGordon Ross# CDDL HEADER END
20*b819cea2SGordon Ross#
21*b819cea2SGordon Ross#
22*b819cea2SGordon Ross# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*b819cea2SGordon Ross# Use is subject to license terms.
24*b819cea2SGordon Ross#
25*b819cea2SGordon Ross# Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
26*b819cea2SGordon Ross#
27*b819cea2SGordon Ross
28*b819cea2SGordon RossLIBRARY =	libfksmbsrv.a
29*b819cea2SGordon RossVERS =		.1
30*b819cea2SGordon Ross
31*b819cea2SGordon RossOBJS_LOCAL = \
32*b819cea2SGordon Ross		fksmb_cred.o \
33*b819cea2SGordon Ross		fksmb_fem.o \
34*b819cea2SGordon Ross		fksmb_idmap.o \
35*b819cea2SGordon Ross		fksmb_init.o \
36*b819cea2SGordon Ross		fksmb_kdoor.o \
37*b819cea2SGordon Ross		fksmb_opipe_door.o \
38*b819cea2SGordon Ross		fksmb_sign_pkcs.o \
39*b819cea2SGordon Ross		fake_lookup.o \
40*b819cea2SGordon Ross		fake_nblk.o \
41*b819cea2SGordon Ross		fake_vfs.o \
42*b819cea2SGordon Ross		fake_vnode.o \
43*b819cea2SGordon Ross		fake_vop.o \
44*b819cea2SGordon Ross		fake_xattr.o \
45*b819cea2SGordon Ross		reparse.o \
46*b819cea2SGordon Ross		vncache.o
47*b819cea2SGordon Ross
48*b819cea2SGordon Ross# See also: $SRC/uts/common/Makefile.files
49*b819cea2SGordon Ross# NB: Intentionally ommitted, compared w/ the above:
50*b819cea2SGordon Ross#   smb_cred, smb_fem, smb_idmap, smb_init, smb_kdoor
51*b819cea2SGordon Ross#
52*b819cea2SGordon RossOBJS_FS_SMBSRV = \
53*b819cea2SGordon Ross		smb_acl.o				\
54*b819cea2SGordon Ross		smb_alloc.o				\
55*b819cea2SGordon Ross		smb_close.o				\
56*b819cea2SGordon Ross		smb_common_open.o			\
57*b819cea2SGordon Ross		smb_common_transact.o			\
58*b819cea2SGordon Ross		smb_create.o				\
59*b819cea2SGordon Ross		smb_delete.o				\
60*b819cea2SGordon Ross		smb_directory.o				\
61*b819cea2SGordon Ross		smb_dispatch.o				\
62*b819cea2SGordon Ross		smb_echo.o				\
63*b819cea2SGordon Ross		smb_find.o				\
64*b819cea2SGordon Ross		smb_flush.o				\
65*b819cea2SGordon Ross		smb_fsinfo.o				\
66*b819cea2SGordon Ross		smb_fsops.o				\
67*b819cea2SGordon Ross		smb_kshare.o				\
68*b819cea2SGordon Ross		smb_kutil.o				\
69*b819cea2SGordon Ross		smb_lock.o				\
70*b819cea2SGordon Ross		smb_lock_byte_range.o			\
71*b819cea2SGordon Ross		smb_locking_andx.o			\
72*b819cea2SGordon Ross		smb_logoff_andx.o			\
73*b819cea2SGordon Ross		smb_mangle_name.o			\
74*b819cea2SGordon Ross		smb_mbuf_marshaling.o			\
75*b819cea2SGordon Ross		smb_mbuf_util.o				\
76*b819cea2SGordon Ross		smb_negotiate.o				\
77*b819cea2SGordon Ross		smb_net.o				\
78*b819cea2SGordon Ross		smb_node.o				\
79*b819cea2SGordon Ross		smb_nt_cancel.o				\
80*b819cea2SGordon Ross		smb_nt_create_andx.o			\
81*b819cea2SGordon Ross		smb_nt_transact_create.o		\
82*b819cea2SGordon Ross		smb_nt_transact_ioctl.o			\
83*b819cea2SGordon Ross		smb_nt_transact_notify_change.o		\
84*b819cea2SGordon Ross		smb_nt_transact_quota.o			\
85*b819cea2SGordon Ross		smb_nt_transact_security.o		\
86*b819cea2SGordon Ross		smb_odir.o				\
87*b819cea2SGordon Ross		smb_ofile.o				\
88*b819cea2SGordon Ross		smb_open_andx.o				\
89*b819cea2SGordon Ross		smb_opipe.o				\
90*b819cea2SGordon Ross		smb_oplock.o				\
91*b819cea2SGordon Ross		smb_pathname.o				\
92*b819cea2SGordon Ross		smb_print.o				\
93*b819cea2SGordon Ross		smb_process_exit.o			\
94*b819cea2SGordon Ross		smb_query_fileinfo.o			\
95*b819cea2SGordon Ross		smb_read.o				\
96*b819cea2SGordon Ross		smb_rename.o				\
97*b819cea2SGordon Ross		smb_sd.o				\
98*b819cea2SGordon Ross		smb_seek.o				\
99*b819cea2SGordon Ross		smb_server.o				\
100*b819cea2SGordon Ross		smb_session.o				\
101*b819cea2SGordon Ross		smb_session_setup_andx.o		\
102*b819cea2SGordon Ross		smb_set_fileinfo.o			\
103*b819cea2SGordon Ross		smb_signing.o				\
104*b819cea2SGordon Ross		smb_thread.o				\
105*b819cea2SGordon Ross		smb_tree.o				\
106*b819cea2SGordon Ross		smb_trans2_create_directory.o		\
107*b819cea2SGordon Ross		smb_trans2_dfs.o			\
108*b819cea2SGordon Ross		smb_trans2_find.o			\
109*b819cea2SGordon Ross		smb_tree_connect.o			\
110*b819cea2SGordon Ross		smb_unlock_byte_range.o			\
111*b819cea2SGordon Ross		smb_user.o				\
112*b819cea2SGordon Ross		smb_vfs.o				\
113*b819cea2SGordon Ross		smb_vops.o				\
114*b819cea2SGordon Ross		smb_vss.o				\
115*b819cea2SGordon Ross		smb_write.o
116*b819cea2SGordon Ross
117*b819cea2SGordon Ross# Can't just link with -lsmb because of user vs kernel API
118*b819cea2SGordon Ross# i.e. can't call free with mem from kmem_alloc, which is
119*b819cea2SGordon Ross# what happens if we just link with -lsmb
120*b819cea2SGordon RossOBJS_CMN_SMBSRV = \
121*b819cea2SGordon Ross		smb_inet.o \
122*b819cea2SGordon Ross		smb_match.o \
123*b819cea2SGordon Ross		smb_msgbuf.o \
124*b819cea2SGordon Ross		smb_native.o \
125*b819cea2SGordon Ross		smb_netbios_util.o \
126*b819cea2SGordon Ross		smb_oem.o \
127*b819cea2SGordon Ross		smb_sid.o \
128*b819cea2SGordon Ross		smb_string.o \
129*b819cea2SGordon Ross		smb_token.o \
130*b819cea2SGordon Ross		smb_token_xdr.o \
131*b819cea2SGordon Ross		smb_utf8.o \
132*b819cea2SGordon Ross		smb_xdr.o
133*b819cea2SGordon Ross
134*b819cea2SGordon RossOBJS_MISC = \
135*b819cea2SGordon Ross		acl_common.o \
136*b819cea2SGordon Ross		pathname.o \
137*b819cea2SGordon Ross		refstr.o \
138*b819cea2SGordon Ross		xattr_common.o
139*b819cea2SGordon Ross
140*b819cea2SGordon RossOBJECTS = \
141*b819cea2SGordon Ross	$(OBJS_LOCAL) \
142*b819cea2SGordon Ross	$(OBJS_FS_SMBSRV) \
143*b819cea2SGordon Ross	$(OBJS_CMN_SMBSRV) \
144*b819cea2SGordon Ross	$(OBJS_MISC)
145*b819cea2SGordon Ross
146*b819cea2SGordon Rossinclude ../../../Makefile.lib
147*b819cea2SGordon Rossinclude ../../Makefile.lib
148*b819cea2SGordon Ross
149*b819cea2SGordon Ross# Force SOURCEDEBUG
150*b819cea2SGordon RossCSOURCEDEBUGFLAGS	= -g
151*b819cea2SGordon RossCCSOURCEDEBUGFLAGS	= -g
152*b819cea2SGordon RossSTRIP_STABS 	= :
153*b819cea2SGordon Ross
154*b819cea2SGordon Ross
155*b819cea2SGordon Ross# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
156*b819cea2SGordon RossCPPFLAGS.first += -I../../../libfakekernel/common
157*b819cea2SGordon RossCPPFLAGS.first += -I../common
158*b819cea2SGordon Ross
159*b819cea2SGordon RossINCS += -I$(SRC)/uts/common
160*b819cea2SGordon RossINCS += -I$(SRC)/common/smbsrv
161*b819cea2SGordon RossINCS += -I$(SRC)/common
162*b819cea2SGordon Ross
163*b819cea2SGordon RossLINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
164*b819cea2SGordon RossLINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
165*b819cea2SGordon RossLINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
166*b819cea2SGordon Ross
167*b819cea2SGordon RossLDLIBS +=	$(MACH_LDLIBS)
168*b819cea2SGordon RossLDLIBS +=	-lfakekernel -lidmap -lcmdutils
169*b819cea2SGordon RossLDLIBS +=	-lavl -lnvpair -lnsl -lpkcs11 -lreparse -lc
170*b819cea2SGordon Ross
171*b819cea2SGordon RossCPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
172*b819cea2SGordon RossCPPFLAGS += -D_FILE_OFFSET_BITS=64
173*b819cea2SGordon Ross# Always want DEBUG here
174*b819cea2SGordon RossCPPFLAGS += -DDEBUG
175*b819cea2SGordon Ross
176*b819cea2SGordon RossCERRWARN += -_gcc=-Wno-parentheses
177*b819cea2SGordon RossCERRWARN += -_gcc=-Wno-switch
178*b819cea2SGordon Ross
179*b819cea2SGordon RossSRCS=   $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \
180*b819cea2SGordon Ross	$(OBJS_FS_SMBSRV:%.o=$(SRC)/uts/common/fs/smbsrv/%.c) \
181*b819cea2SGordon Ross	$(OBJS_CMN_SMBSRV:%.o=$(SRC)/common/smbsrv/%.c)
182*b819cea2SGordon Ross
183*b819cea2SGordon Rossall:
184*b819cea2SGordon Ross
185*b819cea2SGordon Rosspics/%.o:	$(SRC)/uts/common/fs/smbsrv/%.c
186*b819cea2SGordon Ross	$(COMPILE.c) -o $@ $<
187*b819cea2SGordon Ross	$(POST_PROCESS_O)
188*b819cea2SGordon Ross
189*b819cea2SGordon Rosspics/acl_common.o:	   $(SRC)/common/acl/acl_common.c
190*b819cea2SGordon Ross	$(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c
191*b819cea2SGordon Ross	$(POST_PROCESS_O)
192*b819cea2SGordon Ross
193*b819cea2SGordon Rosspics/pathname.o:	   $(SRC)/uts/common/fs/pathname.c
194*b819cea2SGordon Ross	$(COMPILE.c) -o $@ $(SRC)/uts/common/fs/pathname.c
195*b819cea2SGordon Ross	$(POST_PROCESS_O)
196*b819cea2SGordon Ross
197*b819cea2SGordon Rosspics/refstr.o:		   $(SRC)/uts/common/os/refstr.c
198*b819cea2SGordon Ross	$(COMPILE.c) -o $@ $(SRC)/uts/common/os/refstr.c
199*b819cea2SGordon Ross	$(POST_PROCESS_O)
200*b819cea2SGordon Ross
201*b819cea2SGordon Rosspics/xattr_common.o:	   $(SRC)/common/xattr/xattr_common.c
202*b819cea2SGordon Ross	$(COMPILE.c) -o $@ $(SRC)/common/xattr/xattr_common.c
203*b819cea2SGordon Ross	$(POST_PROCESS_O)
204*b819cea2SGordon Ross
205*b819cea2SGordon Ross# Makefile.targ has rule for $(SRC)/common/smbsrv/%.c
206*b819cea2SGordon Ross
207*b819cea2SGordon Ross.KEEP_STATE:
208*b819cea2SGordon Ross
209*b819cea2SGordon Rossinclude ../../Makefile.targ
210*b819cea2SGordon Rossinclude ../../../Makefile.targ
211