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 2008 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# Copyright 2018 Nexenta Systems, Inc. All rights reserved. 26# Copyright 2019, Joyent, Inc. 27# Copyright 2024-2025 RackTop Systems, Inc. 28# 29 30LIBRARY = libfknsmb.a 31VERS = .1 32 33OBJS_LOCAL = \ 34 fksmb_crypt_pkcs.o \ 35 fksmb_sign_pkcs.o \ 36 fake_ddi.o \ 37 fake_fio.o \ 38 fake_kmem.o \ 39 fake_ktli.o \ 40 fake_pkey.o \ 41 fake_policy.o \ 42 fake_sdt.o \ 43 fake_softc.o \ 44 fake_stream.o \ 45 fake_strsubr.o 46 47# See also: $SRC/uts/common/Makefile.files 48# NB: Intentionally ommitted, compared w/ the above: 49# smb_dev.o smb_pass.o nsmb_*_kcf.o 50# 51OBJS_NSMB = \ 52 nsmb_kdf.o \ 53 nsmb_preauth.o \ 54 smb_dev.o \ 55 smb_conn.o \ 56 smb_iod.o \ 57 smb_rq.o \ 58 smb_sign.o \ 59 smb_smb.o \ 60 smb_subrs.o \ 61 smb_time.o \ 62 smb_tran.o \ 63 smb_trantcp.o \ 64 smb_usr.o \ 65 smb2_rq.o \ 66 smb2_sign.o \ 67 smb2_smb.o \ 68 smb3_crypt.o \ 69 smb3_negctx.o \ 70 subr_mchain.o 71 72OBJECTS = \ 73 $(OBJS_LOCAL) \ 74 $(OBJS_NSMB) 75 76include ../../../Makefile.lib 77include ../../Makefile.lib 78 79# Force SOURCEDEBUG 80CSOURCEDEBUGFLAGS = -g 81CCSOURCEDEBUGFLAGS = -g 82STRIP_STABS = : 83 84# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc. 85# Also, like Makefile.uts, reset CPPFLAGS 86CPPFLAGS.first += -I../../../libfakekernel/common 87CPPFLAGS.first += -I../common 88CPPFLAGS= $(CPPFLAGS.first) 89 90INCS += -I$(SRC)/uts/common/fs/smbclnt 91INCS += -I$(SRC)/uts/common 92 93CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL 94CPPFLAGS += -D_FILE_OFFSET_BITS=64 95# Always want DEBUG here 96CPPFLAGS += -DDEBUG 97 98CERRWARN += -_gcc=-Wno-switch 99 100# needs work 101SMOFF += all_func_returns,deref_check,signed 102 103LDLIBS += $(MACH_LDLIBS) 104LDLIBS += -lfakekernel -lpkcs11 -lnsl -lumem -lc 105 106# libfknsmb isn't delivered, and is a special case, disable global data complaints 107ZGUIDANCE= -Wl,-zguidance=noasserts 108 109NSMB_DIR=$(SRC)/uts/common/fs/smbclnt/netsmb 110SRCS= $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \ 111 $(OBJS_NSMB:%.o=$(NSMB_DIR)/%.c) 112 113all: 114 115pics/%.o: $(NSMB_DIR)/%.c 116 $(COMPILE.c) -o $@ $< 117 $(POST_PROCESS_O) 118 119.KEEP_STATE: 120 121include ../../Makefile.targ 122include ../../../Makefile.targ 123