xref: /titanic_50/usr/src/cmd/smbsrv/smbd/Makefile (revision 1c5bc425cc346c6844d58e1fdd8794e9553dd289)
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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23# Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
24#
25
26
27PROG=	smbd
28SRCS=				\
29	smbd_doorsvc.c		\
30	smbd_join.c		\
31	smbd_logon.c		\
32	smbd_main.c		\
33	smbd_nicmon.c		\
34	smbd_opipe_doorsvc.c	\
35	smbd_share_doorsvc.c	\
36	smbd_spool.c		\
37	smbd_vss.c
38
39include ../../Makefile.cmd
40
41MANIFEST=	server.xml
42SVCMETHOD=	svc-smbd
43LOGDLL=		eventlog.dll
44
45ROOTMANIFESTDIR	= $(ROOTSVCSMB)
46ROOTVARSMBDLLDIR = $(ROOTVARSMB)/cvol/windows/system32
47ROOTVARSMBDLL= $(LOGDLL:%=$(ROOTVARSMBDLLDIR)/%)
48
49$(ROOTMANIFEST):= FILEMODE = 0444
50$(ROOTSVCMETHOD):= FILEMODE = 0555
51$(ROOTVARSMBDLL):= FILEMODE = 0755
52
53include ../Makefile.smbsrv.defs
54
55LDLIBS += -L$(ROOT)/usr/lib/smbsrv -lmlsvc -lmlrpc -lsmbns -lsmb \
56	-lzfs -lbsm -lsocket -lnsl -lscf -lumem -lcmdutils
57LDFLAGS += -R/usr/lib/smbsrv
58
59$(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
60
61ROOTSMBDDIR = $(ROOTLIB)/smbsrv
62ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
63
64FILEMODE = 0444
65$(ROOTSMBDFILE):= FILEMODE = 0555
66
67$(ROOTSMBDDIR)/%: %
68	$(INS.file)
69
70$(ROOTVARSMBDLLDIR)/%: %
71	$(INS.file)
72
73all:		$(PROG)
74
75clean:
76	$(RM) $(OBJS)
77
78lint:		lint_SRCS
79
80$(PROG):	$(OBJS)
81	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
82	$(POST_PROCESS)
83
84check:		$(CHKMANIFEST)
85
86_msg:
87
88include ../../Makefile.targ
89
90install: all .WAIT $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST) \
91		$(ROOTSMBDFILE) ${ROOTSVCMETHOD} $(ROOTVARSMBDLL)
92