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