s3:srv_samr_nt - another fix for the reject reason
[Samba/ekacnet.git] / source4 / Makefile
blob03b4e7364aa3b3fc3a06a9be58802de306dfec40
1 #!gmake
2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
5 .DEFAULT_GOAL := all
7 default: all
9 include mkconfig.mk
11 pidldir := $(srcdir)/../pidl
13 basedir = $(prefix)
14 torturedir = ../lib/torture
15 swatdir = $(datadir)/swat
16 setupdir = $(datadir)/setup
17 ncalrpcdir = $(localstatedir)/ncalrpc
18 shliboutputdir = $(builddir)/bin/shared
20 BNLD = $(LD)
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)
30 ALL_PREDEP = basics
31 .NOTPARALLEL:
32 endif
34 regen_version::
35 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
37 clean_pch::
38 @echo "Removing precompiled headers"
39 @-rm -f include/includes.h.gch
41 pch:: clean_pch include/includes.h.gch
43 .DEFAULT_GOAL := all
45 ifneq ($(automatic_dependencies),yes)
46 ALL_PREDEP = basics
47 .NOTPARALLEL:
48 endif
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
57 dsdbsrcdir := dsdb
58 smbdsrcdir := smbd
59 clustersrcdir := cluster
60 libnetsrcdir := libnet
61 authsrcdir := auth
62 nsswitchsrcdir := ../nsswitch
63 libwbclientsrcdir := ../nsswitch/libwbclient
64 libsrcdir := lib
65 libsocketsrcdir := lib/socket
66 libcharsetsrcdir := ../lib/util/charset
67 ldb_sambasrcdir := lib/ldb-samba
68 tdbsrcdir := ../lib/tdb
69 ldbsrcdir := lib/ldb
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
90 paramsrcdir := param
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
98 utilssrcdir := utils
99 clientsrcdir := client
100 torturesrcdir := torture
101 ntvfssrcdir := ntvfs
102 ntptrsrcdir := ntptr
103 librpcsrcdir := librpc
104 libclisrcdir := libcli
105 libclicommonsrcdir := ../libcli
106 libclinbtsrcdir := ../libcli/nbt
107 pyscriptsrcdir := $(srcdir)/scripting/python
108 kdcsrcdir := kdc
109 ntp_signdsrcdir := ntp_signd
110 wmisrcdir := lib/wmi
111 tallocsrcdir := ../lib/talloc
112 comsrcdir := $(srcdir)/lib/com
113 libgpodir := libgpo
115 include data.mk
117 INSTALL_SCRIPTS = $(addprefix scripting/bin/, \
118 autoidl \
119 samba3dump \
120 rpcclient \
121 smbstatus)
123 $(foreach SCRIPT,$(INSTALL_SCRIPTS),$(eval $(call binary_install_template,$(SCRIPT))))
125 $(DESTDIR)$(bindir)/%: scripting/bin/% installdirs
126 @mkdir -p $(@D)
127 @echo Installing $(@F) as $@
128 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
129 @cp $< $@
130 @chmod $(INSTALLPERMS) $@
132 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
134 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
135 include/includes.d
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)
143 endif
144 endif
145 endif
146 endif
148 ifneq ($(SKIP_DEP_FILES),yes)
149 clean::
150 @echo Removing dependency files
151 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
152 endif
153 else
154 include $(srcdir)/static_deps.mk
155 endif
157 clean::
158 @find $(base_srcdirs) -name '*.o' -o -name '*.ho' | xargs rm -f
160 PUBLIC_HEADERS += ./version.h
162 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
163 modules:: $(PLUGINS)
164 headers:: $(PUBLIC_HEADERS)
165 manpages:: $(MANPAGES)
166 all:: showflags $(ALL_PREDEP) binaries modules pythonmods libraries headers
167 everything:: all
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
177 showlayout::
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)'
198 showflags::
199 @echo ' srcdir = $(srcdir)'
200 @echo ' builddir = $(builddir)'
202 # The permissions to give the executables
203 INSTALLPERMS = 0755
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
214 # is not used.
216 installdirs::
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
240 installplugins::
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
264 uninstallmisc::
265 @echo "Removing MISC files"
266 @rm -rf $(DESTDIR)$(setupdir)/*
268 $(DESTDIR)$(bindir)/%: bin/% installdirs
269 @mkdir -p $(@D)
270 @echo Installing $(@F) as $@
271 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
272 @cp $< $@
273 @chmod $(INSTALLPERMS) $@
275 $(DESTDIR)$(sbindir)/%: bin/% installdirs
276 @mkdir -p $(@D)
277 @echo Installing $(@F) as $@
278 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
279 @cp $< $@
280 @chmod $(INSTALLPERMS) $@
282 uninstalldat::
283 @echo "Removing DAT files"
284 @rm -fr $(DESTDIR)$(datadir)/*
286 uninstallbin::
288 uninstalllib::
289 @echo "Removing libraries"
290 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
292 uninstallheader::
293 @echo "Removing headers"
294 @rm -fr $(DESTDIR)$(includedir)/*
296 uninstallman::
297 @echo "Removing manpages"
298 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
300 uninstallplugins::
302 uninstallpc::
303 @echo "Removing package configurations"
304 @cd $(DESTDIR)$(pkgconfigdir); rm -f $(notdir $(PC_FILES))
306 config.status:
307 @echo "config.status does not exist. Please run ./configure."
308 @/bin/false
310 data.mk: config.status $(MK_FILES)
311 ./config.status
313 testcov-html::
315 include $(pidldir)/config.mk
316 selftestdir := $(srcdir)/../selftest
317 include $(srcdir)/selftest/config.mk
319 showflags::
320 @echo ' pwd = '`/bin/pwd`