2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
7 pidldir := $(srcdir)/pidl
9 VPATH = $(builddir):$(srcdir):$(srcdir)/heimdal_build:$(heimdalsrcdir)/lib/asn1:$(heimdalsrcdir)/lib/krb5:$(heimdalsrcdir)/lib/gssapi:$(heimdalsrcdir)/lib/hdb:$(heimdalsrcdir)/lib/roken:$(heimdalsrcdir)/lib/des
12 TORTUREDIR = $(libdir)/torture
13 SWATDIR = $(datadir)/swat
15 SETUPDIR = $(datadir)/setup
16 NCALRPCDIR = $(localstatedir)/ncalrpc
19 BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
21 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
22 HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
24 $(srcdir)/version.h: $(srcdir)/VERSION
25 @$(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 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 libtlssrcdir := lib/tls
65 libregistrysrcdir := lib/registry
66 libmessagingsrcdir := lib/messaging
67 libeventssrcdir := lib/events
68 libcmdlinesrcdir := lib/cmdline
69 socketwrappersrcdir := lib/socket_wrapper
70 nsswrappersrcdir := lib/nss_wrapper
71 appwebsrcdir := lib/appweb
72 libstreamsrcdir := lib/stream
73 libutilsrcdir := lib/util
74 libtdrsrcdir := lib/tdr
75 libdbwrapsrcdir := lib/dbwrap
76 libcryptosrcdir := lib/crypto
77 libtorturesrcdir := lib/torture
78 smb_serversrcdir := smb_server
79 libcompressionsrcdir := lib/compression
80 libgencachesrcdir := lib
82 rpc_serversrcdir := rpc_server
83 ldap_serversrcdir := ldap_server
84 web_serversrcdir := web_server
85 winbindsrcdir := winbind
86 nbt_serversrcdir := nbt_server
87 wrepl_serversrcdir := wrepl_server
88 cldap_serversrcdir := cldap_server
90 clientsrcdir := client
91 torturesrcdir := torture
94 librpcsrcdir := librpc
95 libclisrcdir := libcli
96 ejsscriptsrcdir := scripting/ejs
97 pyscriptsrcdir := $(srcdir)/scripting/python
102 BINARIES += $(BIN_PROGS) $(SBIN_PROGS)
104 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
106 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
109 ifeq ($(automatic_dependencies),yes)
110 ifneq ($(MAKECMDGOALS),clean)
111 ifneq ($(MAKECMDGOALS),distclean)
112 ifneq ($(MAKECMDGOALS),realdistclean)
113 ifneq ($(SKIP_DEP_FILES),yes)
114 -include $(DEP_FILES)
120 ifneq ($(SKIP_DEP_FILES),yes)
122 @echo Removing dependency files
123 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
126 include $(srcdir)/static_deps.mk
129 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
132 binaries:: $(BINARIES)
133 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
135 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
136 manpages:: $(MANPAGES)
137 all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods libraries headers
140 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
142 # 'make testsuite' creates all binaries which are
143 # needed by samba3's 'make test' and the build-farm
144 # scripts use that it as fallback in case
145 # 'make everything' fails
146 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
149 @echo 'Samba will be installed into:'
150 @echo ' basedir: $(BASEDIR)'
151 @echo ' bindir: $(bindir)'
152 @echo ' sbindir: $(sbindir)'
153 @echo ' libdir: $(libdir)'
154 @echo ' modulesdir: $(modulesdir)'
155 @echo ' includedir: $(includedir)'
156 @echo ' vardir: $(localstatedir)'
157 @echo ' privatedir: $(privatedir)'
158 @echo ' piddir: $(piddir)'
159 @echo ' lockdir: $(lockdir)'
160 @echo ' logfilebase: $(logfilebase)'
161 @echo ' setupdir: $(SETUPDIR)'
162 @echo ' jsdir: $(JSDIR)'
163 @echo ' swatdir: $(SWATDIR)'
164 @echo ' mandir: $(mandir)'
165 @echo ' torturedir: $(TORTUREDIR)'
166 @echo ' datadir: $(datadir)'
167 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
170 @echo ' srcdir = $(srcdir)'
171 @echo ' builddir = $(builddir)'
173 # The permissions to give the executables
176 install:: showlayout everything installbin installdat installswat installmisc \
177 installlib installheader installpc installplugins
179 # DESTDIR is used here to prevent packagers wasting their time
180 # duplicating the Makefile. Remove it and you will have the privilege
181 # of packaging each samba release for multiple versions of multiple
182 # distributions and operating systems, or at least supplying patches
183 # to all the packaging files required for this, prior to committing
184 # the removal of DESTDIR. Do not remove it even though you think it
188 @$(SHELL) $(srcdir)/script/installdirs.sh \
189 $(DESTDIR)$(BASEDIR) \
190 $(DESTDIR)$(bindir) \
191 $(DESTDIR)$(sbindir) \
192 $(DESTDIR)$(TORTUREDIR) \
193 $(DESTDIR)$(libdir) \
194 $(DESTDIR)$(modulesdir) \
195 $(DESTDIR)$(mandir) \
196 $(DESTDIR)$(localstatedir) \
197 $(DESTDIR)$(privatedir) \
198 $(DESTDIR)$(datadir) \
199 $(DESTDIR)$(piddir) \
200 $(DESTDIR)$(lockdir) \
201 $(DESTDIR)$(logfilebase) \
202 $(DESTDIR)$(privatedir)/tls \
203 $(DESTDIR)$(includedir) \
204 $(DESTDIR)$(PKGCONFIGDIR) \
205 $(DESTDIR)$(sysconfdir) \
207 installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
208 @$(SHELL) $(srcdir)/script/installbin.sh \
210 $(DESTDIR)$(BASEDIR) \
211 $(DESTDIR)$(sbindir) \
212 $(DESTDIR)$(libdir) \
213 $(DESTDIR)$(localstatedir) \
215 @$(SHELL) $(srcdir)/script/installbin.sh \
217 $(DESTDIR)$(BASEDIR) \
218 $(DESTDIR)$(bindir) \
219 $(DESTDIR)$(libdir) \
220 $(DESTDIR)$(localstatedir) \
222 @$(SHELL) $(srcdir)/script/installtorture.sh \
224 $(DESTDIR)$(TORTUREDIR) \
229 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
230 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
231 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
233 installheader:: headers installdirs
234 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
236 installdat:: installdirs
237 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
239 installswat:: installdirs
240 #SWAT has been disabled until further notice
241 # @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(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)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
249 installpc:: installdirs
250 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
252 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
259 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(SBIN_PROGS)
260 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(BIN_PROGS)
261 @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
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 include $(srcdir)/selftest/config.mk
288 @echo ' pwd = '`/bin/pwd`