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 include $(srcdir)/build
/make
/rules.mk
51 include $(srcdir)/build
/make
/python.mk
52 zlibsrcdir
:= ..
/lib
/zlib
53 dynconfigsrcdir
:= dynconfig
54 heimdalsrcdir
:= heimdal
57 clustersrcdir
:= cluster
58 libnetsrcdir
:= libnet
60 nsswitchsrcdir
:= ..
/nsswitch
62 libsocketsrcdir
:= lib
/socket
63 libcharsetsrcdir
:= ..
/lib
/util
/charset
64 ldb_sambasrcdir
:= lib
/ldb-samba
65 tdbsrcdir
:= ..
/lib
/tdb
67 libtlssrcdir
:= lib
/tls
68 libregistrysrcdir
:= lib
/registry
69 smbreadlinesrcdir
:= lib
/smbreadline
70 libmessagingsrcdir
:= lib
/messaging
71 libteventsrcdir
:= ..
/lib
/tevent
72 libeventssrcdir
:= lib
/events
73 libcmdlinesrcdir
:= lib
/cmdline
74 poptsrcdir
:= ..
/lib
/popt
75 socketwrappersrcdir
:= ..
/lib
/socket_wrapper
76 nsswrappersrcdir
:= ..
/lib
/nss_wrapper
77 appwebsrcdir
:= lib
/appweb
78 libstreamsrcdir
:= lib
/stream
79 libutilsrcdir
:= ..
/lib
/util
80 libtdrsrcdir
:= lib
/tdr
81 libcryptosrcdir
:= ..
/lib
/crypto
82 libtorturesrcdir
:= ..
/lib
/torture
83 smb_serversrcdir
:= smb_server
84 libcompressionsrcdir
:= ..
/lib
/compression
85 libgencachesrcdir
:= lib
87 rpc_serversrcdir
:= rpc_server
88 ldap_serversrcdir
:= ldap_server
89 web_serversrcdir
:= web_server
90 winbindsrcdir
:= winbind
91 nbt_serversrcdir
:= nbt_server
92 wrepl_serversrcdir
:= wrepl_server
93 cldap_serversrcdir
:= cldap_server
95 clientsrcdir
:= client
96 torturesrcdir
:= torture
99 librpcsrcdir
:= librpc
100 libclisrcdir
:= libcli
101 libclicommonsrcdir
:= ..
/libcli
102 libclinbtsrcdir
:= ..
/libcli
/nbt
103 pyscriptsrcdir
:= $(srcdir)/scripting
/python
105 ntp_signdsrcdir
:= ntp_signd
107 tallocsrcdir
:= ..
/lib
/talloc
108 comsrcdir
:= $(srcdir)/lib
/com
112 $(foreach SCRIPT
,$(wildcard scripting
/bin
/*),$(eval
$(call binary_install_template
,$(SCRIPT
))))
114 $(DESTDIR
)$(bindir)/%: scripting
/bin
/% installdirs
116 @echo Installing
$(@F
) as $@
117 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
119 @chmod
$(INSTALLPERMS
) $@
121 pythonmods
:: $(PYTHON_PYS
) $(PYTHON_SO
)
123 DEP_FILES
= $(patsubst %.ho
,%.hd
,$(patsubst %.o
,%.d
,$(ALL_OBJS
))) \
126 ifeq ($(automatic_dependencies
),yes
)
127 ifneq ($(MAKECMDGOALS
),clean)
128 ifneq ($(MAKECMDGOALS
),distclean)
129 ifneq ($(MAKECMDGOALS
),realdistclean
)
130 ifneq ($(SKIP_DEP_FILES
),yes
)
131 -include $(DEP_FILES
)
137 ifneq ($(SKIP_DEP_FILES
),yes
)
139 @echo Removing dependency files
140 @find .
-name
'*.d' -o
-name
'*.hd' | xargs
rm -f
143 include $(srcdir)/static_deps.mk
147 @find ..
/lib ..
/libcli ..
/librpc ..
/nsswitch
-name
'*.o' -o
-name
'*.ho' | xargs
rm -f
149 PUBLIC_HEADERS
+= .
/version.h
151 libraries
:: $(STATIC_LIBS
) $(SHARED_LIBS
)
153 headers
:: $(PUBLIC_HEADERS
)
154 manpages
:: $(MANPAGES
)
155 all:: showflags
$(ALL_PREDEP
) binaries modules pythonmods libraries headers
158 LD_LIBPATH_OVERRIDE
= $(LIB_PATH_VAR
)=$(shliboutputdir
)
160 # 'make testsuite' creates all binaries which are
161 # needed by samba3's 'make test' and the build-farm
162 # scripts use that it as fallback in case
163 # 'make everything' fails
164 testsuite
:: bin
/smbclient bin
/cifsdd bin
/smbtorture bin
/nmblookup
167 @echo
'Samba will be installed into:'
168 @echo
' basedir: $(basedir)'
169 @echo
' bindir: $(bindir)'
170 @echo
' sbindir: $(sbindir)'
171 @echo
' libdir: $(libdir)'
172 @echo
' modulesdir: $(modulesdir)'
173 @echo
' includedir: $(includedir)'
174 @echo
' vardir: $(localstatedir)'
175 @echo
' privatedir: $(privatedir)'
176 @echo
' piddir: $(piddir)'
177 @echo
' lockdir: $(lockdir)'
178 @echo
' logfilebase: $(logfilebase)'
179 @echo
' setupdir: $(setupdir)'
180 @echo
' swatdir: $(swatdir)'
181 @echo
' mandir: $(mandir)'
182 @echo
' torturedir: $(torturedir)'
183 @echo
' datadir: $(datadir)'
184 @echo
' winbindd_socket_dir: $(winbindd_socket_dir)'
185 @echo
' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
188 @echo
' srcdir = $(srcdir)'
189 @echo
' builddir = $(builddir)'
191 # The permissions to give the executables
194 install:: showlayout everything installbin installsbin installdat installmisc \
195 installlib installheader installpc installplugins
197 # DESTDIR is used here to prevent packagers wasting their time
198 # duplicating the Makefile. Remove it and you will have the privilege
199 # of packaging each samba release for multiple versions of multiple
200 # distributions and operating systems, or at least supplying patches
201 # to all the packaging files required for this, prior to committing
202 # the removal of DESTDIR. Do not remove it even though you think it
206 @
$(SHELL
) $(srcdir)/script
/installdirs.sh \
207 $(DESTDIR
)$(basedir
) \
208 $(DESTDIR
)$(bindir) \
209 $(DESTDIR
)$(sbindir
) \
210 $(DESTDIR
)$(torturedir
) \
211 $(DESTDIR
)$(libdir) \
212 $(DESTDIR
)$(modulesdir
) \
213 $(DESTDIR
)$(mandir) \
214 $(DESTDIR
)$(localstatedir
) \
215 $(DESTDIR
)$(localstatedir
)/lib \
216 $(DESTDIR
)$(localstatedir
)/run \
217 $(DESTDIR
)$(privatedir
) \
218 $(DESTDIR
)$(datadir) \
219 $(DESTDIR
)$(piddir
) \
220 $(DESTDIR
)$(lockdir
) \
221 $(DESTDIR
)$(logfilebase
) \
222 $(DESTDIR
)$(privatedir
)/tls \
223 $(DESTDIR
)$(includedir) \
224 $(DESTDIR
)$(pkgconfigdir
) \
225 $(DESTDIR
)$(sysconfdir
)
227 installbin
:: installdirs
231 installlib
:: $(SHARED_LIBS
) $(STATIC_LIBS
) installdirs
232 @
$(SHELL
) $(srcdir)/script
/installlib.sh
$(DESTDIR
)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS
)
233 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
235 installheader
:: headers
installdirs
236 @
srcdir=$(srcdir) builddir
=$(builddir
) $(PERL
) $(srcdir)/script
/installheader.pl
$(DESTDIR
)$(includedir) $(PUBLIC_HEADERS
)
238 installdat
:: installdirs
239 @
$(SHELL
) $(srcdir)/script
/installdat.sh
$(DESTDIR
)$(datadir) $(srcdir)
241 installman
:: manpages
installdirs
242 @
$(SHELL
) $(srcdir)/script
/installman.sh
$(DESTDIR
)$(mandir) $(MANPAGES
)
244 installmisc
:: installdirs
245 @
$(SHELL
) $(srcdir)/script
/installmisc.sh
$(srcdir) $(DESTDIR
)$(setupdir
)
247 installpc
:: installdirs
248 @
$(SHELL
) $(srcdir)/script
/installpc.sh
$(builddir
) $(DESTDIR
)$(pkgconfigdir
) $(PC_FILES
)
250 uninstall:: uninstallbin uninstallsbin uninstalldat uninstallmisc uninstalllib uninstallheader \
251 uninstallman uninstallpc uninstallplugins
254 @echo
"Removing MISC files"
255 @
rm -rf
$(DESTDIR
)$(setupdir
)/*
257 $(DESTDIR
)$(bindir)/%: bin
/% installdirs
259 @echo Installing
$(@F
) as $@
260 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
262 @chmod
$(INSTALLPERMS
) $@
264 $(DESTDIR
)$(sbindir
)/%: bin
/% installdirs
266 @echo Installing
$(@F
) as $@
267 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
269 @chmod
$(INSTALLPERMS
) $@
272 @echo
"Removing DAT files"
273 @
rm -fr
$(DESTDIR
)$(datadir)/*
278 @echo
"Removing libraries"
279 @
$(SHELL
) $(srcdir)/script
/uninstalllib.sh
$(DESTDIR
)$(libdir) $(SHARED_LIBS
)
282 @echo
"Removing headers"
283 @
rm -fr
$(DESTDIR
)$(includedir)/*
286 @echo
"Removing manpages"
287 @
$(SHELL
) $(srcdir)/script
/uninstallman.sh
$(DESTDIR
)$(mandir) $(MANPAGES
)
292 @echo
"Removing package configurations"
293 @cd
$(DESTDIR
)$(pkgconfigdir
); rm -f
$(notdir $(PC_FILES
))
296 @echo
"config.status does not exist. Please run ./configure."
299 data.mk
: config.status
$(MK_FILES
)
304 include $(pidldir
)/config.mk
305 selftestdir
:= $(srcdir)/..
/selftest
306 include $(srcdir)/selftest
/config.mk
309 @echo
' pwd = '`/bin/pwd`