17206bf49SGordon Ross# 27206bf49SGordon Ross# CDDL HEADER START 37206bf49SGordon Ross# 47206bf49SGordon Ross# The contents of this file are subject to the terms of the 57206bf49SGordon Ross# Common Development and Distribution License (the "License"). 67206bf49SGordon Ross# You may not use this file except in compliance with the License. 77206bf49SGordon Ross# 87206bf49SGordon Ross# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97206bf49SGordon Ross# or http://www.opensolaris.org/os/licensing. 107206bf49SGordon Ross# See the License for the specific language governing permissions 117206bf49SGordon Ross# and limitations under the License. 127206bf49SGordon Ross# 137206bf49SGordon Ross# When distributing Covered Code, include this CDDL HEADER in each 147206bf49SGordon Ross# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157206bf49SGordon Ross# If applicable, add the following below this CDDL HEADER, with the 167206bf49SGordon Ross# fields enclosed by brackets "[]" replaced with your own identifying 177206bf49SGordon Ross# information: Portions Copyright [yyyy] [name of copyright owner] 187206bf49SGordon Ross# 197206bf49SGordon Ross# CDDL HEADER END 207206bf49SGordon Ross# 217206bf49SGordon Ross# 227206bf49SGordon Ross# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 237206bf49SGordon Ross# Copyright 2014 Nexenta Systems, Inc. All rights reserved. 247206bf49SGordon Ross# 257206bf49SGordon Ross 267206bf49SGordon Ross 277206bf49SGordon RossPROG= fksmbd 287206bf49SGordon RossOBJS_SMBD= \ 297206bf49SGordon Ross smbd_doorsvc.o \ 307206bf49SGordon Ross smbd_join.o \ 317206bf49SGordon Ross smbd_logon.o \ 327206bf49SGordon Ross smbd_main.o \ 337206bf49SGordon Ross smbd_nicmon.o \ 34*cf115f36SGordon Ross smbd_pipesvc.o \ 357206bf49SGordon Ross smbd_share_doorsvc.o \ 367206bf49SGordon Ross smbd_spool.o \ 377206bf49SGordon Ross smbd_vss.o \ 387206bf49SGordon Ross 397206bf49SGordon Ross 407206bf49SGordon RossOBJS_LOCAL = \ 417206bf49SGordon Ross fksmbd_door.o \ 427206bf49SGordon Ross fksmbd_kmod.o \ 437206bf49SGordon Ross fksmbd_ksock.o \ 447206bf49SGordon Ross fksmbd_log.o \ 457206bf49SGordon Ross fksmbd_shr.o 467206bf49SGordon Ross 477206bf49SGordon RossOBJS= ${OBJS_SMBD} ${OBJS_LOCAL} 487206bf49SGordon RossSRCS= ${OBJS_SMBD:%.o=../smbd/%.c} \ 497206bf49SGordon Ross ${OBJS_LOCAL:.o=.c} 507206bf49SGordon Ross 517206bf49SGordon Rossinclude ../../Makefile.cmd 527206bf49SGordon Rossinclude ../../Makefile.ctf 537206bf49SGordon Ross 547206bf49SGordon Ross# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc. 557206bf49SGordon RossCPPFLAGS.first += -I../../../lib/smbsrv/libfksmbsrv/common 567206bf49SGordon Ross 577206bf49SGordon RossINCS += -I../smbd 587206bf49SGordon RossINCS += -I../../../uts/common 597206bf49SGordon RossINCS += -I../../../uts/common/smbsrv 607206bf49SGordon RossINCS += -I../../../common/smbsrv 617206bf49SGordon Ross 627206bf49SGordon RossC99MODE= -xc99=%all 637206bf49SGordon RossC99LMODE= -Xc99=%all 647206bf49SGordon Ross 657206bf49SGordon RossCFLAGS += $(CCVERBOSE) 667206bf49SGordon RossCFLAGS64 += $(CCVERBOSE) 677206bf49SGordon RossCPPFLAGS += -D_REENTRANT 687206bf49SGordon RossCPPFLAGS += -Dsyslog=smb_syslog 697206bf49SGordon RossCPPFLAGS += -D_LARGEFILE64_SOURCE=1 707206bf49SGordon RossCPPFLAGS += -DFKSMBD 717206bf49SGordon Ross# Always debug here 727206bf49SGordon RossCPPFLAGS += -DDEBUG 737206bf49SGordon RossCPPFLAGS += $(INCS) 747206bf49SGordon Ross 757206bf49SGordon RossLDFLAGS += $(ZNOLAZYLOAD) 767206bf49SGordon RossLDFLAGS += -R/usr/lib/smbsrv 777206bf49SGordon RossLDLIBS += -L$(ROOT)/usr/lib/smbsrv 787206bf49SGordon RossLDLIBS += -lfksmbsrv -lfakekernel 797206bf49SGordon RossLDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb 807206bf49SGordon RossLDLIBS += -lzfs -lcmdutils -lbsm -lsocket -lnsl -lscf -lumem 817206bf49SGordon Ross 827206bf49SGordon RossLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 837206bf49SGordon RossLINTFLAGS += -xerroff=E_INCONS_ARG_DECL2 847206bf49SGordon RossLINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2 857206bf49SGordon Ross 867206bf49SGordon RossROOTSMBDDIR = $(ROOTLIB)/smbsrv 877206bf49SGordon RossROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%) 887206bf49SGordon Ross 897206bf49SGordon Ross.KEEP_STATE: 907206bf49SGordon Ross 917206bf49SGordon Rossall: $(PROG) 927206bf49SGordon Ross 937206bf49SGordon Ross$(PROG): $(OBJS) 947206bf49SGordon Ross $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 957206bf49SGordon Ross $(POST_PROCESS) 967206bf49SGordon Ross 977206bf49SGordon Rossclean: 987206bf49SGordon Ross -$(RM) $(OBJS) 997206bf49SGordon Ross 1007206bf49SGordon Rosslint: lint_SRCS 1017206bf49SGordon Ross 1027206bf49SGordon Rossinclude ../../Makefile.targ 1037206bf49SGordon Ross 1047206bf49SGordon Rossinstall: all $(ROOTSMBDFILE) 1057206bf49SGordon Ross 1067206bf49SGordon Ross%.o: ../smbd/%.c 1077206bf49SGordon Ross $(COMPILE.c) $< 1087206bf49SGordon Ross $(POST_PROCESS_O) 1097206bf49SGordon Ross 1107206bf49SGordon Ross$(ROOTSMBDDIR)/%: % 1117206bf49SGordon Ross $(INS.file) 112