Explicitly include ldb_handlers.h where necessary
[Samba/fernandojvsilva.git] / source4 / Makefile
blobb342d671f67e7d88bc03d350656e370bb84c6178
1 #!gmake
2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
5 .DEFAULT_GOAL := all
7 default: all
9 include mkconfig.mk
11 pidldir := $(srcdir)/../pidl
13 basedir = $(prefix)
14 torturedir = ../lib/torture
15 swatdir = $(datadir)/swat
16 setupdir = $(datadir)/setup
17 ncalrpcdir = $(localstatedir)/ncalrpc
18 shliboutputdir = $(builddir)/bin/shared
20 BNLD = $(LD)
21 BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
23 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
24 HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
26 $(srcdir)/version.h: $(srcdir)/VERSION
27 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
29 ifneq ($(automatic_dependencies),yes)
30 ALL_PREDEP = basics
31 .NOTPARALLEL:
32 endif
34 regen_version::
35 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
37 clean_pch::
38 @echo "Removing precompiled headers"
39 @-rm -f include/includes.h.gch
41 pch:: clean_pch include/includes.h.gch
43 .DEFAULT_GOAL := all
45 ifneq ($(automatic_dependencies),yes)
46 ALL_PREDEP = basics
47 .NOTPARALLEL:
48 endif
50 include $(srcdir)/build/make/rules.mk
51 include $(srcdir)/build/make/python.mk
52 zlibsrcdir := ../lib/zlib
53 dynconfigsrcdir := dynconfig
54 heimdalsrcdir := heimdal
55 dsdbsrcdir := dsdb
56 smbdsrcdir := smbd
57 clustersrcdir := cluster
58 libnetsrcdir := libnet
59 authsrcdir := auth
60 nsswitchsrcdir := ../nsswitch
61 libsrcdir := lib
62 libsocketsrcdir := lib/socket
63 libcharsetsrcdir := ../lib/util/charset
64 ldb_sambasrcdir := lib/ldb-samba
65 tdbsrcdir := ../lib/tdb
66 ldbsrcdir := lib/ldb
67 libtlssrcdir := lib/tls
68 libregistrysrcdir := lib/registry
69 smbreadlinesrcdir := lib/smbreadline
70 libmessagingsrcdir := lib/messaging
71 libteventsrcdir := ../lib/tevent
72 libeventssrcdir := lib/events
73 libcmdlinesrcdir := lib/cmdline
74 poptsrcdir := ../lib/popt
75 socketwrappersrcdir := ../lib/socket_wrapper
76 nsswrappersrcdir := ../lib/nss_wrapper
77 appwebsrcdir := lib/appweb
78 libstreamsrcdir := lib/stream
79 libutilsrcdir := ../lib/util
80 libtdrsrcdir := lib/tdr
81 libcryptosrcdir := ../lib/crypto
82 libtorturesrcdir := ../lib/torture
83 smb_serversrcdir := smb_server
84 libcompressionsrcdir := ../lib/compression
85 libgencachesrcdir := lib
86 paramsrcdir := param
87 rpc_serversrcdir := rpc_server
88 ldap_serversrcdir := ldap_server
89 web_serversrcdir := web_server
90 winbindsrcdir := winbind
91 nbt_serversrcdir := nbt_server
92 wrepl_serversrcdir := wrepl_server
93 cldap_serversrcdir := cldap_server
94 utilssrcdir := utils
95 clientsrcdir := client
96 torturesrcdir := torture
97 ntvfssrcdir := ntvfs
98 ntptrsrcdir := ntptr
99 librpcsrcdir := librpc
100 libclisrcdir := libcli
101 libclinbtsrcdir := ../libcli/nbt
102 pyscriptsrcdir := $(srcdir)/scripting/python
103 kdcsrcdir := kdc
104 ntp_signdsrcdir := ntp_signd
105 wmisrcdir := lib/wmi
106 tallocsrcdir := ../lib/talloc
107 comsrcdir := $(srcdir)/lib/com
109 include data.mk
111 $(foreach SCRIPT,$(wildcard scripting/bin/*),$(eval $(call binary_install_template,$(SCRIPT))))
113 $(DESTDIR)$(bindir)/%: scripting/bin/% installdirs
114 @mkdir -p $(@D)
115 @echo Installing $(@F) as $@
116 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
117 @cp $< $@
118 @chmod $(INSTALLPERMS) $@
120 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
122 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
123 include/includes.d
125 ifeq ($(automatic_dependencies),yes)
126 ifneq ($(MAKECMDGOALS),clean)
127 ifneq ($(MAKECMDGOALS),distclean)
128 ifneq ($(MAKECMDGOALS),realdistclean)
129 ifneq ($(SKIP_DEP_FILES),yes)
130 -include $(DEP_FILES)
131 endif
132 endif
133 endif
134 endif
136 ifneq ($(SKIP_DEP_FILES),yes)
137 clean::
138 @echo Removing dependency files
139 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
140 endif
141 else
142 include $(srcdir)/static_deps.mk
143 endif
145 clean::
146 @find ../lib ../libcli ../librpc ../nsswitch -name '*.o' -o -name '*.ho' | xargs rm -f
148 PUBLIC_HEADES += $(srcdir)/version.h
150 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
151 modules:: $(PLUGINS)
152 headers:: $(PUBLIC_HEADERS)
153 manpages:: $(MANPAGES)
154 all:: showflags $(ALL_PREDEP) binaries modules pythonmods libraries headers
155 everything:: all
157 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(shliboutputdir)
159 # 'make testsuite' creates all binaries which are
160 # needed by samba3's 'make test' and the build-farm
161 # scripts use that it as fallback in case
162 # 'make everything' fails
163 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
165 showlayout::
166 @echo 'Samba will be installed into:'
167 @echo ' basedir: $(basedir)'
168 @echo ' bindir: $(bindir)'
169 @echo ' sbindir: $(sbindir)'
170 @echo ' libdir: $(libdir)'
171 @echo ' modulesdir: $(modulesdir)'
172 @echo ' includedir: $(includedir)'
173 @echo ' vardir: $(localstatedir)'
174 @echo ' privatedir: $(privatedir)'
175 @echo ' piddir: $(piddir)'
176 @echo ' lockdir: $(lockdir)'
177 @echo ' logfilebase: $(logfilebase)'
178 @echo ' setupdir: $(setupdir)'
179 @echo ' swatdir: $(swatdir)'
180 @echo ' mandir: $(mandir)'
181 @echo ' torturedir: $(torturedir)'
182 @echo ' datadir: $(datadir)'
183 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
184 @echo ' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
186 showflags::
187 @echo ' srcdir = $(srcdir)'
188 @echo ' builddir = $(builddir)'
190 # The permissions to give the executables
191 INSTALLPERMS = 0755
193 install:: showlayout everything installbin installsbin installdat installmisc \
194 installlib installheader installpc installplugins
196 # DESTDIR is used here to prevent packagers wasting their time
197 # duplicating the Makefile. Remove it and you will have the privilege
198 # of packaging each samba release for multiple versions of multiple
199 # distributions and operating systems, or at least supplying patches
200 # to all the packaging files required for this, prior to committing
201 # the removal of DESTDIR. Do not remove it even though you think it
202 # is not used.
204 installdirs::
205 @$(SHELL) $(srcdir)/script/installdirs.sh \
206 $(DESTDIR)$(basedir) \
207 $(DESTDIR)$(bindir) \
208 $(DESTDIR)$(sbindir) \
209 $(DESTDIR)$(torturedir) \
210 $(DESTDIR)$(libdir) \
211 $(DESTDIR)$(modulesdir) \
212 $(DESTDIR)$(mandir) \
213 $(DESTDIR)$(localstatedir) \
214 $(DESTDIR)$(localstatedir)/lib \
215 $(DESTDIR)$(localstatedir)/run \
216 $(DESTDIR)$(privatedir) \
217 $(DESTDIR)$(datadir) \
218 $(DESTDIR)$(piddir) \
219 $(DESTDIR)$(lockdir) \
220 $(DESTDIR)$(logfilebase) \
221 $(DESTDIR)$(privatedir)/tls \
222 $(DESTDIR)$(includedir) \
223 $(DESTDIR)$(pkgconfigdir) \
224 $(DESTDIR)$(sysconfdir)
226 installbin:: installdirs
228 installplugins::
230 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
231 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
232 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
234 installheader:: headers installdirs
235 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
237 installdat:: installdirs
238 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
240 installman:: manpages installdirs
241 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
243 installmisc:: installdirs
244 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(setupdir)
246 installpc:: installdirs
247 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(pkgconfigdir) $(PC_FILES)
249 uninstall:: uninstallbin uninstallsbin uninstalldat uninstallmisc uninstalllib uninstallheader \
250 uninstallman uninstallpc uninstallplugins
252 uninstallmisc::
253 @echo "Removing MISC files"
254 @rm -rf $(DESTDIR)$(setupdir)/*
256 $(DESTDIR)$(bindir)/%: bin/% installdirs
257 @mkdir -p $(@D)
258 @echo Installing $(@F) as $@
259 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
260 @cp $< $@
261 @chmod $(INSTALLPERMS) $@
263 $(DESTDIR)$(sbindir)/%: bin/% installdirs
264 @mkdir -p $(@D)
265 @echo Installing $(@F) as $@
266 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
267 @cp $< $@
268 @chmod $(INSTALLPERMS) $@
270 uninstalldat::
271 @echo "Removing DAT files"
272 @rm -fr $(DESTDIR)$(datadir)/*
274 uninstallbin::
276 uninstalllib::
277 @echo "Removing libraries"
278 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
280 uninstallheader::
281 @echo "Removing headers"
282 @rm -fr $(DESTDIR)$(includedir)/*
284 uninstallman::
285 @echo "Removing manpages"
286 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
288 uninstallplugins::
290 uninstallpc::
291 @echo "Removing package configurations"
292 @cd $(DESTDIR)$(pkgconfigdir); rm -f $(notdir $(PC_FILES))
294 config.status:
295 @echo "config.status does not exist. Please run ./configure."
296 @/bin/false
298 data.mk: config.status $(MK_FILES)
299 ./config.status
301 testcov-html::
303 include $(pidldir)/config.mk
304 selftestdir := $(srcdir)/../selftest
305 include $(srcdir)/selftest/config.mk
307 showflags::
308 @echo ' pwd = '`/bin/pwd`