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# Copyright (c) 2018, Joyent, Inc. 25# 26 27 28PROG= smbd 29OBJS= \ 30 smbd_authsvc.o \ 31 smbd_doorsvc.o \ 32 smbd_join.o \ 33 smbd_krb5lookup.o \ 34 smbd_krb5ssp.o \ 35 smbd_logon.o \ 36 smbd_main.o \ 37 smbd_nicmon.o \ 38 smbd_ntlmssp.o \ 39 smbd_pipesvc.o \ 40 smbd_share_doorsvc.o \ 41 smbd_spool.o \ 42 smbd_syslog.o \ 43 smbd_vss.o 44 45SRCS= $(OBJS:%.o=%.c) 46 47include ../../Makefile.cmd 48 49MANIFEST= server.xml 50SVCMETHOD= svc-smbd 51LOGDLL= eventlog.dll 52 53ROOTMANIFESTDIR = $(ROOTSVCSMB) 54ROOTVARSMBDLLDIR = $(ROOTVARSMB)/cvol/windows/system32 55ROOTVARSMBDLL= $(LOGDLL:%=$(ROOTVARSMBDLLDIR)/%) 56 57$(ROOTMANIFEST):= FILEMODE = 0444 58$(ROOTSVCMETHOD):= FILEMODE = 0555 59$(ROOTVARSMBDLL):= FILEMODE = 0755 60 61LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 62LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2 63 64CFLAGS += $(CCVERBOSE) 65CPPFLAGS += -D_IPP_PRIVATE_STRUCTURES 66CPPFLAGS += -D_REENTRANT 67CPPFLAGS += -Dsyslog=smb_syslog 68$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 69 70# Should not have to do this, but the Kerberos includes are a mess. 71CPPFLAGS += -I $(ROOT)/usr/include/kerberosv5 72 73# needs work 74SMOFF += all_func_returns,deref_check 75 76CSTD = $(CSTD_GNU99) 77C99LMODE = -Xc99=%all 78 79LDFLAGS += -R/usr/lib/smbsrv 80LDLIBS += -L$(ROOT)/usr/lib/smbsrv 81# prefer to keep libs ordered by dependence 82LDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb -lsmbfs -lgss 83LDLIBS += -lzfs -lbsm -lscf -lcmdutils -lsocket -lnsl -lumem 84$(PROG) := LDLIBS += -lkrb5 85 86$(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS 87 88ROOTSMBDDIR = $(ROOTLIB)/smbsrv 89ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%) 90 91FILEMODE = 0444 92$(ROOTSMBDFILE):= FILEMODE = 0555 93 94$(ROOTSMBDDIR)/%: % 95 $(INS.file) 96 97$(ROOTVARSMBDLLDIR)/%: % 98 $(INS.file) 99 100all: $(PROG) 101 102clean: 103 $(RM) $(OBJS) 104 105lint: lint_SRCS 106 107$(PROG): $(OBJS) 108 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 109 $(POST_PROCESS) 110 111check: $(CHKMANIFEST) 112 113_msg: 114 115include ../../Makefile.targ 116 117install: all .WAIT $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST) \ 118 $(ROOTSMBDFILE) ${ROOTSVCMETHOD} $(ROOTVARSMBDLL) 119 120.KEEP_STATE: 121