5917 User-mode SMB server
[unleashed.git] / usr / src / cmd / smbsrv / fksmbd / Makefile
blobcb72f8239e5182142bcf888d00d96c2061b963b2
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2014 Nexenta Systems, Inc. All rights reserved.
27 PROG= fksmbd
28 OBJS_SMBD= \
29 smbd_doorsvc.o \
30 smbd_join.o \
31 smbd_logon.o \
32 smbd_main.o \
33 smbd_nicmon.o \
34 smbd_opipe_doorsvc.o \
35 smbd_share_doorsvc.o \
36 smbd_spool.o \
37 smbd_vss.o \
40 OBJS_LOCAL = \
41 fksmbd_door.o \
42 fksmbd_kmod.o \
43 fksmbd_ksock.o \
44 fksmbd_opipe.o \
45 fksmbd_log.o \
46 fksmbd_shr.o
48 OBJS= ${OBJS_SMBD} ${OBJS_LOCAL}
49 SRCS= ${OBJS_SMBD:%.o=../smbd/%.c} \
50 ${OBJS_LOCAL:.o=.c}
52 include ../../Makefile.cmd
53 include ../../Makefile.ctf
55 # Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
56 CPPFLAGS.first += -I../../../lib/smbsrv/libfksmbsrv/common
58 INCS += -I../smbd
59 INCS += -I../../../uts/common
60 INCS += -I../../../uts/common/smbsrv
61 INCS += -I../../../common/smbsrv
63 C99MODE= -xc99=%all
64 C99LMODE= -Xc99=%all
66 CFLAGS += $(CCVERBOSE)
67 CFLAGS64 += $(CCVERBOSE)
68 CPPFLAGS += -D_REENTRANT
69 CPPFLAGS += -Dsyslog=smb_syslog
70 CPPFLAGS += -D_LARGEFILE64_SOURCE=1
71 CPPFLAGS += -DFKSMBD
72 # Always debug here
73 CPPFLAGS += -DDEBUG
74 CPPFLAGS += $(INCS)
76 LDFLAGS += $(ZNOLAZYLOAD)
77 LDFLAGS += -R/usr/lib/smbsrv
78 LDLIBS += -L$(ROOT)/usr/lib/smbsrv
79 LDLIBS += -lfksmbsrv -lfakekernel
80 LDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb
81 LDLIBS += -lzfs -lcmdutils -lbsm -lsocket -lnsl -lscf -lumem
83 LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
84 LINTFLAGS += -xerroff=E_INCONS_ARG_DECL2
85 LINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2
87 ROOTSMBDDIR = $(ROOTLIB)/smbsrv
88 ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
90 .KEEP_STATE:
92 all: $(PROG)
94 $(PROG): $(OBJS)
95 $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
96 $(POST_PROCESS)
98 clean:
99 -$(RM) $(OBJS)
101 lint: lint_SRCS
103 include ../../Makefile.targ
105 install: all $(ROOTSMBDFILE)
107 %.o: ../smbd/%.c
108 $(COMPILE.c) $<
109 $(POST_PROCESS_O)
111 $(ROOTSMBDDIR)/%: %
112 $(INS.file)