xref: /illumos-gate/usr/src/cmd/fs.d/smbclnt/fksmbcl/Makefile (revision 8329232e00f1048795bae53acb230316243aadb5)
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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23# Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
24#
25
26PROG=	fksmbcl
27
28OBJS_LOCAL = \
29	fksmbcl_main.o \
30	fkdev.o \
31	fknewvc.o \
32	fkiod_cl.o \
33	shares.o
34
35OBJS=	${OBJS_LOCAL}
36SRCS=	${OBJS_LOCAL:.o=.c}
37
38include ../../../Makefile.cmd
39include ../../../Makefile.ctf
40
41# Force SOURCEDEBUG
42CSOURCEDEBUGFLAGS	= -g
43CCSOURCEDEBUGFLAGS	= -g
44STRIP_STABS	= :
45
46# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
47# Also, like Makefile.uts, reset CPPFLAGS
48# CPPFLAGS.first += -I$(SRC)/lib/libfakekernel/common
49CPPFLAGS.first += -I$(SRC)/lib/smbclnt/libfknsmb/common
50CPPFLAGS= $(CPPFLAGS.first)
51
52INCS += -I$(SRC)/uts/common/fs/smbclnt
53INCS += -I$(SRC)/uts/common
54INCS += -I$(SRC)/common/smbclnt
55INCS += -I$(SRC)/common
56
57# Allow cpp to find libfknsmb.h etc. via
58# include <libfknsmb/common/libfknsmb.h>
59INCS += -I$(SRC)/lib/smbclnt
60INCS += -I$(SRC)/lib/libsmbfs
61INCS += -I$(SRC)/lib/libsmbfs/netsmb
62
63CPPFLAGS += $(INCS)
64CPPFLAGS += -D_REENTRANT
65CPPFLAGS += -D_FILE_OFFSET_BITS=64
66CPPFLAGS += -D_LARGEFILE64_SOURCE=1
67CPPFLAGS += -DFKSMBCL
68# Always want DEBUG here
69CPPFLAGS += -DDEBUG
70
71CSTD=		$(CSTD_GNU99)
72
73CFLAGS += $(CCVERBOSE)
74CFLAGS64 += $(CCVERBOSE)
75
76LDFLAGS += $(ZNOLAZYLOAD)
77LDFLAGS += -R/usr/lib/smbfs
78LDLIBS += -L$(ROOT)/usr/lib/smbfs
79LDLIBS += -lsmbfs -lfksmbfs -lfknsmb
80LDLIBS += -lsocket
81
82ROOTSMBDDIR = $(ROOTLIB)/smbfs
83ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
84
85.KEEP_STATE:
86
87all: $(PROG)
88
89$(PROG): $(OBJS)
90	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
91	$(POST_PROCESS)
92
93clean:
94	-$(RM) $(OBJS)
95
96# lots of lint due to mixing kernel+user stuff.  give up.
97lint:	# lint_SRCS
98
99include ../../../Makefile.targ
100
101install: all $(ROOTSMBDFILE)
102
103$(ROOTSMBDDIR)/%: %
104	$(INS.file)
105