Makefile revision b3700b074e637f8c6991b70754c88a2cfffb246b
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright 2014 Nexenta Systems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePROG= smbd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteOBJS= \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_authsvc.o \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_doorsvc.o \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_join.o \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_krb5lookup.o \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_krb5ssp.o \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_logon.o \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_main.o \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_nicmon.o \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte smbd_ntlmssp.o \
smbd_pipesvc.o \
smbd_share_doorsvc.o \
smbd_spool.o \
smbd_syslog.o \
smbd_vss.o
SRCS= $(OBJS:%.o=%.c)
include ../../Makefile.cmd
MANIFEST= server.xml
SVCMETHOD= svc-smbd
LOGDLL= eventlog.dll
ROOTMANIFESTDIR = $(ROOTSVCSMB)
ROOTVARSMBDLLDIR = $(ROOTVARSMB)/cvol/windows/system32
ROOTVARSMBDLL= $(LOGDLL:%=$(ROOTVARSMBDLLDIR)/%)
$(ROOTMANIFEST):= FILEMODE = 0444
$(ROOTSVCMETHOD):= FILEMODE = 0555
$(ROOTVARSMBDLL):= FILEMODE = 0755
LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT
CPPFLAGS += -Dsyslog=smb_syslog
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
# Should not have to do this, but the Kerberos includes are a mess.
CPPFLAGS += -I $(ROOT)/usr/include/kerberosv5
C99MODE = -xc99=%all
C99LMODE = -Xc99=%all
LDFLAGS += -R/usr/lib/smbsrv
LDLIBS += -L$(ROOT)/usr/lib/smbsrv
# prefer to keep libs ordered by dependence
LDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb -lsmbfs -lgss
LDLIBS += -lzfs -lbsm -lscf -lcmdutils -lsocket -lnsl -lumem
$(PROG) := LDLIBS += -lkrb5
$(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
ROOTSMBDDIR = $(ROOTLIB)/smbsrv
ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
FILEMODE = 0444
$(ROOTSMBDFILE):= FILEMODE = 0555
$(ROOTSMBDDIR)/%: %
$(INS.file)
$(ROOTVARSMBDLLDIR)/%: %
$(INS.file)
all: $(PROG)
clean:
$(RM) $(OBJS)
lint: lint_SRCS
$(PROG): $(OBJS)
$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
$(POST_PROCESS)
check: $(CHKMANIFEST)
_msg:
include ../../Makefile.targ
install: all .WAIT $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST) \
$(ROOTSMBDFILE) ${ROOTSVCMETHOD} $(ROOTVARSMBDLL)
.KEEP_STATE: