xref: /illumos-gate/usr/src/lib/smbclnt/libfksmbfs/Makefile.com (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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
30LIBRARY =	libfksmbfs.a
31VERS =		.1
32
33OBJS_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#
54OBJS_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
67OBJS_CMN_SMBFS = \
68	smbfs_ntacl.o
69
70OBJS_MISC = \
71	acl_common.o \
72	pathname.o \
73	refstr.o
74
75OBJECTS = \
76	$(OBJS_LOCAL) \
77	$(OBJS_FS_SMBFS) \
78	$(OBJS_CMN_SMBFS) \
79	$(OBJS_MISC)
80
81include ../../../Makefile.lib
82include ../../Makefile.lib
83
84# Force SOURCEDEBUG
85CSOURCEDEBUGFLAGS	= -g
86CCSOURCEDEBUGFLAGS	= -g
87STRIP_STABS	= :
88
89# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
90# Also, like Makefile.uts, reset CPPFLAGS
91CPPFLAGS.first += -I../../../libfakekernel/common
92CPPFLAGS.first += -I../../libfknsmb/common
93CPPFLAGS.first += -I../common
94CPPFLAGS= $(CPPFLAGS.first)
95
96INCS += -I$(SRC)/uts/common/fs/smbclnt
97INCS += -I$(SRC)/uts/common
98INCS += -I$(SRC)/common/smbclnt
99INCS += -I$(SRC)/common
100
101CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
102CPPFLAGS += -D_FILE_OFFSET_BITS=64
103# Always want DEBUG here
104CPPFLAGS += -DDEBUG
105
106CERRWARN += -_gcc=-Wno-switch
107CERRWARN += -_gcc=-Wno-parentheses
108
109# needs work
110SMOFF += all_func_returns,deref_check,signed,or_vs_and
111
112LDLIBS +=	$(MACH_LDLIBS)
113LDLIBS +=	-lfknsmb -lfakekernel -lidmap -lcmdutils -lavl -lc
114
115FS_SMBFS_DIR=$(SRC)/uts/common/fs/smbclnt/smbfs
116CMN_SMBFS_DIR=$(SRC)/common/smbclnt
117SRCS=   $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \
118	$(OBJS_FS_SMBFS:%.o=$(FS_SMBFS_DIR)/%.c) \
119	$(OBJS_CMN_SMBFS:%.o=$(CMN_SMBFS_DIR)/%.c)
120
121all:
122
123pics/%.o:	$(FS_SMBFS_DIR)/%.c
124	$(COMPILE.c) -o $@ $<
125	$(POST_PROCESS_O)
126
127# pathname.o
128pics/%.o:	$(SRC)/uts/common/fs/%.c
129	$(COMPILE.c) -o $@ $<
130	$(POST_PROCESS_O)
131
132# refstr.o
133pics/%.o:	$(SRC)/uts/common/os/%.c
134	$(COMPILE.c) -o $@ $<
135	$(POST_PROCESS_O)
136
137pics/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
143include ../../Makefile.targ
144include ../../../Makefile.targ
145