xref: /titanic_44/usr/src/cmd/smbsrv/fksmbd/Makefile (revision 68b2bbf26c7040fea4281dcb58b81e7627e46f34)
1b819cea2SGordon Ross#
2b819cea2SGordon Ross# CDDL HEADER START
3b819cea2SGordon Ross#
4b819cea2SGordon Ross# The contents of this file are subject to the terms of the
5b819cea2SGordon Ross# Common Development and Distribution License (the "License").
6b819cea2SGordon Ross# You may not use this file except in compliance with the License.
7b819cea2SGordon Ross#
8b819cea2SGordon Ross# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9b819cea2SGordon Ross# or http://www.opensolaris.org/os/licensing.
10b819cea2SGordon Ross# See the License for the specific language governing permissions
11b819cea2SGordon Ross# and limitations under the License.
12b819cea2SGordon Ross#
13b819cea2SGordon Ross# When distributing Covered Code, include this CDDL HEADER in each
14b819cea2SGordon Ross# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15b819cea2SGordon Ross# If applicable, add the following below this CDDL HEADER, with the
16b819cea2SGordon Ross# fields enclosed by brackets "[]" replaced with your own identifying
17b819cea2SGordon Ross# information: Portions Copyright [yyyy] [name of copyright owner]
18b819cea2SGordon Ross#
19b819cea2SGordon Ross# CDDL HEADER END
20b819cea2SGordon Ross#
21b819cea2SGordon Ross#
22b819cea2SGordon Ross# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23b819cea2SGordon Ross# Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
24b819cea2SGordon Ross#
25b819cea2SGordon Ross
26b819cea2SGordon Ross
27b819cea2SGordon RossPROG=	fksmbd
28b819cea2SGordon RossOBJS_SMBD=			\
29b819cea2SGordon Ross	smbd_doorsvc.o		\
30b819cea2SGordon Ross	smbd_join.o		\
31b819cea2SGordon Ross	smbd_logon.o		\
32b819cea2SGordon Ross	smbd_main.o		\
33b819cea2SGordon Ross	smbd_nicmon.o		\
34*68b2bbf2SGordon Ross	smbd_pipesvc.o		\
35b819cea2SGordon Ross	smbd_share_doorsvc.o	\
36b819cea2SGordon Ross	smbd_spool.o		\
37b819cea2SGordon Ross	smbd_vss.o		\
38b819cea2SGordon Ross
39b819cea2SGordon Ross
40b819cea2SGordon RossOBJS_LOCAL =			\
41b819cea2SGordon Ross	fksmbd_door.o		\
42b819cea2SGordon Ross	fksmbd_kmod.o		\
43b819cea2SGordon Ross	fksmbd_ksock.o		\
44b819cea2SGordon Ross	fksmbd_log.o		\
45b819cea2SGordon Ross	fksmbd_shr.o
46b819cea2SGordon Ross
47b819cea2SGordon RossOBJS=	${OBJS_SMBD} ${OBJS_LOCAL}
48b819cea2SGordon RossSRCS=	${OBJS_SMBD:%.o=../smbd/%.c} \
49b819cea2SGordon Ross	${OBJS_LOCAL:.o=.c}
50b819cea2SGordon Ross
51b819cea2SGordon Rossinclude ../../Makefile.cmd
52b819cea2SGordon Rossinclude ../../Makefile.ctf
53b819cea2SGordon Ross
54b819cea2SGordon Ross# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
55b819cea2SGordon RossCPPFLAGS.first += -I../../../lib/smbsrv/libfksmbsrv/common
56b819cea2SGordon Ross
57b819cea2SGordon RossINCS += -I../smbd
58b819cea2SGordon RossINCS +=	-I../../../uts/common
59b819cea2SGordon RossINCS +=	-I../../../uts/common/smbsrv
60b819cea2SGordon RossINCS +=	-I../../../common/smbsrv
61b819cea2SGordon Ross
62b819cea2SGordon RossC99MODE=	-xc99=%all
63b819cea2SGordon RossC99LMODE=	-Xc99=%all
64b819cea2SGordon Ross
65b819cea2SGordon RossCFLAGS += $(CCVERBOSE)
66b819cea2SGordon RossCFLAGS64 += $(CCVERBOSE)
67b819cea2SGordon RossCPPFLAGS += -D_REENTRANT
68b819cea2SGordon RossCPPFLAGS += -Dsyslog=smb_syslog
69b819cea2SGordon RossCPPFLAGS += -D_LARGEFILE64_SOURCE=1
70b819cea2SGordon RossCPPFLAGS += -DFKSMBD
71b819cea2SGordon Ross# Always debug here
72b819cea2SGordon RossCPPFLAGS += -DDEBUG
73b819cea2SGordon RossCPPFLAGS += $(INCS)
74b819cea2SGordon Ross
75b819cea2SGordon RossLDFLAGS += $(ZNOLAZYLOAD)
76b819cea2SGordon RossLDFLAGS += -R/usr/lib/smbsrv
77b819cea2SGordon RossLDLIBS += -L$(ROOT)/usr/lib/smbsrv
78b819cea2SGordon RossLDLIBS += -lfksmbsrv -lfakekernel
79b819cea2SGordon RossLDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb
80b819cea2SGordon RossLDLIBS += -lzfs -lcmdutils -lbsm -lsocket -lnsl -lscf -lumem
81b819cea2SGordon Ross
82b819cea2SGordon RossLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
83b819cea2SGordon RossLINTFLAGS += -xerroff=E_INCONS_ARG_DECL2
84b819cea2SGordon RossLINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2
85b819cea2SGordon Ross
86b819cea2SGordon RossROOTSMBDDIR = $(ROOTLIB)/smbsrv
87b819cea2SGordon RossROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
88b819cea2SGordon Ross
89b819cea2SGordon Ross.KEEP_STATE:
90b819cea2SGordon Ross
91b819cea2SGordon Rossall: $(PROG)
92b819cea2SGordon Ross
93b819cea2SGordon Ross$(PROG): $(OBJS)
94b819cea2SGordon Ross	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
95b819cea2SGordon Ross	$(POST_PROCESS)
96b819cea2SGordon Ross
97b819cea2SGordon Rossclean:
98b819cea2SGordon Ross	-$(RM) $(OBJS)
99b819cea2SGordon Ross
100b819cea2SGordon Rosslint:	lint_SRCS
101b819cea2SGordon Ross
102b819cea2SGordon Rossinclude ../../Makefile.targ
103b819cea2SGordon Ross
104b819cea2SGordon Rossinstall: all $(ROOTSMBDFILE)
105b819cea2SGordon Ross
106b819cea2SGordon Ross%.o: ../smbd/%.c
107b819cea2SGordon Ross	$(COMPILE.c) $<
108b819cea2SGordon Ross	$(POST_PROCESS_O)
109b819cea2SGordon Ross
110b819cea2SGordon Ross$(ROOTSMBDDIR)/%: %
111b819cea2SGordon Ross	$(INS.file)
112