Registry client library: Use "talloc_zero" to avoid uninitialized values
[Samba/gbeck.git] / source4 / Makefile
blobbc470742c66c1f4df2baebeb25fc06333c4920bc
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 = $(libdir)/torture
15 SWATDIR = $(datadir)/swat
16 SETUPDIR = $(datadir)/setup
17 NCALRPCDIR = $(localstatedir)/ncalrpc
19 BNLD = $(LD)
20 BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
22 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
23 HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
25 $(srcdir)/version.h: $(srcdir)/VERSION
26 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
28 ifneq ($(automatic_dependencies),yes)
29 ALL_PREDEP = basics
30 .NOTPARALLEL:
31 endif
33 regen_version::
34 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
36 clean_pch::
37 @echo "Removing precompiled headers"
38 @-rm -f include/includes.h.gch
40 pch:: clean_pch include/includes.h.gch
42 .DEFAULT_GOAL := all
44 ifneq ($(automatic_dependencies),yes)
45 ALL_PREDEP = basics
46 .NOTPARALLEL:
47 endif
49 include $(srcdir)/build/make/rules.mk
50 include $(srcdir)/build/make/python.mk
51 zlibsrcdir := lib/zlib
52 dynconfigsrcdir := dynconfig
53 heimdalsrcdir := heimdal
54 dsdbsrcdir := dsdb
55 smbdsrcdir := smbd
56 clustersrcdir := cluster
57 libnetsrcdir := libnet
58 authsrcdir := auth
59 nsswitchsrcdir := nsswitch
60 libsrcdir := lib
61 libsocketsrcdir := lib/socket
62 libcharsetsrcdir := lib/charset
63 ldb_sambasrcdir := lib/ldb-samba
64 tdbsrcdir := ../lib/tdb
65 ldbsrcdir := lib/ldb
66 libtlssrcdir := lib/tls
67 libregistrysrcdir := lib/registry
68 smbreadlinesrcdir := lib/smbreadline
69 libmessagingsrcdir := lib/messaging
70 libeventssrcdir := lib/events
71 libcmdlinesrcdir := lib/cmdline
72 poptsrcdir := ../lib/popt
73 socketwrappersrcdir := ../lib/socket_wrapper
74 nsswrappersrcdir := ../lib/nss_wrapper
75 appwebsrcdir := lib/appweb
76 libstreamsrcdir := lib/stream
77 libutilsrcdir := lib/util
78 libtdrsrcdir := lib/tdr
79 libdbwrapsrcdir := lib/dbwrap
80 libcryptosrcdir := lib/crypto
81 libtorturesrcdir := lib/torture
82 smb_serversrcdir := smb_server
83 libcompressionsrcdir := ../lib/compression
84 libgencachesrcdir := lib
85 paramsrcdir := param
86 rpc_serversrcdir := rpc_server
87 ldap_serversrcdir := ldap_server
88 web_serversrcdir := web_server
89 winbindsrcdir := winbind
90 nbt_serversrcdir := nbt_server
91 wrepl_serversrcdir := wrepl_server
92 cldap_serversrcdir := cldap_server
93 utilssrcdir := utils
94 clientsrcdir := client
95 torturesrcdir := torture
96 ntvfssrcdir := ntvfs
97 ntptrsrcdir := ntptr
98 librpcsrcdir := librpc
99 libclisrcdir := libcli
100 pyscriptsrcdir := $(srcdir)/scripting/python
101 kdcsrcdir := kdc
102 ntp_signdsrcdir := ntp_signd
103 wmisrcdir := lib/wmi
104 tallocsrcdir := ../lib/talloc
106 include data.mk
108 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
110 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
111 include/includes.d
113 ifeq ($(automatic_dependencies),yes)
114 ifneq ($(MAKECMDGOALS),clean)
115 ifneq ($(MAKECMDGOALS),distclean)
116 ifneq ($(MAKECMDGOALS),realdistclean)
117 ifneq ($(SKIP_DEP_FILES),yes)
118 -include $(DEP_FILES)
119 endif
120 endif
121 endif
122 endif
124 ifneq ($(SKIP_DEP_FILES),yes)
125 clean::
126 @echo Removing dependency files
127 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
128 endif
129 else
130 include $(srcdir)/static_deps.mk
131 endif
133 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
134 $(srcdir)/version.h
136 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
137 modules:: $(PLUGINS)
138 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
139 manpages:: $(MANPAGES)
140 all:: showflags $(ALL_PREDEP) binaries modules pythonmods libraries headers
141 everything:: all
143 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
145 # 'make testsuite' creates all binaries which are
146 # needed by samba3's 'make test' and the build-farm
147 # scripts use that it as fallback in case
148 # 'make everything' fails
149 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
151 showlayout::
152 @echo 'Samba will be installed into:'
153 @echo ' basedir: $(BASEDIR)'
154 @echo ' bindir: $(bindir)'
155 @echo ' sbindir: $(sbindir)'
156 @echo ' libdir: $(libdir)'
157 @echo ' modulesdir: $(modulesdir)'
158 @echo ' includedir: $(includedir)'
159 @echo ' vardir: $(localstatedir)'
160 @echo ' privatedir: $(privatedir)'
161 @echo ' piddir: $(piddir)'
162 @echo ' lockdir: $(lockdir)'
163 @echo ' logfilebase: $(logfilebase)'
164 @echo ' setupdir: $(SETUPDIR)'
165 @echo ' swatdir: $(SWATDIR)'
166 @echo ' mandir: $(mandir)'
167 @echo ' torturedir: $(TORTUREDIR)'
168 @echo ' datadir: $(datadir)'
169 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
170 @echo ' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
172 showflags::
173 @echo ' srcdir = $(srcdir)'
174 @echo ' builddir = $(builddir)'
176 # The permissions to give the executables
177 INSTALLPERMS = 0755
179 install:: showlayout everything installbin installsbin installdat installswat installmisc \
180 installlib installheader installpc installplugins
182 # DESTDIR is used here to prevent packagers wasting their time
183 # duplicating the Makefile. Remove it and you will have the privilege
184 # of packaging each samba release for multiple versions of multiple
185 # distributions and operating systems, or at least supplying patches
186 # to all the packaging files required for this, prior to committing
187 # the removal of DESTDIR. Do not remove it even though you think it
188 # is not used.
190 installdirs::
191 @$(SHELL) $(srcdir)/script/installdirs.sh \
192 $(DESTDIR)$(BASEDIR) \
193 $(DESTDIR)$(bindir) \
194 $(DESTDIR)$(sbindir) \
195 $(DESTDIR)$(TORTUREDIR) \
196 $(DESTDIR)$(libdir) \
197 $(DESTDIR)$(modulesdir) \
198 $(DESTDIR)$(mandir) \
199 $(DESTDIR)$(localstatedir) \
200 $(DESTDIR)$(localstatedir)/lib \
201 $(DESTDIR)$(localstatedir)/run \
202 $(DESTDIR)$(privatedir) \
203 $(DESTDIR)$(datadir) \
204 $(DESTDIR)$(piddir) \
205 $(DESTDIR)$(lockdir) \
206 $(DESTDIR)$(logfilebase) \
207 $(DESTDIR)$(privatedir)/tls \
208 $(DESTDIR)$(includedir) \
209 $(DESTDIR)$(PKGCONFIGDIR) \
210 $(DESTDIR)$(sysconfdir)
212 installbin:: installdirs
214 installplugins::
216 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
217 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
218 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
220 installheader:: headers installdirs
221 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
223 installdat:: installdirs
224 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
226 installswat:: installdirs
227 #SWAT has been disabled until further notice
228 # @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
230 installman:: manpages installdirs
231 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
233 installmisc:: installdirs
234 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
236 installpc:: installdirs
237 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
239 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
240 uninstallplugins
242 uninstallmisc::
243 #FIXME
245 $(DESTDIR)$(bindir)/%: bin/% installdirs
246 @mkdir -p $(@D)
247 @echo Installing $(@F) as $@
248 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
249 @cp $< $@
250 @chmod $(INSTALLPERMS) $@
252 $(DESTDIR)$(sbindir)/%: bin/% installdirs
253 @mkdir -p $(@D)
254 @echo Installing $(@F) as $@
255 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
256 @cp $< $@
257 @chmod $(INSTALLPERMS) $@
259 uninstallbin::
261 uninstalllib::
262 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
263 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS)
265 uninstallheader::
266 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
268 uninstallman::
269 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
271 uninstallplugins::
273 config.status:
274 @echo "config.status does not exist. Please run ./configure."
275 @/bin/false
277 data.mk: config.status $(MK_FILES)
278 ./config.status
280 testcov-html::
282 include $(pidldir)/config.mk
283 selftestdir := $(srcdir)/selftest
284 include $(selftestdir)/config.mk
286 showflags::
287 @echo ' pwd = '`/bin/pwd`