lib/tdb/tools/tdbtorture.c: fixed memory leak.
[Samba/gebeck_regimport.git] / source4 / Makefile
blob2a3ad2def1d6c62fd88b1c61259fa94b21e67097
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 libwbclientsrcdir := ../nsswitch/libwbclient
62 libsrcdir := lib
63 libsocketsrcdir := lib/socket
64 libcharsetsrcdir := ../lib/util/charset
65 ldb_sambasrcdir := lib/ldb-samba
66 tdbsrcdir := ../lib/tdb
67 ldbsrcdir := lib/ldb
68 libtlssrcdir := lib/tls
69 libregistrysrcdir := lib/registry
70 smbreadlinesrcdir := lib/smbreadline
71 libmessagingsrcdir := lib/messaging
72 libteventsrcdir := ../lib/tevent
73 libeventssrcdir := lib/events
74 libcmdlinesrcdir := lib/cmdline
75 poptsrcdir := ../lib/popt
76 socketwrappersrcdir := ../lib/socket_wrapper
77 nsswrappersrcdir := ../lib/nss_wrapper
78 appwebsrcdir := lib/appweb
79 libstreamsrcdir := lib/stream
80 libutilsrcdir := ../lib/util
81 libtdrsrcdir := ../lib/tdr
82 libcryptosrcdir := ../lib/crypto
83 libtorturesrcdir := ../lib/torture
84 smb_serversrcdir := smb_server
85 libcompressionsrcdir := ../lib/compression
86 libgencachesrcdir := lib
87 paramsrcdir := param
88 rpc_serversrcdir := rpc_server
89 ldap_serversrcdir := ldap_server
90 web_serversrcdir := web_server
91 winbindsrcdir := winbind
92 nbt_serversrcdir := nbt_server
93 wrepl_serversrcdir := wrepl_server
94 cldap_serversrcdir := cldap_server
95 utilssrcdir := utils
96 clientsrcdir := client
97 torturesrcdir := torture
98 ntvfssrcdir := ntvfs
99 ntptrsrcdir := ntptr
100 librpcsrcdir := librpc
101 libclisrcdir := libcli
102 libclicommonsrcdir := ../libcli
103 libclinbtsrcdir := ../libcli/nbt
104 pyscriptsrcdir := $(srcdir)/scripting/python
105 kdcsrcdir := kdc
106 ntp_signdsrcdir := ntp_signd
107 wmisrcdir := lib/wmi
108 tallocsrcdir := ../lib/talloc
109 comsrcdir := $(srcdir)/lib/com
110 libgpodir := libgpo
112 include data.mk
114 $(foreach SCRIPT,$(wildcard scripting/bin/*),$(eval $(call binary_install_template,$(SCRIPT))))
116 $(DESTDIR)$(bindir)/%: scripting/bin/% installdirs
117 @mkdir -p $(@D)
118 @echo Installing $(@F) as $@
119 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
120 @cp $< $@
121 @chmod $(INSTALLPERMS) $@
123 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
125 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
126 include/includes.d
128 ifeq ($(automatic_dependencies),yes)
129 ifneq ($(MAKECMDGOALS),clean)
130 ifneq ($(MAKECMDGOALS),distclean)
131 ifneq ($(MAKECMDGOALS),realdistclean)
132 ifneq ($(SKIP_DEP_FILES),yes)
133 -include $(DEP_FILES)
134 endif
135 endif
136 endif
137 endif
139 ifneq ($(SKIP_DEP_FILES),yes)
140 clean::
141 @echo Removing dependency files
142 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
143 endif
144 else
145 include $(srcdir)/static_deps.mk
146 endif
148 clean::
149 @find ../lib ../libcli ../librpc ../libgpo ../nsswitch -name '*.o' -o -name '*.ho' | xargs rm -f
151 PUBLIC_HEADERS += ./version.h
153 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
154 modules:: $(PLUGINS)
155 headers:: $(PUBLIC_HEADERS)
156 manpages:: $(MANPAGES)
157 all:: showflags $(ALL_PREDEP) binaries modules pythonmods libraries headers
158 everything:: all
160 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(shliboutputdir)
162 # 'make testsuite' creates all binaries which are
163 # needed by samba3's 'make test' and the build-farm
164 # scripts use that it as fallback in case
165 # 'make everything' fails
166 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
168 showlayout::
169 @echo 'Samba will be installed into:'
170 @echo ' basedir: $(basedir)'
171 @echo ' bindir: $(bindir)'
172 @echo ' sbindir: $(sbindir)'
173 @echo ' libdir: $(libdir)'
174 @echo ' modulesdir: $(modulesdir)'
175 @echo ' includedir: $(includedir)'
176 @echo ' vardir: $(localstatedir)'
177 @echo ' privatedir: $(privatedir)'
178 @echo ' piddir: $(piddir)'
179 @echo ' lockdir: $(lockdir)'
180 @echo ' logfilebase: $(logfilebase)'
181 @echo ' setupdir: $(setupdir)'
182 @echo ' swatdir: $(swatdir)'
183 @echo ' mandir: $(mandir)'
184 @echo ' torturedir: $(torturedir)'
185 @echo ' datadir: $(datadir)'
186 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
187 @echo ' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
189 showflags::
190 @echo ' srcdir = $(srcdir)'
191 @echo ' builddir = $(builddir)'
193 # The permissions to give the executables
194 INSTALLPERMS = 0755
196 install:: showlayout everything installbin installsbin installdat installmisc \
197 installlib installheader installpc installplugins
199 # DESTDIR is used here to prevent packagers wasting their time
200 # duplicating the Makefile. Remove it and you will have the privilege
201 # of packaging each samba release for multiple versions of multiple
202 # distributions and operating systems, or at least supplying patches
203 # to all the packaging files required for this, prior to committing
204 # the removal of DESTDIR. Do not remove it even though you think it
205 # is not used.
207 installdirs::
208 @$(SHELL) $(srcdir)/script/installdirs.sh \
209 $(DESTDIR)$(basedir) \
210 $(DESTDIR)$(bindir) \
211 $(DESTDIR)$(sbindir) \
212 $(DESTDIR)$(torturedir) \
213 $(DESTDIR)$(libdir) \
214 $(DESTDIR)$(modulesdir) \
215 $(DESTDIR)$(mandir) \
216 $(DESTDIR)$(localstatedir) \
217 $(DESTDIR)$(localstatedir)/lib \
218 $(DESTDIR)$(localstatedir)/run \
219 $(DESTDIR)$(privatedir) \
220 $(DESTDIR)$(datadir) \
221 $(DESTDIR)$(piddir) \
222 $(DESTDIR)$(lockdir) \
223 $(DESTDIR)$(logfilebase) \
224 $(DESTDIR)$(privatedir)/tls \
225 $(DESTDIR)$(includedir) \
226 $(DESTDIR)$(pkgconfigdir) \
227 $(DESTDIR)$(sysconfdir)
229 installbin:: installdirs
231 installplugins::
233 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
234 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
235 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
237 installheader:: headers installdirs
238 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
240 installdat:: installdirs
241 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
243 installman:: manpages installdirs
244 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
246 installmisc:: installdirs
247 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(setupdir)
249 installpc:: installdirs
250 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(pkgconfigdir) $(PC_FILES)
252 uninstall:: uninstallbin uninstallsbin uninstalldat uninstallmisc uninstalllib uninstallheader \
253 uninstallman uninstallpc uninstallplugins
255 uninstallmisc::
256 @echo "Removing MISC files"
257 @rm -rf $(DESTDIR)$(setupdir)/*
259 $(DESTDIR)$(bindir)/%: bin/% installdirs
260 @mkdir -p $(@D)
261 @echo Installing $(@F) as $@
262 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
263 @cp $< $@
264 @chmod $(INSTALLPERMS) $@
266 $(DESTDIR)$(sbindir)/%: bin/% installdirs
267 @mkdir -p $(@D)
268 @echo Installing $(@F) as $@
269 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
270 @cp $< $@
271 @chmod $(INSTALLPERMS) $@
273 uninstalldat::
274 @echo "Removing DAT files"
275 @rm -fr $(DESTDIR)$(datadir)/*
277 uninstallbin::
279 uninstalllib::
280 @echo "Removing libraries"
281 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
283 uninstallheader::
284 @echo "Removing headers"
285 @rm -fr $(DESTDIR)$(includedir)/*
287 uninstallman::
288 @echo "Removing manpages"
289 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
291 uninstallplugins::
293 uninstallpc::
294 @echo "Removing package configurations"
295 @cd $(DESTDIR)$(pkgconfigdir); rm -f $(notdir $(PC_FILES))
297 config.status:
298 @echo "config.status does not exist. Please run ./configure."
299 @/bin/false
301 data.mk: config.status $(MK_FILES)
302 ./config.status
304 testcov-html::
306 include $(pidldir)/config.mk
307 selftestdir := $(srcdir)/../selftest
308 include $(srcdir)/selftest/config.mk
310 showflags::
311 @echo ' pwd = '`/bin/pwd`