2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
11 pidldir
:= $(srcdir)/..
/pidl
14 torturedir
= $(libdir)/torture
15 swatdir
= $(datadir)/swat
16 setupdir
= $(datadir)/setup
17 ncalrpcdir
= $(localstatedir
)/ncalrpc
20 BNLD_FLAGS
= $(LDFLAGS
) $(SYS_LDFLAGS
)
22 HOSTCC_FLAGS
= -D_SAMBA_HOSTCC_
$(CFLAGS
)
23 HOSTLD_FLAGS
= $(LDFLAGS
) $(SYS_LDFLAGS
)
25 $(srcdir)/version.h
: $(srcdir)/VERSION
26 @
$(SHELL
) script
/mkversion.sh VERSION
$(srcdir)/version.h
$(srcdir)/
28 ifneq ($(automatic_dependencies
),yes
)
34 @
$(SHELL
) script
/mkversion.sh VERSION
$(srcdir)/version.h
$(srcdir)/
37 @echo
"Removing precompiled headers"
38 @
-rm -f
include/includes.h.gch
40 pch
:: clean_pch
include/includes.h.gch
44 ifneq ($(automatic_dependencies
),yes
)
49 include $(srcdir)/build
/make
/rules.mk
50 include $(srcdir)/build
/make
/python.mk
51 zlibsrcdir
:= ..
/lib
/zlib
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 tdbsrcdir
:= ..
/lib
/tdb
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 libclinbtsrcdir
:= ..
/libcli
/nbt
101 pyscriptsrcdir
:= $(srcdir)/scripting
/python
103 ntp_signdsrcdir
:= ntp_signd
105 tallocsrcdir
:= ..
/lib
/talloc
106 comsrcdir
:= $(srcdir)/lib
/com
110 $(foreach SCRIPT
,$(wildcard scripting
/bin
/*),$(eval
$(call binary_install_template
,$(SCRIPT
))))
112 $(DESTDIR
)$(bindir)/%: scripting
/bin
/% installdirs
114 @echo Installing
$(@F
) as $@
115 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
117 @chmod
$(INSTALLPERMS
) $@
119 pythonmods
:: $(PYTHON_PYS
) $(PYTHON_SO
)
121 DEP_FILES
= $(patsubst %.ho
,%.hd
,$(patsubst %.o
,%.d
,$(ALL_OBJS
))) \
124 ifeq ($(automatic_dependencies
),yes
)
125 ifneq ($(MAKECMDGOALS
),clean)
126 ifneq ($(MAKECMDGOALS
),distclean)
127 ifneq ($(MAKECMDGOALS
),realdistclean
)
128 ifneq ($(SKIP_DEP_FILES
),yes
)
129 -include $(DEP_FILES
)
135 ifneq ($(SKIP_DEP_FILES
),yes
)
137 @echo Removing dependency files
138 @find .
-name
'*.d' -o
-name
'*.hd' | xargs
rm -f
141 include $(srcdir)/static_deps.mk
145 @find ..
/lib ..
/libcli
-name
'*.o' -o
-name
'*.ho' | xargs
rm -f
147 DEFAULT_HEADERS
= $(srcdir)/..
/lib
/util
/dlinklist.h \
150 libraries
:: $(STATIC_LIBS
) $(SHARED_LIBS
)
152 headers
:: $(PUBLIC_HEADERS
) $(DEFAULT_HEADERS
)
153 manpages
:: $(MANPAGES
)
154 all:: showflags
$(ALL_PREDEP
) binaries modules pythonmods libraries headers
157 LD_LIBPATH_OVERRIDE
= $(LIB_PATH_VAR
)=$(builddir
)/bin
/shared
159 # 'make testsuite' creates all binaries which are
160 # needed by samba3's 'make test' and the build-farm
161 # scripts use that it as fallback in case
162 # 'make everything' fails
163 testsuite
:: bin
/smbclient bin
/cifsdd bin
/smbtorture bin
/nmblookup
166 @echo
'Samba will be installed into:'
167 @echo
' basedir: $(basedir)'
168 @echo
' bindir: $(bindir)'
169 @echo
' sbindir: $(sbindir)'
170 @echo
' libdir: $(libdir)'
171 @echo
' modulesdir: $(modulesdir)'
172 @echo
' includedir: $(includedir)'
173 @echo
' vardir: $(localstatedir)'
174 @echo
' privatedir: $(privatedir)'
175 @echo
' piddir: $(piddir)'
176 @echo
' lockdir: $(lockdir)'
177 @echo
' logfilebase: $(logfilebase)'
178 @echo
' setupdir: $(setupdir)'
179 @echo
' swatdir: $(swatdir)'
180 @echo
' mandir: $(mandir)'
181 @echo
' torturedir: $(torturedir)'
182 @echo
' datadir: $(datadir)'
183 @echo
' winbindd_socket_dir: $(winbindd_socket_dir)'
184 @echo
' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
187 @echo
' srcdir = $(srcdir)'
188 @echo
' builddir = $(builddir)'
190 # The permissions to give the executables
193 install:: showlayout everything installbin installsbin installdat installmisc \
194 installlib installheader installpc installplugins
196 # DESTDIR is used here to prevent packagers wasting their time
197 # duplicating the Makefile. Remove it and you will have the privilege
198 # of packaging each samba release for multiple versions of multiple
199 # distributions and operating systems, or at least supplying patches
200 # to all the packaging files required for this, prior to committing
201 # the removal of DESTDIR. Do not remove it even though you think it
205 @
$(SHELL
) $(srcdir)/script
/installdirs.sh \
206 $(DESTDIR
)$(basedir
) \
207 $(DESTDIR
)$(bindir) \
208 $(DESTDIR
)$(sbindir
) \
209 $(DESTDIR
)$(torturedir
) \
210 $(DESTDIR
)$(libdir) \
211 $(DESTDIR
)$(modulesdir
) \
212 $(DESTDIR
)$(mandir) \
213 $(DESTDIR
)$(localstatedir
) \
214 $(DESTDIR
)$(localstatedir
)/lib \
215 $(DESTDIR
)$(localstatedir
)/run \
216 $(DESTDIR
)$(privatedir
) \
217 $(DESTDIR
)$(datadir) \
218 $(DESTDIR
)$(piddir
) \
219 $(DESTDIR
)$(lockdir
) \
220 $(DESTDIR
)$(logfilebase
) \
221 $(DESTDIR
)$(privatedir
)/tls \
222 $(DESTDIR
)$(includedir) \
223 $(DESTDIR
)$(pkgconfigdir
) \
224 $(DESTDIR
)$(sysconfdir
)
226 installbin
:: installdirs
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 installman
:: manpages
installdirs
241 @
$(SHELL
) $(srcdir)/script
/installman.sh
$(DESTDIR
)$(mandir) $(MANPAGES
)
243 installmisc
:: installdirs
244 @
$(SHELL
) $(srcdir)/script
/installmisc.sh
$(srcdir) $(DESTDIR
)$(setupdir
)
246 installpc
:: installdirs
247 @
$(SHELL
) $(srcdir)/script
/installpc.sh
$(builddir
) $(DESTDIR
)$(pkgconfigdir
) $(PC_FILES
)
249 uninstall:: uninstallbin uninstallsbin uninstalldat uninstallmisc uninstalllib uninstallheader \
250 uninstallman uninstallpc uninstallplugins
253 @echo
"Removing MISC files"
254 @
rm -rf
$(DESTDIR
)$(setupdir
)/*
256 $(DESTDIR
)$(bindir)/%: bin
/% installdirs
258 @echo Installing
$(@F
) as $@
259 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
261 @chmod
$(INSTALLPERMS
) $@
263 $(DESTDIR
)$(sbindir
)/%: bin
/% installdirs
265 @echo Installing
$(@F
) as $@
266 @if
test -f
$@
; then echo
-n
""; rm -f
$@.old
; mv
$@
$@.old
; fi
268 @chmod
$(INSTALLPERMS
) $@
271 @echo
"Removing DAT files"
272 @
rm -fr
$(DESTDIR
)$(datadir)/*
277 @echo
"Removing libraries"
278 @
$(SHELL
) $(srcdir)/script
/uninstalllib.sh
$(DESTDIR
)$(libdir) $(SHARED_LIBS
)
281 @echo
"Removing headers"
282 @
rm -fr
$(DESTDIR
)$(includedir)/*
285 @echo
"Removing manpages"
286 @
$(SHELL
) $(srcdir)/script
/uninstallman.sh
$(DESTDIR
)$(mandir) $(MANPAGES
)
291 @echo
"Removing package configurations"
292 @cd
$(DESTDIR
)$(pkgconfigdir
); rm -f
$(notdir $(PC_FILES
))
295 @echo
"config.status does not exist. Please run ./configure."
298 data.mk
: config.status
$(MK_FILES
)
303 include $(pidldir
)/config.mk
304 selftestdir
:= $(srcdir)/selftest
305 include $(selftestdir
)/config.mk
308 @echo
' pwd = '`/bin/pwd`