xref: /illumos-gate/usr/src/lib/smbclnt/libfknsmb/Makefile.com (revision 7655c6d53c36750b508636f48c73a2de57754e5a)
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 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	smb_dev.o \
54	smb_conn.o \
55	smb_iod.o \
56	smb_rq.o \
57	smb_sign.o \
58	smb_smb.o \
59	smb_subrs.o \
60	smb_time.o \
61	smb_tran.o \
62	smb_trantcp.o \
63	smb_usr.o \
64	smb2_rq.o \
65	smb2_sign.o \
66	smb2_smb.o \
67	smb3_crypt.o \
68	subr_mchain.o
69
70OBJECTS = \
71	$(OBJS_LOCAL) \
72	$(OBJS_NSMB)
73
74include ../../../Makefile.lib
75include ../../Makefile.lib
76
77# Force SOURCEDEBUG
78CSOURCEDEBUGFLAGS	= -g
79CCSOURCEDEBUGFLAGS	= -g
80STRIP_STABS	= :
81
82# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
83# Also, like Makefile.uts, reset CPPFLAGS
84CPPFLAGS.first += -I../../../libfakekernel/common
85CPPFLAGS.first += -I../common
86CPPFLAGS= $(CPPFLAGS.first)
87
88INCS += -I$(SRC)/uts/common/fs/smbclnt
89INCS += -I$(SRC)/uts/common
90
91CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
92CPPFLAGS += -D_FILE_OFFSET_BITS=64
93# Always want DEBUG here
94CPPFLAGS += -DDEBUG
95
96CERRWARN += -_gcc=-Wno-switch
97
98# needs work
99SMOFF += all_func_returns,deref_check,signed
100
101LDLIBS +=	$(MACH_LDLIBS)
102LDLIBS +=	-lfakekernel -lpkcs11 -lnsl -lc
103
104# libfknsmb isn't delivered, and is a special case, disable global data complaints
105ZGUIDANCE= -Wl,-zguidance=noasserts
106
107NSMB_DIR=$(SRC)/uts/common/fs/smbclnt/netsmb
108SRCS=   $(OBJS_LOCAL:%.o=$(SRCDIR)/%.c) \
109	$(OBJS_NSMB:%.o=$(NSMB_DIR)/%.c)
110
111all:
112
113pics/%.o:	$(NSMB_DIR)/%.c
114	$(COMPILE.c) -o $@ $<
115	$(POST_PROCESS_O)
116
117.KEEP_STATE:
118
119include ../../Makefile.targ
120include ../../../Makefile.targ
121