xref: /illumos-gate/usr/src/lib/smbclnt/libfknsmb/Makefile.com (revision c938dc67d93d6388d698ee0d599fb7fce2963f92)
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 =	libfknsmb.a
31VERS =		.1
32
33OBJS_LOCAL = \
34	fksmb_sign_pkcs.o \
35	fake_ddi.o \
36	fake_fio.o \
37	fake_kmem.o \
38	fake_ktli.o \
39	fake_pkey.o \
40	fake_policy.o \
41	fake_sdt.o \
42	fake_softc.o \
43	fake_stream.o \
44	fake_strsubr.o
45
46# See also: $SRC/uts/common/Makefile.files
47# NB: Intentionally ommitted, compared w/ the above:
48#  smb_dev.o smb_pass.o	smb_sign_kcf.o
49#
50OBJS_NSMB = \
51	smb_dev.o \
52	smb_conn.o \
53	smb_iod.o \
54	smb_rq.o \
55	smb_sign.o \
56	smb_smb.o \
57	smb_subrs.o \
58	smb_time.o \
59	smb_tran.o \
60	smb_trantcp.o \
61	smb_usr.o \
62	smb2_rq.o \
63	smb2_sign.o \
64	smb2_smb.o \
65	subr_mchain.o
66
67OBJECTS = \
68	$(OBJS_LOCAL) \
69	$(OBJS_NSMB)
70
71include ../../../Makefile.lib
72include ../../Makefile.lib
73
74# Force SOURCEDEBUG
75CSOURCEDEBUGFLAGS	= -g
76CCSOURCEDEBUGFLAGS	= -g
77STRIP_STABS	= :
78
79# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
80# Also, like Makefile.uts, reset CPPFLAGS
81CPPFLAGS.first += -I../../../libfakekernel/common
82CPPFLAGS.first += -I../common
83CPPFLAGS= $(CPPFLAGS.first)
84
85INCS += -I$(SRC)/uts/common/fs/smbclnt
86INCS += -I$(SRC)/uts/common
87
88CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
89CPPFLAGS += -D_FILE_OFFSET_BITS=64
90# Always want DEBUG here
91CPPFLAGS += -DDEBUG
92
93CERRWARN += -_gcc=-Wno-switch
94
95# needs work
96SMOFF += all_func_returns,deref_check,signed
97
98LDLIBS +=	$(MACH_LDLIBS)
99LDLIBS +=	-lfakekernel -lpkcs11 -lnsl -lc
100
101NSMB_DIR=$(SRC)/uts/common/fs/smbclnt/netsmb
102SRCS=   $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \
103	$(OBJS_NSMB:%.o=$(NSMB_DIR)/%.c)
104
105all:
106
107pics/%.o:	$(NSMB_DIR)/%.c
108	$(COMPILE.c) -o $@ $<
109	$(POST_PROCESS_O)
110
111.KEEP_STATE:
112
113include ../../Makefile.targ
114include ../../../Makefile.targ
115