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