1*b819cea2SGordon Ross# 2*b819cea2SGordon Ross# CDDL HEADER START 3*b819cea2SGordon Ross# 4*b819cea2SGordon Ross# The contents of this file are subject to the terms of the 5*b819cea2SGordon Ross# Common Development and Distribution License (the "License"). 6*b819cea2SGordon Ross# You may not use this file except in compliance with the License. 7*b819cea2SGordon Ross# 8*b819cea2SGordon Ross# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*b819cea2SGordon Ross# or http://www.opensolaris.org/os/licensing. 10*b819cea2SGordon Ross# See the License for the specific language governing permissions 11*b819cea2SGordon Ross# and limitations under the License. 12*b819cea2SGordon Ross# 13*b819cea2SGordon Ross# When distributing Covered Code, include this CDDL HEADER in each 14*b819cea2SGordon Ross# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*b819cea2SGordon Ross# If applicable, add the following below this CDDL HEADER, with the 16*b819cea2SGordon Ross# fields enclosed by brackets "[]" replaced with your own identifying 17*b819cea2SGordon Ross# information: Portions Copyright [yyyy] [name of copyright owner] 18*b819cea2SGordon Ross# 19*b819cea2SGordon Ross# CDDL HEADER END 20*b819cea2SGordon Ross# 21*b819cea2SGordon Ross# 22*b819cea2SGordon Ross# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 23*b819cea2SGordon Ross# Copyright 2014 Nexenta Systems, Inc. All rights reserved. 24*b819cea2SGordon Ross# 25*b819cea2SGordon Ross 26*b819cea2SGordon Ross 27*b819cea2SGordon RossPROG= fksmbd 28*b819cea2SGordon RossOBJS_SMBD= \ 29*b819cea2SGordon Ross smbd_doorsvc.o \ 30*b819cea2SGordon Ross smbd_join.o \ 31*b819cea2SGordon Ross smbd_logon.o \ 32*b819cea2SGordon Ross smbd_main.o \ 33*b819cea2SGordon Ross smbd_nicmon.o \ 34*b819cea2SGordon Ross smbd_opipe_doorsvc.o \ 35*b819cea2SGordon Ross smbd_share_doorsvc.o \ 36*b819cea2SGordon Ross smbd_spool.o \ 37*b819cea2SGordon Ross smbd_vss.o \ 38*b819cea2SGordon Ross 39*b819cea2SGordon Ross 40*b819cea2SGordon RossOBJS_LOCAL = \ 41*b819cea2SGordon Ross fksmbd_door.o \ 42*b819cea2SGordon Ross fksmbd_kmod.o \ 43*b819cea2SGordon Ross fksmbd_ksock.o \ 44*b819cea2SGordon Ross fksmbd_opipe.o \ 45*b819cea2SGordon Ross fksmbd_log.o \ 46*b819cea2SGordon Ross fksmbd_shr.o 47*b819cea2SGordon Ross 48*b819cea2SGordon RossOBJS= ${OBJS_SMBD} ${OBJS_LOCAL} 49*b819cea2SGordon RossSRCS= ${OBJS_SMBD:%.o=../smbd/%.c} \ 50*b819cea2SGordon Ross ${OBJS_LOCAL:.o=.c} 51*b819cea2SGordon Ross 52*b819cea2SGordon Rossinclude ../../Makefile.cmd 53*b819cea2SGordon Rossinclude ../../Makefile.ctf 54*b819cea2SGordon Ross 55*b819cea2SGordon Ross# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc. 56*b819cea2SGordon RossCPPFLAGS.first += -I../../../lib/smbsrv/libfksmbsrv/common 57*b819cea2SGordon Ross 58*b819cea2SGordon RossINCS += -I../smbd 59*b819cea2SGordon RossINCS += -I../../../uts/common 60*b819cea2SGordon RossINCS += -I../../../uts/common/smbsrv 61*b819cea2SGordon RossINCS += -I../../../common/smbsrv 62*b819cea2SGordon Ross 63*b819cea2SGordon RossC99MODE= -xc99=%all 64*b819cea2SGordon RossC99LMODE= -Xc99=%all 65*b819cea2SGordon Ross 66*b819cea2SGordon RossCFLAGS += $(CCVERBOSE) 67*b819cea2SGordon RossCFLAGS64 += $(CCVERBOSE) 68*b819cea2SGordon RossCPPFLAGS += -D_REENTRANT 69*b819cea2SGordon RossCPPFLAGS += -Dsyslog=smb_syslog 70*b819cea2SGordon RossCPPFLAGS += -D_LARGEFILE64_SOURCE=1 71*b819cea2SGordon RossCPPFLAGS += -DFKSMBD 72*b819cea2SGordon Ross# Always debug here 73*b819cea2SGordon RossCPPFLAGS += -DDEBUG 74*b819cea2SGordon RossCPPFLAGS += $(INCS) 75*b819cea2SGordon Ross 76*b819cea2SGordon RossLDFLAGS += $(ZNOLAZYLOAD) 77*b819cea2SGordon RossLDFLAGS += -R/usr/lib/smbsrv 78*b819cea2SGordon RossLDLIBS += -L$(ROOT)/usr/lib/smbsrv 79*b819cea2SGordon RossLDLIBS += -lfksmbsrv -lfakekernel 80*b819cea2SGordon RossLDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb 81*b819cea2SGordon RossLDLIBS += -lzfs -lcmdutils -lbsm -lsocket -lnsl -lscf -lumem 82*b819cea2SGordon Ross 83*b819cea2SGordon RossLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 84*b819cea2SGordon RossLINTFLAGS += -xerroff=E_INCONS_ARG_DECL2 85*b819cea2SGordon RossLINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2 86*b819cea2SGordon Ross 87*b819cea2SGordon RossROOTSMBDDIR = $(ROOTLIB)/smbsrv 88*b819cea2SGordon RossROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%) 89*b819cea2SGordon Ross 90*b819cea2SGordon Ross.KEEP_STATE: 91*b819cea2SGordon Ross 92*b819cea2SGordon Rossall: $(PROG) 93*b819cea2SGordon Ross 94*b819cea2SGordon Ross$(PROG): $(OBJS) 95*b819cea2SGordon Ross $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 96*b819cea2SGordon Ross $(POST_PROCESS) 97*b819cea2SGordon Ross 98*b819cea2SGordon Rossclean: 99*b819cea2SGordon Ross -$(RM) $(OBJS) 100*b819cea2SGordon Ross 101*b819cea2SGordon Rosslint: lint_SRCS 102*b819cea2SGordon Ross 103*b819cea2SGordon Rossinclude ../../Makefile.targ 104*b819cea2SGordon Ross 105*b819cea2SGordon Rossinstall: all $(ROOTSMBDFILE) 106*b819cea2SGordon Ross 107*b819cea2SGordon Ross%.o: ../smbd/%.c 108*b819cea2SGordon Ross $(COMPILE.c) $< 109*b819cea2SGordon Ross $(POST_PROCESS_O) 110*b819cea2SGordon Ross 111*b819cea2SGordon Ross$(ROOTSMBDDIR)/%: % 112*b819cea2SGordon Ross $(INS.file) 113