1 all: basics bin
/asn1_compile bin
/compile_et binaries
3 include heimdal_build
/config.mk
8 include smbd
/process_model.mk
9 include libnet
/config.mk
10 include auth
/config.mk
11 include nsswitch
/config.mk
13 include param
/config.mk
14 include smb_server
/config.mk
15 include rpc_server
/config.mk
16 include ldap_server
/config.mk
17 include web_server
/config.mk
18 include winbind
/config.mk
19 include nbt_server
/config.mk
20 include wrepl_server
/config.mk
21 include cldap_server
/config.mk
22 include utils
/net
/config.mk
23 include utils
/config.mk
24 include ntvfs
/config.mk
25 include ntptr
/config.mk
26 include torture
/config.mk
27 include librpc
/config.mk
28 include client
/config.mk
29 include libcli
/config.mk
30 include scripting
/config.mk
32 include passdb
/config.mk
34 DEFAULT_HEADERS
= $(srcdir)/include/nterr.h
$(srcdir)/include/nt_status.h \
35 $(srcdir)/include/smb.h
$(srcdir)/include/core.h
38 libraries
: $(STATIC_LIBS
) $(SHARED_LIBS
)
39 modules
: $(SHARED_MODULES
)
40 headers
: $(PUBLIC_HEADERS
) $(DEFAULT_HEADERS
)
45 @echo
'Samba will be installed into:'
46 @echo
' basedir: $(BASEDIR)'
47 @echo
' bindir: $(BINDIR)'
48 @echo
' sbindir: $(SBINDIR)'
49 @echo
' libdir: $(LIBDIR)'
50 @echo
' modulesdir: $(MODULESDIR)'
51 @echo
' includedir: $(INCLUDEDIR)'
52 @echo
' vardir: $(VARDIR)'
53 @echo
' privatedir: $(PRIVATEDIR)'
54 @echo
' piddir: $(PIDDIR)'
55 @echo
' lockdir: $(LOCKDIR)'
56 @echo
' logfilebase: $(LOGFILEBASE)'
57 @echo
' setupdir: $(SETUPDIR)'
58 @echo
' jsdir: $(JSDIR)'
59 @echo
' swatdir: $(SWATDIR)'
60 @echo
' mandir: $(MANDIR)'
61 @echo
' winbindd_socket_dir: $(WINBINDD_SOCKET_DIR)'
64 @echo
'Samba will be compiled with flags:'
65 @echo
' CFLAGS = $(CFLAGS)'
66 @echo
' LDFLAGS = $(LDFLAGS)'
67 @echo
' STLD_FLAGS = $(STLD_FLAGS)'
68 @echo
' SHLD_FLAGS = $(SHLD_FLAGS)'
69 @echo
' LIBS = $(LIBS)'
71 # The permissions to give the executables
74 # set these to where to find various files
75 # These can be overridden by command line switches (see smbd(8))
76 # or in smb.conf (see smb.conf(5))
77 CONFIGFILE
= $(CONFIGDIR
)/smb.conf
78 PKGCONFIGDIR
= $(LIBDIR
)/pkgconfig
79 LMHOSTSFILE
= $(CONFIGDIR
)/lmhosts
81 PATH_FLAGS
= -DCONFIGFILE
=\"$(CONFIGFILE
)\" -DSBINDIR
=\"$(SBINDIR
)\" \
82 -DBINDIR
=\"$(BINDIR
)\" -DLMHOSTSFILE
=\"$(LMHOSTSFILE
)\" \
83 -DLOCKDIR
=\"$(LOCKDIR
)\" -DPIDDIR
=\"$(PIDDIR
)\" -DLIBDIR
=\"$(LIBDIR
)\" \
84 -DLOGFILEBASE
=\"$(LOGFILEBASE
)\" -DSHLIBEXT
=\"$(SHLIBEXT
)\" \
85 -DCONFIGDIR
=\"$(CONFIGDIR
)\" -DNCALRPCDIR
=\"$(NCALRPCDIR
)\" \
86 -DSWATDIR
=\"$(SWATDIR
)\" -DPRIVATE_DIR
=\"$(PRIVATEDIR
)\" \
87 -DMODULESDIR
=\"$(MODULESDIR
)\" -DJSDIR
=\"$(JSDIR
)\" \
88 -DSETUPDIR
=\"$(SETUPDIR
)\" -DWINBINDD_SOCKET_DIR
=\"$(WINBINDD_SOCKET_DIR
)\"
90 install: showlayout installbin installdat installswat installmisc installlib \
91 installheader installpc
93 # DESTDIR is used here to prevent packagers wasting their time
94 # duplicating the Makefile. Remove it and you will have the privilege
95 # of packaging each samba release for multiple versions of multiple
96 # distributions and operating systems, or at least supplying patches
97 # to all the packaging files required for this, prior to committing
98 # the removal of DESTDIR. Do not remove it even though you think it
102 @
$(SHELL
) $(srcdir)/script
/installdirs.sh \
103 $(DESTDIR
)$(BASEDIR
) \
104 $(DESTDIR
)$(BINDIR
) \
105 $(DESTDIR
)$(SBINDIR
) \
106 $(DESTDIR
)$(LIBDIR
) \
107 $(DESTDIR
)$(VARDIR
) \
108 $(DESTDIR
)$(PRIVATEDIR
) \
109 $(DESTDIR
)$(PIDDIR
) \
110 $(DESTDIR
)$(LOCKDIR
) \
111 $(DESTDIR
)$(LOGFILEBASE
) \
112 $(DESTDIR
)$(PRIVATEDIR
)/tls \
113 $(DESTDIR
)$(INCLUDEDIR
) \
114 $(DESTDIR
)$(PKGCONFIGDIR
) \
115 $(DESTDIR
)$(CONFIGDIR
) \
117 installbin
: $(SBIN_PROGS
) $(BIN_PROGS
) installdirs
118 @
$(SHELL
) $(srcdir)/script
/installbin.sh \
120 $(DESTDIR
)$(BASEDIR
) \
121 $(DESTDIR
)$(SBINDIR
) \
122 $(DESTDIR
)$(LIBDIR
) \
123 $(DESTDIR
)$(VARDIR
) \
125 @
$(SHELL
) $(srcdir)/script
/installbin.sh \
127 $(DESTDIR
)$(BASEDIR
) \
128 $(DESTDIR
)$(BINDIR
) \
129 $(DESTDIR
)$(LIBDIR
) \
130 $(DESTDIR
)$(VARDIR
) \
133 installlib
: libraries
installdirs
134 @
$(SHELL
) $(srcdir)/script
/installlib.sh
$(DESTDIR
)$(LIBDIR
) $(SHARED_LIBS
)
135 @
$(SHELL
) $(srcdir)/script
/installlib.sh
$(DESTDIR
)$(LIBDIR
) $(STATIC_LIBS
)
137 installheader
: headers
installdirs
138 @
$(SHELL
) $(srcdir)/script
/installheader.sh
$(DESTDIR
)$(INCLUDEDIR
) $(PUBLIC_HEADERS
) $(DEFAULT_HEADERS
)
140 installdat
: installdirs
141 @
$(SHELL
) $(srcdir)/script
/installdat.sh
$(DESTDIR
)$(LIBDIR
) $(srcdir)
143 installswat
: installdirs
144 @
$(SHELL
) $(srcdir)/script
/installswat.sh
$(DESTDIR
)$(SWATDIR
) $(srcdir) $(DESTDIR
)$(LIBDIR
)
146 installman
: installdirs
147 @
$(SHELL
) $(srcdir)/script
/installman.sh
$(DESTDIR
)$(MANDIR
) $(MANPAGES
)
149 installmisc
: installdirs
150 @
$(SHELL
) $(srcdir)/script
/installmisc.sh
$(srcdir) $(DESTDIR
)$(JSDIR
) $(DESTDIR
)$(SETUPDIR
) $(DESTDIR
)$(BINDIR
)
152 installpc
: installdirs
153 @
$(SHELL
) $(srcdir)/script
/installpc.sh
$(srcdir) $(DESTDIR
)$(PKGCONFIGDIR
) $(PC_FILES
)
155 uninstall: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader
161 @
$(SHELL
) $(srcdir)/script
/uninstallbin.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(SBINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(DESTDIR
)$(SBIN_PROGS
)
162 @
$(SHELL
) $(srcdir)/script
/uninstallbin.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(DESTDIR
)$(BIN_PROGS
)
165 @
$(SHELL
) $(srcdir)/script
/uninstalllib.sh
$(DESTDIR
)$(LIBDIR
) $(SHARED_LIBS
)
166 @
$(SHELL
) $(srcdir)/script
/uninstalllib.sh
$(DESTDIR
)$(LIBDIR
) $(STATIC_LIBS
)
169 @
$(SHELL
) $(srcdir)/script
/uninstallheader.sh
$(DESTDIR
)$(INCLUDEDIR
) $(PUBLIC_HEADERS
)
172 @
$(SHELL
) $(srcdir)/script
/uninstallman.sh
$(DESTDIR
)$(MANDIR
) $(MANPAGES
)
174 Makefile
: config.status
$(MK_FILES
)
178 etags
`find $(srcdir) -name "*.[ch]"`
181 ctags
`find $(srcdir) -name "*.[ch]"`
183 pidl
/Makefile
: pidl
/Makefile.PL
184 cd pidl
&& $(PERL
) Makefile.PL
186 installpidl
: pidl
/Makefile
187 cd pidl
&& $(MAKE
) install
189 IDL_FILES
= $(wildcard librpc
/idl
/*.idl
)
190 IDL_HEADER_FILES
= $(patsubst librpc
/idl
/%.idl
,librpc
/gen_ndr
/%.h
,$(IDL_FILES
))
191 IDL_NDR_HEADER_FILES
= $(patsubst librpc
/idl
/%.idl
,librpc
/gen_ndr
/ndr_
%.h
,$(IDL_FILES
))
192 IDL_NDR_PARSE_C_FILES
= $(patsubst librpc
/idl
/%.idl
,librpc
/gen_ndr
/ndr_
%.c
,$(IDL_FILES
))
193 IDL_NDR_CLIENT_C_FILES
= $(patsubst librpc
/idl
/%.idl
,librpc
/gen_ndr
/ndr_
%_c.c
,$(IDL_FILES
))
194 IDL_NDR_SERVER_C_FILES
= $(patsubst librpc
/idl
/%.idl
,librpc
/gen_ndr
/ndr_
%_s.c
,$(IDL_FILES
))
195 IDL_NDR_EJS_C_FILES
= $(patsubst librpc
/idl
/%.idl
,librpc
/gen_ndr
/ndr_
%_ejs.c
,$(IDL_FILES
))
196 IDL_NDR_EJS_H_FILES
= $(patsubst librpc
/idl
/%.idl
,librpc
/gen_ndr
/ndr_
%_ejs.h
,$(IDL_FILES
))
198 $(IDL_HEADER_FILES
): idl
199 $(IDL_NDR_HEADER_FILES
): idl
200 $(IDL_NDR_PARSE_C_FILES
): idl
201 $(IDL_NDR_CLIENT_C_FILES
): idl
202 $(IDL_NDR_SERVER_C_FILES
): idl
203 $(IDL_NDR_EJS_C_FILES
): idl
204 $(IDL_NDR_EJS_H_FILES
): idl
206 idl_full
: pidl
/lib
/Parse
/Pidl
/IDL.pm
207 @CPP
="$(CPP)" PERL
="$(PERL)" script
/build_idl.sh FULL
$(PIDL_ARGS
)
209 idl
: pidl
/lib
/Parse
/Pidl
/IDL.pm
210 @CPP
="$(CPP)" PERL
="$(PERL)" script
/build_idl.sh PARTIAL
$(PIDL_ARGS
)
212 pidl
/lib
/Parse
/Pidl
/IDL.pm
: pidl
/idl.yp
213 -$(YAPP
) -s
-m
'Parse::Pidl::IDL' -o pidl
/lib
/Parse
/Pidl
/IDL.pm pidl
/idl.yp
215 smb_interfaces
: pidl
/smb_interfaces.pm
216 $(PERL
) -Ipidl script
/build_smb_interfaces.pl \
217 include/smb_interfaces.h
219 pidl
/smb_interfaces.pm
: pidl
/smb_interfaces.yp
220 -$(YAPP
) -s
-m
'smb_interfaces' -o pidl
/smb_interfaces.pm pidl
/smb_interfaces.yp
223 @echo
"include/config.h not present"
224 @echo
"You need to rerun ./autogen.sh and ./configure"
227 include/proto.h
: $(PROTO_OBJS
:.o
=.c
)
228 @echo
"Creating include/proto.h"
229 @
$(PERL
) $(srcdir)/script
/mkproto.pl
--public-define
=_PROTO_H_ \
230 --public
=include/proto.h
--private
=include/proto.h \
233 proto
: include/proto.h
235 librpc
/gen_ndr
/misc.h
: idl
236 librpc
/ndr
/libndr.h
: librpc
/ndr
/libndr_proto.h librpc
/gen_ndr
/misc.h
237 librpc
/rpc
/dcerpc.h
: librpc
/rpc
/dcerpc_proto.h
238 auth
/credentials
/credentials.h
: auth
/credentials
/credentials_proto.h
239 libcli
/nbt
/libnbt.h
: libcli
/nbt
/nbt_proto.h
240 lib
/charset
/charset.h
: lib
/charset
/charset_proto.h
242 include/includes.h
: \
245 librpc
/ndr
/libndr.h \
246 librpc
/rpc
/dcerpc.h \
247 auth
/credentials
/credentials_proto.h \
248 libcli
/nbt
/libnbt.h \
250 lib
/charset
/charset.h
253 -rm -f
include/includes.h.gch
255 pch
: clean_pch
include/includes.h.gch
257 basics
: include/includes.h \
262 clean: heimdal_clean clean_pch
263 @echo Removing headers
264 @
-rm -f
include/proto.h
265 @echo Removing objects
266 @
-find .
-name
'*.o' -exec
rm -f
'{}' \
;
267 @echo Removing hostcc objects
268 @
-find .
-name
'*.ho' -exec
rm -f
'{}' \
;
269 @echo Removing binaries
270 @
-rm -f
$(BIN_PROGS
) $(SBIN_PROGS
)
271 @echo Removing libraries
272 @
-rm -f bin
/*.
$(SHLIBEXT
).
*
273 @echo Removing dummy targets
275 @echo Removing generated files
276 @
-rm -rf librpc
/gen_
*
277 @
-rm -f lib
/registry
/regf.h lib
/registry
/tdr_regf
*
278 @echo Removing proto headers
279 @
-rm -f
$(PROTO_HEADERS
)
282 -rm -f
include/config.h
include/smb_build.h
285 -rm -f config.log config.cache
286 -rm -f samba4-deps.dot
287 -rm -f config.pm config.mk
290 -rm -f
*.bak
*~
*/*.bak
*/*~
*/*/*.bak
*/*/*~
*/*/*/*.bak
*/*/*/*~
292 realdistclean
: distclean removebackup
293 -rm -f
include/config.h.in
294 -rm -f
include/version.h
298 test: $(DEFAULT_TEST_TARGET
)
301 .
/script
/tests
/selftest.sh
${selftest_prefix}/st
all SOCKET_WRAPPER
304 .
/script
/tests
/selftest.sh
${selftest_prefix}/st
all
307 .
/script
/tests
/selftest.sh
${selftest_prefix}/st quick SOCKET_WRAPPER
310 SMBD_VALGRIND
="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
311 VALGRIND
="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/st/valgrind.log" \
312 .
/script
/tests
/selftest.sh
${selftest_prefix}/st quick SOCKET_WRAPPER
315 SMBD_VALGRIND
="xterm -n smbd -e gdb --args " \
316 .
/script
/tests
/selftest.sh
${selftest_prefix}/st quick SOCKET_WRAPPER
319 .
/script
/find_unused_macros.pl
`find . -name "*.[ch]"` |
sort
321 ###############################################################################
323 ###############################################################################
326 @echo
"Generating dependencies for $<"
327 @
$(CC
) -MM
-MG
-MT
$(<:.c
=.o
) -MF
$@
$(CFLAGS
) $<
330 @echo
"Building $< with $(YACC)"
331 @
-$(srcdir)/script
/yacc_compile.sh
"$(YACC)" "$<" "$@"
334 @echo
"Building $< with $(LEX)"
335 @
-$(srcdir)/script
/lex_compile.sh
"$(LEX)" "$<" "$@"
337 DOCBOOK_MANPAGE_URL
= http
://docbook.sourceforge.net
/release
/xsl
/current
/manpages
/docbook.xsl
340 $(XSLTPROC
) -o
$@
$(DOCBOOK_MANPAGE_URL
) $<
343 $(XSLTPROC
) -o
$@
$(DOCBOOK_MANPAGE_URL
) $<
346 $(XSLTPROC
) -o
$@
$(DOCBOOK_MANPAGE_URL
) $<
349 $(XSLTPROC
) -o
$@
$(DOCBOOK_MANPAGE_URL
) $<
352 $(XSLTPROC
) -o
$@
$(DOCBOOK_MANPAGE_URL
) $<