xref: /titanic_52/usr/src/cmd/smbsrv/smbd/Makefile (revision 68b2bbf26c7040fea4281dcb58b81e7627e46f34)
1da6c28aaSamw#
2da6c28aaSamw# CDDL HEADER START
3da6c28aaSamw#
4da6c28aaSamw# The contents of this file are subject to the terms of the
5da6c28aaSamw# Common Development and Distribution License (the "License").
6da6c28aaSamw# You may not use this file except in compliance with the License.
7da6c28aaSamw#
8da6c28aaSamw# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da6c28aaSamw# or http://www.opensolaris.org/os/licensing.
10da6c28aaSamw# See the License for the specific language governing permissions
11da6c28aaSamw# and limitations under the License.
12da6c28aaSamw#
13da6c28aaSamw# When distributing Covered Code, include this CDDL HEADER in each
14da6c28aaSamw# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da6c28aaSamw# If applicable, add the following below this CDDL HEADER, with the
16da6c28aaSamw# fields enclosed by brackets "[]" replaced with your own identifying
17da6c28aaSamw# information: Portions Copyright [yyyy] [name of copyright owner]
18da6c28aaSamw#
19da6c28aaSamw# CDDL HEADER END
20da6c28aaSamw#
21da6c28aaSamw#
22148c5f43SAlan Wright# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23b819cea2SGordon Ross# Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
24da6c28aaSamw#
2589dc44ceSjose borrego
26da6c28aaSamw
27da6c28aaSamwPROG=	smbd
28b819cea2SGordon RossOBJS=				\
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_syslog.o		\
38b819cea2SGordon Ross	smbd_vss.o
39b819cea2SGordon Ross
40b819cea2SGordon RossSRCS=	$(OBJS:%.o=%.c)
41da6c28aaSamw
42da6c28aaSamwinclude ../../Makefile.cmd
43da6c28aaSamw
44da6c28aaSamwMANIFEST=	server.xml
45eb1a3463STruong NguyenSVCMETHOD=	svc-smbd
469fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United StatesLOGDLL=		eventlog.dll
47da6c28aaSamw
48da6c28aaSamwROOTMANIFESTDIR	= $(ROOTSVCSMB)
499fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United StatesROOTVARSMBDLLDIR = $(ROOTVARSMB)/cvol/windows/system32
509fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United StatesROOTVARSMBDLL= $(LOGDLL:%=$(ROOTVARSMBDLLDIR)/%)
51da6c28aaSamw
529fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States$(ROOTMANIFEST):= FILEMODE = 0444
53eb1a3463STruong Nguyen$(ROOTSVCMETHOD):= FILEMODE = 0555
549fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States$(ROOTVARSMBDLL):= FILEMODE = 0755
55eb1a3463STruong Nguyen
56b819cea2SGordon RossLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
57b819cea2SGordon Ross
58b819cea2SGordon RossCFLAGS += $(CCVERBOSE)
59b819cea2SGordon RossCPPFLAGS += -D_REENTRANT
60b819cea2SGordon RossCPPFLAGS += -Dsyslog=smb_syslog
61b819cea2SGordon Ross$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
62b819cea2SGordon Ross
63b819cea2SGordon RossC99MODE =       -xc99=%all
64b819cea2SGordon RossC99LMODE =      -Xc99=%all
65da6c28aaSamw
66a0aa776eSAlan WrightLDLIBS += -L$(ROOT)/usr/lib/smbsrv -lmlsvc -lmlrpc -lsmbns -lsmb \
673c112a2bSEric Taylor	-lzfs -lbsm -lsocket -lnsl -lscf -lumem -lcmdutils
6867e3a03eSrieLDFLAGS += -R/usr/lib/smbsrv
69da6c28aaSamw
7086d7016bSGordon Ross$(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
7186d7016bSGordon Ross
72da6c28aaSamwROOTSMBDDIR = $(ROOTLIB)/smbsrv
73da6c28aaSamwROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
74da6c28aaSamw
75da6c28aaSamwFILEMODE = 0444
76da6c28aaSamw$(ROOTSMBDFILE):= FILEMODE = 0555
77da6c28aaSamw
78da6c28aaSamw$(ROOTSMBDDIR)/%: %
79da6c28aaSamw	$(INS.file)
80da6c28aaSamw
819fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States$(ROOTVARSMBDLLDIR)/%: %
829fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States	$(INS.file)
839fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States
84da6c28aaSamwall:		$(PROG)
85da6c28aaSamw
86da6c28aaSamwclean:
87da6c28aaSamw	$(RM) $(OBJS)
88da6c28aaSamw
89da6c28aaSamwlint:		lint_SRCS
90da6c28aaSamw
91da6c28aaSamw$(PROG):	$(OBJS)
92da6c28aaSamw	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
93da6c28aaSamw	$(POST_PROCESS)
94da6c28aaSamw
95da6c28aaSamwcheck:		$(CHKMANIFEST)
96da6c28aaSamw
97da6c28aaSamw_msg:
98da6c28aaSamw
99da6c28aaSamwinclude ../../Makefile.targ
100da6c28aaSamw
101da6c28aaSamwinstall: all .WAIT $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST) \
1029fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States		$(ROOTSMBDFILE) ${ROOTSVCMETHOD} $(ROOTVARSMBDLL)
103