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 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
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 ejsscriptsrcdir
:= scripting
/ejs
101 pyscriptsrcdir
:= $(srcdir)/scripting
/python
103 ntp_signdsrcdir
:= ntp_signd
107 pythonmods
:: $(PYTHON_PYS
) $(PYTHON_SO
)
109 DEP_FILES
= $(patsubst %.ho
,%.hd
,$(patsubst %.o
,%.d
,$(ALL_OBJS
))) \
112 ifeq ($(automatic_dependencies
),yes
)
113 ifneq ($(MAKECMDGOALS
),clean)
114 ifneq ($(MAKECMDGOALS
),distclean)
115 ifneq ($(MAKECMDGOALS
),realdistclean
)
116 ifneq ($(SKIP_DEP_FILES
),yes
)
117 -include $(DEP_FILES
)
123 ifneq ($(SKIP_DEP_FILES
),yes
)
125 @echo Removing dependency files
126 @find .
-name
'*.d' -o
-name
'*.hd' | xargs
rm -f
129 include $(srcdir)/static_deps.mk
132 DEFAULT_HEADERS
= $(srcdir)/lib
/util
/dlinklist.h \
135 libraries
:: $(STATIC_LIBS
) $(SHARED_LIBS
)
137 headers
:: $(PUBLIC_HEADERS
) $(DEFAULT_HEADERS
)
138 manpages
:: $(MANPAGES
)
139 all:: showflags
$(ALL_PREDEP
) binaries modules pythonmods libraries headers
142 LD_LIBPATH_OVERRIDE
= $(LIB_PATH_VAR
)=$(builddir
)/bin
/shared
144 # 'make testsuite' creates all binaries which are
145 # needed by samba3's 'make test' and the build-farm
146 # scripts use that it as fallback in case
147 # 'make everything' fails
148 testsuite
:: bin
/smbclient bin
/cifsdd bin
/smbtorture bin
/nmblookup
151 @echo
'Samba will be installed into:'
152 @echo
' basedir: $(BASEDIR)'
153 @echo
' bindir: $(bindir)'
154 @echo
' sbindir: $(sbindir)'
155 @echo
' libdir: $(libdir)'
156 @echo
' modulesdir: $(modulesdir)'
157 @echo
' includedir: $(includedir)'
158 @echo
' vardir: $(localstatedir)'
159 @echo
' privatedir: $(privatedir)'
160 @echo
' piddir: $(piddir)'
161 @echo
' lockdir: $(lockdir)'
162 @echo
' logfilebase: $(logfilebase)'
163 @echo
' setupdir: $(SETUPDIR)'
164 @echo
' jsdir: $(JSDIR)'
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)'
173 @echo
' srcdir = $(srcdir)'
174 @echo
' builddir = $(builddir)'
176 # The permissions to give the executables
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
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
:: $(SBIN_PROGS
) $(BIN_PROGS
) $(TORTURE_PROGS
) installdirs
213 @
$(SHELL
) $(srcdir)/script
/installtorture.sh \
215 $(DESTDIR
)$(TORTUREDIR
) \
220 installlib
:: $(SHARED_LIBS
) $(STATIC_LIBS
) installdirs
221 @
$(SHELL
) $(srcdir)/script
/installlib.sh
$(DESTDIR
)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS
)
222 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
224 installheader
:: headers
installdirs
225 @
srcdir=$(srcdir) builddir
=$(builddir
) $(PERL
) $(srcdir)/script
/installheader.pl
$(DESTDIR
)$(includedir) $(PUBLIC_HEADERS
) $(DEFAULT_HEADERS
)
227 installdat
:: installdirs
228 @
$(SHELL
) $(srcdir)/script
/installdat.sh
$(DESTDIR
)$(datadir) $(srcdir)
230 installswat
:: installdirs
231 #SWAT has been disabled until further notice
232 # @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
234 installman
:: manpages
installdirs
235 @
$(SHELL
) $(srcdir)/script
/installman.sh
$(DESTDIR
)$(mandir) $(MANPAGES
)
237 installmisc
:: installdirs
238 @
$(SHELL
) $(srcdir)/script
/installmisc.sh
$(srcdir) $(DESTDIR
)$(JSDIR
) $(DESTDIR
)$(SETUPDIR
) $(DESTDIR
)$(bindir)
240 installpc
:: installdirs
241 @
$(SHELL
) $(srcdir)/script
/installpc.sh
$(builddir
) $(DESTDIR
)$(PKGCONFIGDIR
) $(PC_FILES
)
243 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
249 $(DESTDIR
)$(bindir)/%: bin
/% installdirs
251 @echo Installing
$(@F
) as $@
252 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
254 @chmod
$(INSTALLPERMS
) $@
256 $(DESTDIR
)$(sbindir
)/%: bin
/% installdirs
258 @echo Installing
$(@F
) as $@
259 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
261 @chmod
$(INSTALLPERMS
) $@
264 @
$(SHELL
) $(srcdir)/script
/uninstallbin.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(sbindir
) $(DESTDIR
)$(libdir) $(DESTDIR
)$(localstatedir
) $(DESTDIR
)$(SBIN_PROGS
)
265 @
$(SHELL
) $(srcdir)/script
/uninstallbin.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(bindir) $(DESTDIR
)$(libdir) $(DESTDIR
)$(localstatedir
) $(DESTDIR
)$(BIN_PROGS
)
266 @
$(SHELL
) $(srcdir)/script
/uninstalltorture.sh
$(DESTDIR
)$(TORTUREDIR
) $(TORTURE_PROGS
)
269 @
$(SHELL
) $(srcdir)/script
/uninstalllib.sh
$(DESTDIR
)$(libdir) $(SHARED_LIBS
)
270 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS)
273 @
$(SHELL
) $(srcdir)/script
/uninstallheader.sh
$(DESTDIR
)$(includedir) $(PUBLIC_HEADERS
)
276 @
$(SHELL
) $(srcdir)/script
/uninstallman.sh
$(DESTDIR
)$(mandir) $(MANPAGES
)
281 @echo
"config.status does not exist. Please run ./configure."
284 data.mk
: config.status
$(MK_FILES
)
289 include $(pidldir
)/config.mk
290 selftestdir
:= $(srcdir)/selftest
291 include $(selftestdir
)/config.mk
294 @echo
' pwd = '`/bin/pwd`