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# 27 28LIBRARY = libfksmbfs.a 29VERS = .1 30 31OBJS_LOCAL = \ 32 fksmbfs_rwlock.o \ 33 fake_fssub.o \ 34 fake_getdents.o \ 35 fake_lookup.o \ 36 fake_misc.o \ 37 fake_modconf.o \ 38 fake_nbmlock.o \ 39 fake_open.o \ 40 fake_rename.o \ 41 fake_rw.o \ 42 fake_stat.o \ 43 fake_unlink.o \ 44 fake_vfs.o \ 45 fake_vnode.o \ 46 fake_zone.o 47 48# See also: $SRC/uts/common/Makefile.files 49# NB: Intentionally ommitted, compared w/ the above: 50# smbfs_rwlock.o 51# 52OBJS_FS_SMBFS = \ 53 smbfs_vfsops.o \ 54 smbfs_vnops.o \ 55 smbfs_client.o \ 56 smbfs_node.o \ 57 smbfs_smb.o \ 58 smbfs_smb1.o \ 59 smbfs_smb2.o \ 60 smbfs_subr.o \ 61 smbfs_subr2.o \ 62 smbfs_acl.o \ 63 smbfs_xattr.o 64 65OBJS_CMN_SMBFS = \ 66 smbfs_ntacl.o 67 68OBJS_MISC = \ 69 acl_common.o \ 70 pathname.o \ 71 refstr.o 72 73OBJECTS = \ 74 $(OBJS_LOCAL) \ 75 $(OBJS_FS_SMBFS) \ 76 $(OBJS_CMN_SMBFS) \ 77 $(OBJS_MISC) 78 79include ../../../Makefile.lib 80include ../../Makefile.lib 81 82# Force SOURCEDEBUG 83CSOURCEDEBUGFLAGS = -g 84CCSOURCEDEBUGFLAGS = -g 85STRIP_STABS = : 86 87# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc. 88# Also, like Makefile.uts, reset CPPFLAGS 89CPPFLAGS.first += -I../../../libfakekernel/common 90CPPFLAGS.first += -I../../libfknsmb/common 91CPPFLAGS.first += -I../common 92CPPFLAGS= $(CPPFLAGS.first) 93 94INCS += -I$(SRC)/uts/common/fs/smbclnt 95INCS += -I$(SRC)/uts/common 96INCS += -I$(SRC)/common/smbclnt 97INCS += -I$(SRC)/common 98 99CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL 100CPPFLAGS += -D_FILE_OFFSET_BITS=64 101# Always want DEBUG here 102CPPFLAGS += -DDEBUG 103 104CERRWARN += -_gcc=-Wno-switch 105CERRWARN += -_gcc=-Wno-parentheses 106 107LDLIBS += $(MACH_LDLIBS) 108LDLIBS += -lfknsmb -lfakekernel -lidmap -lcmdutils -lavl -lc 109 110FS_SMBFS_DIR=$(SRC)/uts/common/fs/smbclnt/smbfs 111CMN_SMBFS_DIR=$(SRC)/common/smbclnt 112SRCS= $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \ 113 $(OBJS_FS_SMBFS:%.o=$(FS_SMBFS_DIR)/%.c) \ 114 $(OBJS_CMN_SMBFS:%.o=$(CMN_SMBFS_DIR)/%.c) 115 116all: 117 118pics/%.o: $(FS_SMBFS_DIR)/%.c 119 $(COMPILE.c) -o $@ $< 120 $(POST_PROCESS_O) 121 122# pathname.o 123pics/%.o: $(SRC)/uts/common/fs/%.c 124 $(COMPILE.c) -o $@ $< 125 $(POST_PROCESS_O) 126 127# refstr.o 128pics/%.o: $(SRC)/uts/common/os/%.c 129 $(COMPILE.c) -o $@ $< 130 $(POST_PROCESS_O) 131 132pics/acl_common.o: $(SRC)/common/acl/acl_common.c 133 $(COMPILE.c) -o $@ $(SRC)/common/acl/acl_common.c 134 $(POST_PROCESS_O) 135 136.KEEP_STATE: 137 138include ../../Makefile.targ 139include ../../../Makefile.targ 140