xref: /titanic_52/usr/src/cmd/smbsrv/smbd/Makefile (revision b3700b074e637f8c6991b70754c88a2cfffb246b)
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=				\
2912b65585SGordon Ross	smbd_authsvc.o		\
30b819cea2SGordon Ross	smbd_doorsvc.o		\
31b819cea2SGordon Ross	smbd_join.o		\
32*b3700b07SGordon Ross	smbd_krb5lookup.o	\
3312b65585SGordon Ross	smbd_krb5ssp.o		\
34b819cea2SGordon Ross	smbd_logon.o		\
35b819cea2SGordon Ross	smbd_main.o		\
36b819cea2SGordon Ross	smbd_nicmon.o		\
3712b65585SGordon Ross	smbd_ntlmssp.o		\
3868b2bbf2SGordon Ross	smbd_pipesvc.o		\
39b819cea2SGordon Ross	smbd_share_doorsvc.o	\
40b819cea2SGordon Ross	smbd_spool.o		\
41b819cea2SGordon Ross	smbd_syslog.o		\
42b819cea2SGordon Ross	smbd_vss.o
43b819cea2SGordon Ross
44b819cea2SGordon RossSRCS=	$(OBJS:%.o=%.c)
45da6c28aaSamw
46da6c28aaSamwinclude ../../Makefile.cmd
47da6c28aaSamw
48da6c28aaSamwMANIFEST=	server.xml
49eb1a3463STruong NguyenSVCMETHOD=	svc-smbd
509fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United StatesLOGDLL=		eventlog.dll
51da6c28aaSamw
52da6c28aaSamwROOTMANIFESTDIR	= $(ROOTSVCSMB)
539fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United StatesROOTVARSMBDLLDIR = $(ROOTVARSMB)/cvol/windows/system32
549fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United StatesROOTVARSMBDLL= $(LOGDLL:%=$(ROOTVARSMBDLLDIR)/%)
55da6c28aaSamw
569fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States$(ROOTMANIFEST):= FILEMODE = 0444
57eb1a3463STruong Nguyen$(ROOTSVCMETHOD):= FILEMODE = 0555
589fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States$(ROOTVARSMBDLL):= FILEMODE = 0755
59eb1a3463STruong Nguyen
60b819cea2SGordon RossLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
6112b65585SGordon RossLINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
62b819cea2SGordon Ross
63b819cea2SGordon RossCFLAGS += $(CCVERBOSE)
64b819cea2SGordon RossCPPFLAGS += -D_REENTRANT
65b819cea2SGordon RossCPPFLAGS += -Dsyslog=smb_syslog
66b819cea2SGordon Ross$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
67b819cea2SGordon Ross
6812b65585SGordon Ross# Should not have to do this, but the Kerberos includes are a mess.
6912b65585SGordon RossCPPFLAGS += -I $(ROOT)/usr/include/kerberosv5
7012b65585SGordon Ross
71b819cea2SGordon RossC99MODE =       -xc99=%all
72b819cea2SGordon RossC99LMODE =      -Xc99=%all
73da6c28aaSamw
7467e3a03eSrieLDFLAGS += -R/usr/lib/smbsrv
7512b65585SGordon RossLDLIBS += -L$(ROOT)/usr/lib/smbsrv
7612b65585SGordon Ross# prefer to keep libs ordered by dependence
7712b65585SGordon RossLDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb -lsmbfs -lgss
7812b65585SGordon RossLDLIBS += -lzfs -lbsm -lscf -lcmdutils -lsocket -lnsl -lumem
7912b65585SGordon Ross$(PROG) := LDLIBS += -lkrb5
80da6c28aaSamw
8186d7016bSGordon Ross$(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
8286d7016bSGordon Ross
83da6c28aaSamwROOTSMBDDIR = $(ROOTLIB)/smbsrv
84da6c28aaSamwROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
85da6c28aaSamw
86da6c28aaSamwFILEMODE = 0444
87da6c28aaSamw$(ROOTSMBDFILE):= FILEMODE = 0555
88da6c28aaSamw
89da6c28aaSamw$(ROOTSMBDDIR)/%: %
90da6c28aaSamw	$(INS.file)
91da6c28aaSamw
929fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States$(ROOTVARSMBDLLDIR)/%: %
939fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States	$(INS.file)
949fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States
95da6c28aaSamwall:		$(PROG)
96da6c28aaSamw
97da6c28aaSamwclean:
98da6c28aaSamw	$(RM) $(OBJS)
99da6c28aaSamw
100da6c28aaSamwlint:		lint_SRCS
101da6c28aaSamw
102da6c28aaSamw$(PROG):	$(OBJS)
103da6c28aaSamw	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
104da6c28aaSamw	$(POST_PROCESS)
105da6c28aaSamw
106da6c28aaSamwcheck:		$(CHKMANIFEST)
107da6c28aaSamw
108da6c28aaSamw_msg:
109da6c28aaSamw
110da6c28aaSamwinclude ../../Makefile.targ
111da6c28aaSamw
112da6c28aaSamwinstall: all .WAIT $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST) \
1139fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States		$(ROOTSMBDFILE) ${ROOTSVCMETHOD} $(ROOTVARSMBDLL)
114*b3700b07SGordon Ross
115*b3700b07SGordon Ross.KEEP_STATE:
116