xref: /titanic_44/usr/src/cmd/smbsrv/fksmbd/Makefile (revision fd435bccec40cb841f712413108d8577422fd9ab)
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 2014 Nexenta Systems, Inc.  All rights reserved.
24#
25
26
27PROG=	fksmbd
28OBJS_SMBD=			\
29	smbd_doorsvc.o		\
30	smbd_join.o		\
31	smbd_logon.o		\
32	smbd_main.o		\
33	smbd_nicmon.o		\
34	smbd_pipesvc.o		\
35	smbd_share_doorsvc.o	\
36	smbd_spool.o		\
37	smbd_vss.o		\
38
39
40OBJS_LOCAL =			\
41	fksmbd_door.o		\
42	fksmbd_kmod.o		\
43	fksmbd_ksock.o		\
44	fksmbd_log.o		\
45	fksmbd_shr.o
46
47OBJS=	${OBJS_SMBD} ${OBJS_LOCAL}
48SRCS=	${OBJS_SMBD:%.o=../smbd/%.c} \
49	${OBJS_LOCAL:.o=.c}
50
51include ../../Makefile.cmd
52include ../../Makefile.ctf
53
54# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
55CPPFLAGS.first += -I../../../lib/smbsrv/libfksmbsrv/common
56
57INCS += -I../smbd
58INCS +=	-I../../../uts/common
59INCS +=	-I../../../uts/common/smbsrv
60INCS +=	-I../../../common/smbsrv
61
62C99MODE=	-xc99=%all
63C99LMODE=	-Xc99=%all
64
65CFLAGS += $(CCVERBOSE)
66CFLAGS64 += $(CCVERBOSE)
67CPPFLAGS += -D_REENTRANT
68CPPFLAGS += -Dsyslog=smb_syslog
69CPPFLAGS += -D_LARGEFILE64_SOURCE=1
70CPPFLAGS += -DFKSMBD
71# Always debug here
72CPPFLAGS += -DDEBUG
73CPPFLAGS += $(INCS)
74
75LDFLAGS += $(ZNOLAZYLOAD)
76LDFLAGS += -R/usr/lib/smbsrv
77LDLIBS += -L$(ROOT)/usr/lib/smbsrv
78LDLIBS += -lfksmbsrv -lfakekernel
79LDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb
80LDLIBS += -lzfs -lcmdutils -lbsm -lsocket -lnsl -lscf -lumem
81
82LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
83LINTFLAGS += -xerroff=E_INCONS_ARG_DECL2
84LINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2
85
86ROOTSMBDDIR = $(ROOTLIB)/smbsrv
87ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
88
89.KEEP_STATE:
90
91all: $(PROG)
92
93$(PROG): $(OBJS)
94	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
95	$(POST_PROCESS)
96
97clean:
98	-$(RM) $(OBJS)
99
100lint:	lint_SRCS
101
102include ../../Makefile.targ
103
104install: all $(ROOTSMBDFILE)
105
106%.o: ../smbd/%.c
107	$(COMPILE.c) $<
108	$(POST_PROCESS_O)
109
110$(ROOTSMBDDIR)/%: %
111	$(INS.file)
112