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