2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
11 pidldir := $(srcdir)/../pidl
14 TORTUREDIR = $(libdir)/torture
15 SWATDIR = $(datadir)/swat
16 SETUPDIR = $(datadir)/setup
17 NCALRPCDIR = $(localstatedir)/ncalrpc
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)
34 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
37 @echo "Removing precompiled headers"
38 @-rm -f include/includes.h.gch
40 pch:: clean_pch include/includes.h.gch
44 ifneq ($(automatic_dependencies),yes)
49 include $(srcdir)/build/make/rules.mk
50 include $(srcdir)/build/make/python.mk
51 zlibsrcdir := lib/zlib
52 dynconfigsrcdir := dynconfig
53 heimdalsrcdir := heimdal
56 clustersrcdir := cluster
57 libnetsrcdir := libnet
59 nsswitchsrcdir := nsswitch
61 libsocketsrcdir := lib/socket
62 libcharsetsrcdir := lib/charset
63 ldb_sambasrcdir := lib/ldb-samba
64 tdbsrcdir := ../lib/tdb
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
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
94 clientsrcdir := client
95 torturesrcdir := torture
98 librpcsrcdir := librpc
99 libclisrcdir := libcli
100 libclinbtsrcdir := ../libcli
101 pyscriptsrcdir := $(srcdir)/scripting/python
103 ntp_signdsrcdir := ntp_signd
105 tallocsrcdir := ../lib/talloc
106 comsrcdir := $(srcdir)/lib/com
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 ' swatdir: $(SWATDIR)'
168 @echo ' mandir: $(mandir)'
169 @echo ' torturedir: $(TORTUREDIR)'
170 @echo ' datadir: $(datadir)'
171 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
172 @echo ' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
175 @echo ' srcdir = $(srcdir)'
176 @echo ' builddir = $(builddir)'
178 # The permissions to give the executables
181 install:: showlayout everything installbin installsbin installdat installswat installmisc \
182 installlib installheader installpc installplugins
184 # DESTDIR is used here to prevent packagers wasting their time
185 # duplicating the Makefile. Remove it and you will have the privilege
186 # of packaging each samba release for multiple versions of multiple
187 # distributions and operating systems, or at least supplying patches
188 # to all the packaging files required for this, prior to committing
189 # the removal of DESTDIR. Do not remove it even though you think it
193 @$(SHELL) $(srcdir)/script/installdirs.sh \
194 $(DESTDIR)$(BASEDIR) \
195 $(DESTDIR)$(bindir) \
196 $(DESTDIR)$(sbindir) \
197 $(DESTDIR)$(TORTUREDIR) \
198 $(DESTDIR)$(libdir) \
199 $(DESTDIR)$(modulesdir) \
200 $(DESTDIR)$(mandir) \
201 $(DESTDIR)$(localstatedir) \
202 $(DESTDIR)$(localstatedir)/lib \
203 $(DESTDIR)$(localstatedir)/run \
204 $(DESTDIR)$(privatedir) \
205 $(DESTDIR)$(datadir) \
206 $(DESTDIR)$(piddir) \
207 $(DESTDIR)$(lockdir) \
208 $(DESTDIR)$(logfilebase) \
209 $(DESTDIR)$(privatedir)/tls \
210 $(DESTDIR)$(includedir) \
211 $(DESTDIR)$(PKGCONFIGDIR) \
212 $(DESTDIR)$(sysconfdir)
214 installbin:: installdirs
218 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
219 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
220 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
222 installheader:: headers installdirs
223 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
225 installdat:: installdirs
226 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
228 installswat:: installdirs
229 #SWAT has been disabled until further notice
230 # @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
232 installman:: manpages installdirs
233 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
235 installmisc:: installdirs
236 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
238 installpc:: installdirs
239 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
241 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
247 $(DESTDIR)$(bindir)/%: bin/% installdirs
249 @echo Installing $(@F) as $@
250 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
252 @chmod $(INSTALLPERMS) $@
254 $(DESTDIR)$(sbindir)/%: bin/% installdirs
256 @echo Installing $(@F) as $@
257 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
259 @chmod $(INSTALLPERMS) $@
264 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
265 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS)
268 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
271 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
276 @echo "config.status does not exist. Please run ./configure."
279 data.mk: config.status $(MK_FILES)
284 include $(pidldir)/config.mk
285 selftestdir := $(srcdir)/selftest
286 include $(selftestdir)/config.mk
289 @echo ' pwd = '`/bin/pwd`