2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
11 pidldir
:= $(srcdir)/..
/pidl
14 torturedir
= ..
/lib
/torture
15 swatdir
= $(datadir)/swat
16 setupdir
= $(datadir)/setup
17 ncalrpcdir
= $(localstatedir
)/ncalrpc
18 shliboutputdir
= $(builddir
)/bin
/shared
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 base_srcdirs
= $(srcdir) ..
/librpc
/ ..
/lib
/ ..
/libcli ..
/libgpo ..
/nsswitch ..
/libds
52 include $(srcdir)/build
/make
/rules.mk
53 include $(srcdir)/build
/make
/python.mk
54 zlibsrcdir
:= ..
/lib
/zlib
55 dynconfigsrcdir
:= dynconfig
56 heimdalsrcdir
:= heimdal
59 clustersrcdir
:= cluster
60 libnetsrcdir
:= libnet
62 nsswitchsrcdir
:= ..
/nsswitch
63 libwbclientsrcdir
:= ..
/nsswitch
/libwbclient
65 libsocketsrcdir
:= lib
/socket
66 libcharsetsrcdir
:= ..
/lib
/util
/charset
67 ldb_sambasrcdir
:= lib
/ldb-samba
68 tdbsrcdir
:= ..
/lib
/tdb
70 libtlssrcdir
:= lib
/tls
71 libregistrysrcdir
:= lib
/registry
72 smbreadlinesrcdir
:= lib
/smbreadline
73 libmessagingsrcdir
:= lib
/messaging
74 libteventsrcdir
:= ..
/lib
/tevent
75 libeventssrcdir
:= lib
/events
76 libcmdlinesrcdir
:= lib
/cmdline
77 poptsrcdir
:= ..
/lib
/popt
78 socketwrappersrcdir
:= ..
/lib
/socket_wrapper
79 nsswrappersrcdir
:= ..
/lib
/nss_wrapper
80 uidwrappersrcdir
:= ..
/lib
/uid_wrapper
81 appwebsrcdir
:= lib
/appweb
82 libstreamsrcdir
:= lib
/stream
83 libutilsrcdir
:= ..
/lib
/util
84 libtdrsrcdir
:= ..
/lib
/tdr
85 libcryptosrcdir
:= ..
/lib
/crypto
86 libtorturesrcdir
:= ..
/lib
/torture
87 smb_serversrcdir
:= smb_server
88 libcompressionsrcdir
:= ..
/lib
/compression
89 libgencachesrcdir
:= lib
91 rpc_serversrcdir
:= rpc_server
92 ldap_serversrcdir
:= ldap_server
93 web_serversrcdir
:= web_server
94 winbindsrcdir
:= winbind
95 nbt_serversrcdir
:= nbt_server
96 wrepl_serversrcdir
:= wrepl_server
97 cldap_serversrcdir
:= cldap_server
99 clientsrcdir
:= client
100 torturesrcdir
:= torture
103 librpcsrcdir
:= librpc
104 libclisrcdir
:= libcli
105 libclicommonsrcdir
:= ..
/libcli
106 libclinbtsrcdir
:= ..
/libcli
/nbt
107 pyscriptsrcdir
:= $(srcdir)/scripting
/python
109 ntp_signdsrcdir
:= ntp_signd
111 tallocsrcdir
:= ..
/lib
/talloc
112 comsrcdir
:= $(srcdir)/lib
/com
117 INSTALL_SCRIPTS
= $(addprefix scripting
/bin
/, \
123 $(foreach SCRIPT
,$(INSTALL_SCRIPTS
),$(eval
$(call binary_install_template
,$(SCRIPT
))))
125 $(DESTDIR
)$(bindir)/%: scripting
/bin
/% installdirs
127 @echo Installing
$(@F
) as $@
128 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
130 @chmod
$(INSTALLPERMS
) $@
132 pythonmods
:: $(PYTHON_PYS
) $(PYTHON_SO
)
134 DEP_FILES
= $(patsubst %.ho
,%.hd
,$(patsubst %.o
,%.d
,$(ALL_OBJS
))) \
137 ifeq ($(automatic_dependencies
),yes
)
138 ifneq ($(MAKECMDGOALS
),clean)
139 ifneq ($(MAKECMDGOALS
),distclean)
140 ifneq ($(MAKECMDGOALS
),realdistclean
)
141 ifneq ($(SKIP_DEP_FILES
),yes
)
142 -include $(DEP_FILES
)
148 ifneq ($(SKIP_DEP_FILES
),yes
)
150 @echo Removing dependency files
151 @find .
-name
'*.d' -o
-name
'*.hd' | xargs
rm -f
154 include $(srcdir)/static_deps.mk
158 @find
$(base_srcdirs
) -name
'*.o' -o
-name
'*.ho' | xargs
rm -f
160 PUBLIC_HEADERS
+= .
/version.h
162 libraries
:: $(STATIC_LIBS
) $(SHARED_LIBS
)
164 headers
:: $(PUBLIC_HEADERS
)
165 manpages
:: $(MANPAGES
)
166 all:: showflags
$(ALL_PREDEP
) binaries modules pythonmods libraries headers
169 LD_LIBPATH_OVERRIDE
= $(LIB_PATH_VAR
)=$(shliboutputdir
):$$$(LIB_PATH_VAR
)
171 # 'make testsuite' creates all binaries which are
172 # needed by samba3's 'make test' and the build-farm
173 # scripts use that it as fallback in case
174 # 'make everything' fails
175 testsuite
:: bin
/smbclient bin
/cifsdd bin
/smbtorture bin
/nmblookup
178 @echo
'Samba will be installed into:'
179 @echo
' basedir: $(basedir)'
180 @echo
' bindir: $(bindir)'
181 @echo
' sbindir: $(sbindir)'
182 @echo
' libdir: $(libdir)'
183 @echo
' modulesdir: $(modulesdir)'
184 @echo
' includedir: $(includedir)'
185 @echo
' vardir: $(localstatedir)'
186 @echo
' privatedir: $(privatedir)'
187 @echo
' piddir: $(piddir)'
188 @echo
' lockdir: $(lockdir)'
189 @echo
' logfilebase: $(logfilebase)'
190 @echo
' setupdir: $(setupdir)'
191 @echo
' swatdir: $(swatdir)'
192 @echo
' mandir: $(mandir)'
193 @echo
' torturedir: $(torturedir)'
194 @echo
' datadir: $(datadir)'
195 @echo
' winbindd_socket_dir: $(winbindd_socket_dir)'
196 @echo
' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
199 @echo
' srcdir = $(srcdir)'
200 @echo
' builddir = $(builddir)'
202 # The permissions to give the executables
205 install:: showlayout everything installbin installsbin installdat installmisc \
206 installlib installheader installpc installplugins
208 # DESTDIR is used here to prevent packagers wasting their time
209 # duplicating the Makefile. Remove it and you will have the privilege
210 # of packaging each samba release for multiple versions of multiple
211 # distributions and operating systems, or at least supplying patches
212 # to all the packaging files required for this, prior to committing
213 # the removal of DESTDIR. Do not remove it even though you think it
217 @
$(SHELL
) $(srcdir)/script
/installdirs.sh \
218 $(DESTDIR
)$(basedir
) \
219 $(DESTDIR
)$(bindir) \
220 $(DESTDIR
)$(sbindir
) \
221 $(DESTDIR
)$(torturedir
) \
222 $(DESTDIR
)$(libdir) \
223 $(DESTDIR
)$(modulesdir
) \
224 $(DESTDIR
)$(mandir) \
225 $(DESTDIR
)$(localstatedir
) \
226 $(DESTDIR
)$(localstatedir
)/lib \
227 $(DESTDIR
)$(localstatedir
)/run \
228 $(DESTDIR
)$(privatedir
) \
229 $(DESTDIR
)$(datadir) \
230 $(DESTDIR
)$(piddir
) \
231 $(DESTDIR
)$(lockdir
) \
232 $(DESTDIR
)$(logfilebase
) \
233 $(DESTDIR
)$(privatedir
)/tls \
234 $(DESTDIR
)$(includedir) \
235 $(DESTDIR
)$(pkgconfigdir
) \
236 $(DESTDIR
)$(sysconfdir
)
238 installbin
:: installdirs
242 installlib
:: $(SHARED_LIBS
) $(STATIC_LIBS
) installdirs
243 @
$(SHELL
) $(srcdir)/script
/installlib.sh
$(DESTDIR
)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS
)
244 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
246 installheader
:: headers
installdirs
247 @
srcdir=$(srcdir) builddir
=$(builddir
) $(PERL
) $(srcdir)/script
/installheader.pl
$(DESTDIR
)$(includedir) $(PUBLIC_HEADERS
)
249 installdat
:: installdirs
250 @
$(SHELL
) $(srcdir)/script
/installdat.sh
$(DESTDIR
)$(datadir) $(srcdir)
252 installman
:: manpages
installdirs
253 @
$(SHELL
) $(srcdir)/script
/installman.sh
$(DESTDIR
)$(mandir) $(MANPAGES
)
255 installmisc
:: installdirs
256 @
$(SHELL
) $(srcdir)/script
/installmisc.sh
$(srcdir) $(DESTDIR
)$(setupdir
)
258 installpc
:: installdirs
259 @
$(SHELL
) $(srcdir)/script
/installpc.sh
$(builddir
) $(DESTDIR
)$(pkgconfigdir
) $(PC_FILES
)
261 uninstall:: uninstallbin uninstallsbin uninstalldat uninstallmisc uninstalllib uninstallheader \
262 uninstallman uninstallpc uninstallplugins
265 @echo
"Removing MISC files"
266 @
rm -rf
$(DESTDIR
)$(setupdir
)/*
268 $(DESTDIR
)$(bindir)/%: bin
/% installdirs
270 @echo Installing
$(@F
) as $@
271 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
273 @chmod
$(INSTALLPERMS
) $@
275 $(DESTDIR
)$(sbindir
)/%: bin
/% installdirs
277 @echo Installing
$(@F
) as $@
278 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
280 @chmod
$(INSTALLPERMS
) $@
283 @echo
"Removing DAT files"
284 @
rm -fr
$(DESTDIR
)$(datadir)/*
289 @echo
"Removing libraries"
290 @
$(SHELL
) $(srcdir)/script
/uninstalllib.sh
$(DESTDIR
)$(libdir) $(SHARED_LIBS
)
293 @echo
"Removing headers"
294 @
rm -fr
$(DESTDIR
)$(includedir)/*
297 @echo
"Removing manpages"
298 @
$(SHELL
) $(srcdir)/script
/uninstallman.sh
$(DESTDIR
)$(mandir) $(MANPAGES
)
303 @echo
"Removing package configurations"
304 @cd
$(DESTDIR
)$(pkgconfigdir
); rm -f
$(notdir $(PC_FILES
))
307 @echo
"config.status does not exist. Please run ./configure."
310 data.mk
: config.status
$(MK_FILES
)
315 include $(pidldir
)/config.mk
316 selftestdir
:= $(srcdir)/..
/selftest
317 include $(srcdir)/selftest
/config.mk
320 @echo
' pwd = '`/bin/pwd`