2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
11 pidldir := $(srcdir)/pidl
14 TORTUREDIR = $(libdir)/torture
15 SWATDIR = $(datadir)/swat
17 SETUPDIR = $(datadir)/setup
18 NCALRPCDIR = $(localstatedir)/ncalrpc
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)
35 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
38 @echo "Removing precompiled headers"
39 @-rm -f include/includes.h.gch
41 pch:: clean_pch include/includes.h.gch
45 ifneq ($(automatic_dependencies),yes)
50 include $(srcdir)/build/make/rules.mk
51 include $(srcdir)/build/make/python.mk
52 zlibsrcdir := lib/zlib
53 dynconfigsrcdir := dynconfig
54 heimdalsrcdir := heimdal
57 clustersrcdir := cluster
58 libnetsrcdir := libnet
60 nsswitchsrcdir := nsswitch
62 libsocketsrcdir := lib/socket
63 libcharsetsrcdir := lib/charset
64 ldb_sambasrcdir := lib/ldb-samba
65 tdbsrcdir := ../lib/tdb
67 libtlssrcdir := lib/tls
68 libregistrysrcdir := lib/registry
69 smbreadlinesrcdir := lib/smbreadline
70 libmessagingsrcdir := lib/messaging
71 libeventssrcdir := lib/events
72 libcmdlinesrcdir := lib/cmdline
73 poptsrcdir := ../lib/popt
74 socketwrappersrcdir := ../lib/socket_wrapper
75 nsswrappersrcdir := ../lib/nss_wrapper
76 appwebsrcdir := lib/appweb
77 libstreamsrcdir := lib/stream
78 libutilsrcdir := lib/util
79 libtdrsrcdir := lib/tdr
80 libdbwrapsrcdir := lib/dbwrap
81 libcryptosrcdir := lib/crypto
82 libtorturesrcdir := lib/torture
83 smb_serversrcdir := smb_server
84 libcompressionsrcdir := ../lib/compression
85 libgencachesrcdir := lib
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
95 clientsrcdir := client
96 torturesrcdir := torture
99 librpcsrcdir := librpc
100 libclisrcdir := libcli
101 ejsscriptsrcdir := scripting/ejs
102 pyscriptsrcdir := $(srcdir)/scripting/python
104 ntp_signdsrcdir := ntp_signd
106 tallocsrcdir := ../lib/talloc
110 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
112 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
115 ifeq ($(automatic_dependencies),yes)
116 ifneq ($(MAKECMDGOALS),clean)
117 ifneq ($(MAKECMDGOALS),distclean)
118 ifneq ($(MAKECMDGOALS),realdistclean)
119 ifneq ($(SKIP_DEP_FILES),yes)
120 -include $(DEP_FILES)
126 ifneq ($(SKIP_DEP_FILES),yes)
128 @echo Removing dependency files
129 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
132 include $(srcdir)/static_deps.mk
135 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
138 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
140 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
141 manpages:: $(MANPAGES)
142 all:: showflags $(ALL_PREDEP) binaries modules pythonmods libraries headers
145 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
147 # 'make testsuite' creates all binaries which are
148 # needed by samba3's 'make test' and the build-farm
149 # scripts use that it as fallback in case
150 # 'make everything' fails
151 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
154 @echo 'Samba will be installed into:'
155 @echo ' basedir: $(BASEDIR)'
156 @echo ' bindir: $(bindir)'
157 @echo ' sbindir: $(sbindir)'
158 @echo ' libdir: $(libdir)'
159 @echo ' modulesdir: $(modulesdir)'
160 @echo ' includedir: $(includedir)'
161 @echo ' vardir: $(localstatedir)'
162 @echo ' privatedir: $(privatedir)'
163 @echo ' piddir: $(piddir)'
164 @echo ' lockdir: $(lockdir)'
165 @echo ' logfilebase: $(logfilebase)'
166 @echo ' setupdir: $(SETUPDIR)'
167 @echo ' jsdir: $(JSDIR)'
168 @echo ' swatdir: $(SWATDIR)'
169 @echo ' mandir: $(mandir)'
170 @echo ' torturedir: $(TORTUREDIR)'
171 @echo ' datadir: $(datadir)'
172 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
173 @echo ' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
176 @echo ' srcdir = $(srcdir)'
177 @echo ' builddir = $(builddir)'
179 # The permissions to give the executables
182 install:: showlayout everything installbin installsbin installdat installswat installmisc \
183 installlib installheader installpc installplugins
185 # DESTDIR is used here to prevent packagers wasting their time
186 # duplicating the Makefile. Remove it and you will have the privilege
187 # of packaging each samba release for multiple versions of multiple
188 # distributions and operating systems, or at least supplying patches
189 # to all the packaging files required for this, prior to committing
190 # the removal of DESTDIR. Do not remove it even though you think it
194 @$(SHELL) $(srcdir)/script/installdirs.sh \
195 $(DESTDIR)$(BASEDIR) \
196 $(DESTDIR)$(bindir) \
197 $(DESTDIR)$(sbindir) \
198 $(DESTDIR)$(TORTUREDIR) \
199 $(DESTDIR)$(libdir) \
200 $(DESTDIR)$(modulesdir) \
201 $(DESTDIR)$(mandir) \
202 $(DESTDIR)$(localstatedir) \
203 $(DESTDIR)$(localstatedir)/lib \
204 $(DESTDIR)$(localstatedir)/run \
205 $(DESTDIR)$(privatedir) \
206 $(DESTDIR)$(datadir) \
207 $(DESTDIR)$(piddir) \
208 $(DESTDIR)$(lockdir) \
209 $(DESTDIR)$(logfilebase) \
210 $(DESTDIR)$(privatedir)/tls \
211 $(DESTDIR)$(includedir) \
212 $(DESTDIR)$(PKGCONFIGDIR) \
213 $(DESTDIR)$(sysconfdir)
215 installbin:: installdirs
219 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
220 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
221 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
223 installheader:: headers installdirs
224 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
226 installdat:: installdirs
227 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
229 installswat:: installdirs
230 #SWAT has been disabled until further notice
231 # @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
233 installman:: manpages installdirs
234 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
236 installmisc:: installdirs
237 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
239 installpc:: installdirs
240 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
242 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
248 $(DESTDIR)$(bindir)/%: bin/% installdirs
250 @echo Installing $(@F) as $@
251 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
253 @chmod $(INSTALLPERMS) $@
255 $(DESTDIR)$(sbindir)/%: bin/% installdirs
257 @echo Installing $(@F) as $@
258 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
260 @chmod $(INSTALLPERMS) $@
265 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
266 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS)
269 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
272 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
277 @echo "config.status does not exist. Please run ./configure."
280 data.mk: config.status $(MK_FILES)
285 include $(pidldir)/config.mk
286 selftestdir := $(srcdir)/selftest
287 include $(selftestdir)/config.mk
290 @echo ' pwd = '`/bin/pwd`