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 smbreadlinesrcdir := lib/smbreadline
67 libmessagingsrcdir := lib/messaging
68 libeventssrcdir := lib/events
69 libcmdlinesrcdir := lib/cmdline
70 socketwrappersrcdir := lib/socket_wrapper
71 nsswrappersrcdir := lib/nss_wrapper
72 appwebsrcdir := lib/appweb
73 libstreamsrcdir := lib/stream
74 libutilsrcdir := lib/util
75 libtdrsrcdir := lib/tdr
76 libdbwrapsrcdir := lib/dbwrap
77 libcryptosrcdir := lib/crypto
78 libtorturesrcdir := lib/torture
79 smb_serversrcdir := smb_server
80 libcompressionsrcdir := lib/compression
81 libgencachesrcdir := lib
83 rpc_serversrcdir := rpc_server
84 ldap_serversrcdir := ldap_server
85 web_serversrcdir := web_server
86 winbindsrcdir := winbind
87 nbt_serversrcdir := nbt_server
88 wrepl_serversrcdir := wrepl_server
89 cldap_serversrcdir := cldap_server
91 clientsrcdir := client
92 torturesrcdir := torture
95 librpcsrcdir := librpc
96 libclisrcdir := libcli
97 ejsscriptsrcdir := scripting/ejs
98 pyscriptsrcdir := $(srcdir)/scripting/python
103 BINARIES += $(BIN_PROGS) $(SBIN_PROGS)
105 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
107 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
110 ifeq ($(automatic_dependencies),yes)
111 ifneq ($(MAKECMDGOALS),clean)
112 ifneq ($(MAKECMDGOALS),distclean)
113 ifneq ($(MAKECMDGOALS),realdistclean)
114 ifneq ($(SKIP_DEP_FILES),yes)
115 -include $(DEP_FILES)
121 ifneq ($(SKIP_DEP_FILES),yes)
123 @echo Removing dependency files
124 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
127 include $(srcdir)/static_deps.mk
130 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
133 binaries:: $(BINARIES)
134 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
136 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
137 manpages:: $(MANPAGES)
138 all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods libraries headers
141 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
143 # 'make testsuite' creates all binaries which are
144 # needed by samba3's 'make test' and the build-farm
145 # scripts use that it as fallback in case
146 # 'make everything' fails
147 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
150 @echo 'Samba will be installed into:'
151 @echo ' basedir: $(BASEDIR)'
152 @echo ' bindir: $(bindir)'
153 @echo ' sbindir: $(sbindir)'
154 @echo ' libdir: $(libdir)'
155 @echo ' modulesdir: $(modulesdir)'
156 @echo ' includedir: $(includedir)'
157 @echo ' vardir: $(localstatedir)'
158 @echo ' privatedir: $(privatedir)'
159 @echo ' piddir: $(piddir)'
160 @echo ' lockdir: $(lockdir)'
161 @echo ' logfilebase: $(logfilebase)'
162 @echo ' setupdir: $(SETUPDIR)'
163 @echo ' jsdir: $(JSDIR)'
164 @echo ' swatdir: $(SWATDIR)'
165 @echo ' mandir: $(mandir)'
166 @echo ' torturedir: $(TORTUREDIR)'
167 @echo ' datadir: $(datadir)'
168 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
171 @echo ' srcdir = $(srcdir)'
172 @echo ' builddir = $(builddir)'
174 # The permissions to give the executables
177 install:: showlayout everything installbin installdat installswat installmisc \
178 installlib installheader installpc installplugins
180 # DESTDIR is used here to prevent packagers wasting their time
181 # duplicating the Makefile. Remove it and you will have the privilege
182 # of packaging each samba release for multiple versions of multiple
183 # distributions and operating systems, or at least supplying patches
184 # to all the packaging files required for this, prior to committing
185 # the removal of DESTDIR. Do not remove it even though you think it
189 @$(SHELL) $(srcdir)/script/installdirs.sh \
190 $(DESTDIR)$(BASEDIR) \
191 $(DESTDIR)$(bindir) \
192 $(DESTDIR)$(sbindir) \
193 $(DESTDIR)$(TORTUREDIR) \
194 $(DESTDIR)$(libdir) \
195 $(DESTDIR)$(modulesdir) \
196 $(DESTDIR)$(mandir) \
197 $(DESTDIR)$(localstatedir) \
198 $(DESTDIR)$(privatedir) \
199 $(DESTDIR)$(datadir) \
200 $(DESTDIR)$(piddir) \
201 $(DESTDIR)$(lockdir) \
202 $(DESTDIR)$(logfilebase) \
203 $(DESTDIR)$(privatedir)/tls \
204 $(DESTDIR)$(includedir) \
205 $(DESTDIR)$(PKGCONFIGDIR) \
206 $(DESTDIR)$(sysconfdir) \
208 installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
209 @$(SHELL) $(srcdir)/script/installbin.sh \
211 $(DESTDIR)$(BASEDIR) \
212 $(DESTDIR)$(sbindir) \
213 $(DESTDIR)$(libdir) \
214 $(DESTDIR)$(localstatedir) \
216 @$(SHELL) $(srcdir)/script/installbin.sh \
218 $(DESTDIR)$(BASEDIR) \
219 $(DESTDIR)$(bindir) \
220 $(DESTDIR)$(libdir) \
221 $(DESTDIR)$(localstatedir) \
223 @$(SHELL) $(srcdir)/script/installtorture.sh \
225 $(DESTDIR)$(TORTUREDIR) \
230 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
231 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
232 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
234 installheader:: headers installdirs
235 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
237 installdat:: installdirs
238 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
240 installswat:: installdirs
241 #SWAT has been disabled until further notice
242 # @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
244 installman:: manpages installdirs
245 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
247 installmisc:: installdirs
248 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
250 installpc:: installdirs
251 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
253 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
260 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(SBIN_PROGS)
261 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(BIN_PROGS)
262 @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
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 include $(srcdir)/selftest/config.mk
289 @echo ' pwd = '`/bin/pwd`