4 include heimdal_build/config.mk
8 include cluster/config.mk
9 include smbd/process_model.mk
10 include libnet/config.mk
11 include auth/config.mk
12 include nsswitch/config.mk
14 include param/config.mk
15 include smb_server/config.mk
16 include rpc_server/config.mk
17 include ldap_server/config.mk
18 include web_server/config.mk
19 include winbind/config.mk
20 include nbt_server/config.mk
21 include wrepl_server/config.mk
22 include cldap_server/config.mk
23 include utils/net/config.mk
24 include utils/config.mk
25 include ntvfs/config.mk
26 include ntptr/config.mk
27 include torture/config.mk
28 include librpc/config.mk
29 include client/config.mk
30 include libcli/config.mk
31 include scripting/ejs/config.mk
32 include scripting/python/config.mk
35 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
39 libraries: $(STATIC_LIBS) $(SHARED_LIBS)
40 modules: $(SHARED_MODULES)
41 headers: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
43 all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods
44 everything: all libraries headers
46 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
48 # 'make testsuite' creates all binaries which are
49 # needed by samba3's 'make test' and the build-farm
50 # scripts use that it as fallback in case
51 # 'make everything' fails
52 testsuite: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
55 @echo 'Samba will be installed into:'
56 @echo ' basedir: $(BASEDIR)'
57 @echo ' bindir: $(BINDIR)'
58 @echo ' sbindir: $(SBINDIR)'
59 @echo ' libdir: $(LIBDIR)'
60 @echo ' modulesdir: $(MODULESDIR)'
61 @echo ' includedir: $(INCLUDEDIR)'
62 @echo ' vardir: $(VARDIR)'
63 @echo ' privatedir: $(PRIVATEDIR)'
64 @echo ' piddir: $(PIDDIR)'
65 @echo ' lockdir: $(LOCKDIR)'
66 @echo ' logfilebase: $(LOGFILEBASE)'
67 @echo ' setupdir: $(SETUPDIR)'
68 @echo ' jsdir: $(JSDIR)'
69 @echo ' swatdir: $(SWATDIR)'
70 @echo ' mandir: $(MANDIR)'
71 @echo ' torturedir: $(TORTUREDIR)'
72 @echo ' datadir: $(DATADIR)'
73 @echo ' winbindd_socket_dir: $(WINBINDD_SOCKET_DIR)'
76 @echo 'Samba will be compiled with flags:'
78 @echo ' CPPFLAGS = $(CPPFLAGS)'
80 @echo ' CFLAGS = $(CFLAGS)'
81 @echo ' PICFLAG = $(PICFLAG)'
82 @echo ' BNLD = $(BNLD)'
83 @echo ' BNLD_FLAGS = $(BNLD_FLAGS)'
84 @echo ' STLD = $(STLD)'
85 @echo ' STLD_FLAGS = $(STLD_FLAGS)'
86 @echo ' SHLD = $(SHLD)'
87 @echo ' SHLD_FLAGS = $(SHLD_FLAGS)'
88 @echo ' MDLD = $(MDLD)'
89 @echo ' MDLD_FLAGS = $(MDLD_FLAGS)'
90 @echo ' SHLIBEXT = $(SHLIBEXT)'
91 @echo ' srcdir = $(srcdir)'
92 @echo ' builddir = $(builddir)'
93 @echo ' pwd = '`/bin/pwd`
95 # The permissions to give the executables
98 install: showlayout everything installbin installdat installswat installmisc installlib \
99 installheader installpc installplugins
101 # DESTDIR is used here to prevent packagers wasting their time
102 # duplicating the Makefile. Remove it and you will have the privilege
103 # of packaging each samba release for multiple versions of multiple
104 # distributions and operating systems, or at least supplying patches
105 # to all the packaging files required for this, prior to committing
106 # the removal of DESTDIR. Do not remove it even though you think it
110 @$(SHELL) $(srcdir)/script/installdirs.sh \
111 $(DESTDIR)$(BASEDIR) \
112 $(DESTDIR)$(BINDIR) \
113 $(DESTDIR)$(SBINDIR) \
114 $(DESTDIR)$(TORTUREDIR) \
115 $(DESTDIR)$(LIBDIR) \
116 $(DESTDIR)$(MODULESDIR) \
117 $(DESTDIR)$(MANDIR) \
118 $(DESTDIR)$(VARDIR) \
119 $(DESTDIR)$(PRIVATEDIR) \
120 $(DESTDIR)$(DATADIR) \
121 $(DESTDIR)$(PIDDIR) \
122 $(DESTDIR)$(LOCKDIR) \
123 $(DESTDIR)$(LOGFILEBASE) \
124 $(DESTDIR)$(PRIVATEDIR)/tls \
125 $(DESTDIR)$(INCLUDEDIR) \
126 $(DESTDIR)$(PKGCONFIGDIR) \
127 $(DESTDIR)$(CONFIGDIR) \
129 installbin: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
130 @$(SHELL) $(srcdir)/script/installbin.sh \
132 $(DESTDIR)$(BASEDIR) \
133 $(DESTDIR)$(SBINDIR) \
134 $(DESTDIR)$(LIBDIR) \
135 $(DESTDIR)$(VARDIR) \
137 @$(SHELL) $(srcdir)/script/installbin.sh \
139 $(DESTDIR)$(BASEDIR) \
140 $(DESTDIR)$(BINDIR) \
141 $(DESTDIR)$(LIBDIR) \
142 $(DESTDIR)$(VARDIR) \
144 @$(SHELL) $(srcdir)/script/installtorture.sh \
146 $(DESTDIR)$(TORTUREDIR) \
149 installlib: $(INSTALLABLE_SHARED_LIBS) $(STATIC_LIBS) installdirs
150 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(LIBDIR) "$(SHLIBEXT)" $(INSTALLABLE_SHARED_LIBS)
151 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(LIBDIR) "$(STLIBEXT)" $(STATIC_LIBS)
153 installheader: headers installdirs
154 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(INCLUDEDIR) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
156 installdat: installdirs
157 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(DATADIR) $(srcdir)
159 installswat: installdirs
160 @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
162 installman: manpages installdirs
163 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
165 installmisc: installdirs
166 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(BINDIR)
168 installpc: installdirs
169 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
171 uninstall: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
178 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS)
179 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS)
180 @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
183 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(LIBDIR) $(SHARED_LIBS)
184 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(LIBDIR) $(STATIC_LIBS)
187 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(INCLUDEDIR) $(PUBLIC_HEADERS)
190 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
192 Makefile: config.status $(MK_FILES)
196 etags `find $(srcdir) -name "*.[ch]"`
199 ctags `find $(srcdir) -name "*.[ch]"`
201 pidl/Makefile: pidl/Makefile.PL
202 cd pidl && $(PERL) Makefile.PL
204 testcov-html:: pidl-testcov
206 pidl-testcov: pidl/Makefile
207 cd pidl && cover -test
209 installpidl: pidl/Makefile
210 $(MAKE) -C pidl install
212 uninstallpidl: pidl/Makefile
213 $(MAKE) -C pidl uninstall
215 $(IDL_HEADER_FILES) \
216 $(IDL_NDR_PARSE_H_FILES) $(IDL_NDR_PARSE_C_FILES) \
217 $(IDL_NDR_CLIENT_C_FILES) $(IDL_NDR_CLIENT_H_FILES) \
218 $(IDL_NDR_SERVER_C_FILES) $(IDL_SWIG_FILES) \
219 $(IDL_NDR_EJS_C_FILES) $(IDL_NDR_EJS_H_FILES) \
220 $(IDL_NDR_PY_C_FILES) $(IDL_NDR_PY_H_FILES): idl
222 idl_full: pidl/lib/Parse/Pidl/IDL.pm pidl/lib/Parse/Pidl/Expr.pm
223 @CPP="$(CPP)" PERL="$(PERL)" srcdir=$(srcdir) $(srcdir)/script/build_idl.sh FULL
225 idl: pidl/lib/Parse/Pidl/IDL.pm pidl/lib/Parse/Pidl/Expr.pm
226 @CPP="$(CPP)" PERL="$(PERL)" srcdir=$(srcdir) $(srcdir)/script/build_idl.sh PARTIAL
228 pidl/lib/Parse/Pidl/IDL.pm: pidl/idl.yp
229 -$(YAPP) -m 'Parse::Pidl::IDL' -o pidl/lib/Parse/Pidl/IDL.pm pidl/idl.yp ||\
230 touch pidl/lib/Parse/Pidl/IDL.pm
232 pidl/lib/Parse/Pidl/Expr.pm: pidl/idl.yp
233 -$(YAPP) -m 'Parse::Pidl::Expr' -o pidl/lib/Parse/Pidl/Expr.pm pidl/expr.yp ||\
234 touch pidl/lib/Parse/Pidl/Expr.pm
237 @echo "include/config.h not present"
238 @echo "You need to rerun ./autogen.sh and ./configure"
241 $(srcdir)/version.h: $(srcdir)/VERSION
242 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
245 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
248 @echo "Removing precompiled headers"
249 @-rm -f include/includes.h.gch
251 pch: clean_pch include/includes.h.gch
254 @echo Removing objects
255 @-find . -name '*.o' -exec rm -f '{}' \;
256 @echo Removing hostcc objects
257 @-find . -name '*.ho' -exec rm -f '{}' \;
258 @echo Removing binaries
259 @-rm -f $(BIN_PROGS) $(SBIN_PROGS) $(BINARIES) $(TORTURE_PROGS)
260 @echo Removing libraries
261 @-rm -f $(STATIC_LIBRARIES) $(SHARED_LIBRARIES)
262 @-rm -f bin/static/*.a bin/shared/*.$(SHLIBEXT)
263 @echo Removing modules
264 @-rm -f bin/modules/*/*.$(SHLIBEXT)
265 @-rm -f bin/*_init_module.c
266 @echo Removing dummy targets
268 @echo Removing generated files
269 @-rm -f bin/*_init_module.c
270 @-rm -rf librpc/gen_*
271 @echo Removing proto headers
272 @-rm -f $(PROTO_HEADERS)
275 -rm -f include/config.h include/config_tmp.h include/build.h
278 -rm -f config.log config.cache
279 -rm -f config.pm config.mk
283 -rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
285 realdistclean:: distclean removebackup
286 -rm -f include/config_tmp.h.in
293 include selftest/config.mk
296 $(srcdir)/script/find_unused_macros.pl `find . -name "*.[ch]"` | sort
298 ###############################################################################
300 ###############################################################################
302 .SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .$(SHLIBEXT) .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho .idl .hd
305 @echo "Generating dependencies for $<"
309 @echo "Generating host-compiler dependencies for $<"
312 include/includes.d: include/includes.h
313 @echo "Generating dependencies for $<"
317 @if test -n "$(CC_CHECKER)"; then \
318 echo "Checking $< with '$(CC_CHECKER)'"; \
322 @-mkdir -p `dirname $@`
323 @$(COMPILE) && exit 0 ; \
324 echo "The following command failed:" 1>&2;\
325 echo "$(COMPILE)" 1>&2;\
326 $(COMPILE) >/dev/null 2>&1
329 @echo "Compiling $< with host compiler"
330 @-mkdir -p `dirname $@`
331 @$(HCOMPILE) && exit 0;\
332 echo "The following command failed:" 1>&2;\
333 echo "$(HCOMPILE)" 1>&2;\
334 $(HCOMPILE) >/dev/null 2>&1
337 @echo "Precompiling $<"
341 @echo "Building $< with $(YACC)"
342 @-$(srcdir)/script/yacc_compile.sh "$(YACC)" "$<" "$@"
345 @echo "Building $< with $(LEX)"
346 @-$(srcdir)/script/lex_compile.sh "$(LEX)" "$<" "$@"
348 DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
351 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
354 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
357 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
360 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
363 $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
365 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
368 dist:: idl_full manpages configure distclean