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
34 libraries: $(STATIC_LIBS) $(SHARED_LIBS)
35 headers: $(PUBLIC_HEADERS)
40 @echo "Samba will be installed into:"
41 @echo " basedir: $(BASEDIR)"
42 @echo " bindir: $(BINDIR)"
43 @echo " sbindir: $(SBINDIR)"
44 @echo " libdir: $(LIBDIR)"
45 @echo " includedir: $(INCLUDEDIR)"
46 @echo " vardir: $(VARDIR)"
47 @echo " privatedir: $(PRIVATEDIR)"
48 @echo " piddir: $(PIDDIR)"
49 @echo " lockdir: $(LOCKDIR)"
50 @echo " logfilebase: $(LOGFILEBASE)"
51 @echo " swatdir: $(SWATDIR)"
52 @echo " mandir: $(MANDIR)"
55 @echo "Samba will be compiled with flags:"
56 @echo " CFLAGS = $(CFLAGS)"
57 @echo " LDFLAGS = $(LDFLAGS)"
58 @echo " STLD_FLAGS = $(STLD_FLAGS)"
59 @echo " SHLD_FLAGS = $(SHLD_FLAGS)"
60 @echo " LIBS = $(LIBS)"
62 # The permissions to give the executables
65 # set these to where to find various files
66 # These can be overridden by command line switches (see smbd(8))
67 # or in smb.conf (see smb.conf(5))
68 CONFIGFILE = $(CONFIGDIR)/smb.conf
69 PKGCONFIGDIR = $(LIBDIR)/pkgconfig
70 LMHOSTSFILE = $(CONFIGDIR)/lmhosts
72 PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\" \
73 -DBINDIR=\"$(BINDIR)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
74 -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DLIBDIR=\"$(LIBDIR)\" \
75 -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"$(SHLIBEXT)\" \
76 -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
77 -DSWATDIR=\"$(SWATDIR)\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
79 install: showlayout installbin installdat installswat installmisc installlib \
80 installheader installpc
82 # DESTDIR is used here to prevent packagers wasting their time
83 # duplicating the Makefile. Remove it and you will have the privilege
84 # of packaging each samba release for multiple versions of multiple
85 # distributions and operating systems, or at least supplying patches
86 # to all the packaging files required for this, prior to committing
87 # the removal of DESTDIR. Do not remove it even though you think it
91 @$(SHELL) $(srcdir)/script/installdirs.sh \
92 $(DESTDIR)$(BASEDIR) \
94 $(DESTDIR)$(SBINDIR) \
97 $(DESTDIR)$(PRIVATEDIR) \
99 $(DESTDIR)$(LOCKDIR) \
100 $(DESTDIR)$(LOGFILEBASE) \
101 $(DESTDIR)$(PRIVATEDIR)/tls \
102 $(DESTDIR)$(INCLUDEDIR) \
103 $(DESTDIR)$(PKGCONFIGDIR)
105 installbin: $(SBIN_PROGS) $(BIN_PROGS) installdirs
106 @$(SHELL) $(srcdir)/script/installbin.sh \
108 $(DESTDIR)$(BASEDIR) \
109 $(DESTDIR)$(SBINDIR) \
110 $(DESTDIR)$(LIBDIR) \
111 $(DESTDIR)$(VARDIR) \
113 @$(SHELL) $(srcdir)/script/installbin.sh \
115 $(DESTDIR)$(BASEDIR) \
116 $(DESTDIR)$(BINDIR) \
117 $(DESTDIR)$(LIBDIR) \
118 $(DESTDIR)$(VARDIR) \
121 installlib: libraries installdirs
122 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(LIBDIR) $(SHARED_LIBS)
123 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(LIBDIR) $(STATIC_LIBS)
125 installheader: headers installdirs
126 @$(SHELL) $(srcdir)/script/installheader.sh $(DESTDIR)$(INCLUDEDIR) $(PUBLIC_HEADERS)
128 installdat: installdirs
129 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(LIBDIR) $(srcdir)
131 installswat: installdirs
132 @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir) $(DESTDIR)$(LIBDIR)
134 installman: installdirs
135 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
137 installmisc: installdirs
138 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)
140 installpc: installdirs
141 @$(SHELL) $(srcdir)/script/installpc.sh $(srcdir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
143 uninstall: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader
149 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS)
150 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS)
153 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(LIBDIR) $(SHARED_LIBS)
154 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(LIBDIR) $(STATIC_LIBS)
157 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(INCLUDEDIR) $(PUBLIC_HEADERS)
160 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
162 Makefile: config.status $(MK_FILES)
166 etags `find $(srcdir) -name "*.[ch]"`
169 ctags `find $(srcdir) -name "*.[ch]"`
171 pidl/Makefile: pidl/Makefile.PL
172 cd pidl && $(PERL) Makefile.PL
174 installpidl: pidl/Makefile
175 cd pidl && $(MAKE) install
177 idl_full: pidl/lib/Parse/Pidl/IDL.pm
178 @CPP="$(CPP)" PERL="$(PERL)" script/build_idl.sh FULL $(PIDL_ARGS)
180 idl: pidl/lib/Parse/Pidl/IDL.pm
181 @CPP="$(CPP)" PERL="$(PERL)" script/build_idl.sh PARTIAL $(PIDL_ARGS)
183 pidl/lib/Parse/Pidl/IDL.pm: pidl/idl.yp
184 -$(YAPP) -s -m 'Parse::Pidl::IDL' -o pidl/lib/Parse/Pidl/IDL.pm pidl/idl.yp
186 smb_interfaces: pidl/smb_interfaces.pm
187 $(PERL) -Ipidl script/build_smb_interfaces.pl \
188 include/smb_interfaces.h
190 pidl/smb_interfaces.pm: pidl/smb_interfaces.yp
191 -$(YAPP) -s -m 'smb_interfaces' -o pidl/smb_interfaces.pm pidl/smb_interfaces.yp
194 @echo "include/config.h not present"
195 @echo "You need to rerun ./autogen.sh and ./configure"
198 include/proto.h: $(PROTO_PROTO_OBJ_LIST:.o=.c)
199 @-rm -f include/includes.h.gch
200 @$(SHELL) script/mkproto.sh "$(PERL)" \
201 -h _PROTO_H_ include/proto.h \
202 $(PROTO_PROTO_OBJ_LIST)
203 @touch include/proto.h
205 proto: include/proto.h
206 pch: include/config.h \
209 include/includes.h.gch
211 basics: include/config.h \
217 @echo Removing headers
218 @-rm -f include/proto.h
219 @echo Removing objects
220 @-find . -name '*.o' -exec rm -f '{}' \;
221 @echo Removing binaries
222 @-rm -f $(BIN_PROGS) $(SBIN_PROGS)
223 @echo Removing libraries
224 @-rm -f bin/*.$(SHLIBEXT).*
225 @echo Removing dummy targets
227 @echo Removing generated files
228 @-rm -rf librpc/gen_*
229 @-rm -f lib/registry/regf.h lib/registry/tdr_regf*
233 -rm -f include/config.h include/smb_build.h
236 -rm -f config.log config.cache
237 -rm -f samba4-deps.dot
238 -rm -f config.pm config.mk
241 -rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
243 realdistclean: distclean removebackup
244 -rm -f include/config.h.in
245 -rm -f include/version.h
249 test: $(DEFAULT_TEST_TARGET)
252 ./script/tests/selftest.sh ${selftest_prefix}/st all SOCKET_WRAPPER
255 ./script/tests/selftest.sh ${selftest_prefix}/st all
258 ./script/tests/selftest.sh ${selftest_prefix}/st quick SOCKET_WRAPPER
261 SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
262 ./script/tests/selftest.sh ${selftest_prefix}/st quick SOCKET_WRAPPER
267 ###############################################################################
269 ###############################################################################
271 .SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .so .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .ho
274 @echo "Generating dependencies for $<"
275 @$(CC) -MM -MG -MT $(<:.c=.o) -MF $@ $(CFLAGS) $<
278 @echo "Building $< with $(YACC)"
279 @-$(srcdir)/script/yacc_compile.sh "$(YACC)" "$<" "$@"
282 @echo "Building $< with $(LEX)"
283 @-$(srcdir)/script/lex_compile.sh "$(LEX)" "$<" "$@"
285 DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
288 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
291 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
294 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
297 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<