dsdb_create_prefix_mapping() implementation checks for existing prefix maping in...
[Samba/gbeck.git] / source4 / Makefile
blobfba06ccfa9f9937a82ccaed292523c617bd602a1
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 VPATH = $(builddir):$(srcdir):$(srcdir)/heimdal_build:$(heimdalsrcdir)/lib/asn1:$(heimdalsrcdir)/lib/krb5:$(heimdalsrcdir)/lib/gssapi:$(heimdalsrcdir)/lib/hdb:$(heimdalsrcdir)/lib/roken:$(heimdalsrcdir)/lib/des
15 BASEDIR = $(prefix)
16 TORTUREDIR = $(libdir)/torture
17 SWATDIR = $(datadir)/swat
18 JSDIR = $(datadir)/js
19 SETUPDIR = $(datadir)/setup
20 NCALRPCDIR = $(localstatedir)/ncalrpc
22 BNLD = $(LD)
23 BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
25 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
26 HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
28 $(srcdir)/version.h: $(srcdir)/VERSION
29 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
31 ifneq ($(automatic_dependencies),yes)
32 ALL_PREDEP = basics
33 .NOTPARALLEL:
34 endif
36 regen_version::
37 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
39 clean_pch::
40 @echo "Removing precompiled headers"
41 @-rm -f include/includes.h.gch
43 pch:: clean_pch include/includes.h.gch
45 .DEFAULT_GOAL := all
47 ifneq ($(automatic_dependencies),yes)
48 ALL_PREDEP = basics
49 .NOTPARALLEL:
50 endif
52 include $(srcdir)/build/make/rules.mk
53 include $(srcdir)/build/make/python.mk
54 dynconfigsrcdir := dynconfig
55 heimdalsrcdir := heimdal
56 dsdbsrcdir := dsdb
57 smbdsrcdir := smbd
58 clustersrcdir := cluster
59 libnetsrcdir := libnet
60 authsrcdir := auth
61 nsswitchsrcdir := nsswitch
62 libsrcdir := lib
63 libsocketsrcdir := lib/socket
64 libcharsetsrcdir := lib/charset
65 ldb_sambasrcdir := lib/ldb-samba
66 tdbsrcdir := lib/tdb
67 ldbsrcdir := lib/ldb
68 libtlssrcdir := lib/tls
69 libregistrysrcdir := lib/registry
70 smbreadlinesrcdir := lib/smbreadline
71 libmessagingsrcdir := lib/messaging
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 libdbwrapsrcdir := lib/dbwrap
82 libcryptosrcdir := lib/crypto
83 libtorturesrcdir := lib/torture
84 smb_serversrcdir := smb_server
85 libcompressionsrcdir := lib/compression
86 libgencachesrcdir := lib
87 paramsrcdir := param
88 rpc_serversrcdir := rpc_server
89 ldap_serversrcdir := ldap_server
90 web_serversrcdir := web_server
91 winbindsrcdir := winbind
92 nbt_serversrcdir := nbt_server
93 wrepl_serversrcdir := wrepl_server
94 cldap_serversrcdir := cldap_server
95 utilssrcdir := utils
96 clientsrcdir := client
97 torturesrcdir := torture
98 ntvfssrcdir := ntvfs
99 ntptrsrcdir := ntptr
100 librpcsrcdir := librpc
101 libclisrcdir := libcli
102 ejsscriptsrcdir := scripting/ejs
103 pyscriptsrcdir := $(srcdir)/scripting/python
104 kdcsrcdir := kdc
105 ntp_signdsrcdir := ntp_signd
107 include data.mk
109 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
111 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
112 include/includes.d
114 ifeq ($(automatic_dependencies),yes)
115 ifneq ($(MAKECMDGOALS),clean)
116 ifneq ($(MAKECMDGOALS),distclean)
117 ifneq ($(MAKECMDGOALS),realdistclean)
118 ifneq ($(SKIP_DEP_FILES),yes)
119 -include $(DEP_FILES)
120 endif
121 endif
122 endif
123 endif
125 ifneq ($(SKIP_DEP_FILES),yes)
126 clean::
127 @echo Removing dependency files
128 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
129 endif
130 else
131 include $(srcdir)/static_deps.mk
132 endif
134 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
135 $(srcdir)/version.h
137 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
138 modules:: $(PLUGINS)
139 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
140 manpages:: $(MANPAGES)
141 all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods libraries headers
142 everything:: all
144 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
146 # 'make testsuite' creates all binaries which are
147 # needed by samba3's 'make test' and the build-farm
148 # scripts use that it as fallback in case
149 # 'make everything' fails
150 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
152 showlayout::
153 @echo 'Samba will be installed into:'
154 @echo ' basedir: $(BASEDIR)'
155 @echo ' bindir: $(bindir)'
156 @echo ' sbindir: $(sbindir)'
157 @echo ' libdir: $(libdir)'
158 @echo ' modulesdir: $(modulesdir)'
159 @echo ' includedir: $(includedir)'
160 @echo ' vardir: $(localstatedir)'
161 @echo ' privatedir: $(privatedir)'
162 @echo ' piddir: $(piddir)'
163 @echo ' lockdir: $(lockdir)'
164 @echo ' logfilebase: $(logfilebase)'
165 @echo ' setupdir: $(SETUPDIR)'
166 @echo ' jsdir: $(JSDIR)'
167 @echo ' swatdir: $(SWATDIR)'
168 @echo ' mandir: $(mandir)'
169 @echo ' torturedir: $(TORTUREDIR)'
170 @echo ' datadir: $(datadir)'
171 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
172 @echo ' ntp_signd_socket_dir: $(ntp_signd_socket_dir)'
174 showflags::
175 @echo ' srcdir = $(srcdir)'
176 @echo ' builddir = $(builddir)'
178 # The permissions to give the executables
179 INSTALLPERMS = 0755
181 install:: showlayout everything installbin installsbin installdat installswat installmisc \
182 installlib installheader installpc installplugins
184 # DESTDIR is used here to prevent packagers wasting their time
185 # duplicating the Makefile. Remove it and you will have the privilege
186 # of packaging each samba release for multiple versions of multiple
187 # distributions and operating systems, or at least supplying patches
188 # to all the packaging files required for this, prior to committing
189 # the removal of DESTDIR. Do not remove it even though you think it
190 # is not used.
192 installdirs::
193 @$(SHELL) $(srcdir)/script/installdirs.sh \
194 $(DESTDIR)$(BASEDIR) \
195 $(DESTDIR)$(bindir) \
196 $(DESTDIR)$(sbindir) \
197 $(DESTDIR)$(TORTUREDIR) \
198 $(DESTDIR)$(libdir) \
199 $(DESTDIR)$(modulesdir) \
200 $(DESTDIR)$(mandir) \
201 $(DESTDIR)$(localstatedir) \
202 $(DESTDIR)$(localstatedir)/lib \
203 $(DESTDIR)$(localstatedir)/run \
204 $(DESTDIR)$(privatedir) \
205 $(DESTDIR)$(datadir) \
206 $(DESTDIR)$(piddir) \
207 $(DESTDIR)$(lockdir) \
208 $(DESTDIR)$(logfilebase) \
209 $(DESTDIR)$(privatedir)/tls \
210 $(DESTDIR)$(includedir) \
211 $(DESTDIR)$(PKGCONFIGDIR) \
212 $(DESTDIR)$(sysconfdir)
214 installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
215 @$(SHELL) $(srcdir)/script/installtorture.sh \
216 $(INSTALLPERMS) \
217 $(DESTDIR)$(TORTUREDIR) \
218 $(TORTURE_PROGS)
220 installplugins::
222 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
223 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
224 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
226 installheader:: headers installdirs
227 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
229 installdat:: installdirs
230 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
232 installswat:: installdirs
233 #SWAT has been disabled until further notice
234 # @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
236 installman:: manpages installdirs
237 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
239 installmisc:: installdirs
240 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
242 installpc:: installdirs
243 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
245 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
246 uninstallplugins
248 uninstallmisc::
249 #FIXME
251 $(DESTDIR)$(bindir)/%: bin/% installdirs
252 @mkdir -p $(@D)
253 @echo Installing $(@F) as $@
254 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
255 @cp $< $@
256 @chmod $(INSTALLPERMS) $@
258 $(DESTDIR)$(sbindir)/%: bin/% installdirs
259 @mkdir -p $(@D)
260 @echo Installing $(@F) as $@
261 @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
262 @cp $< $@
263 @chmod $(INSTALLPERMS) $@
265 uninstallbin::
266 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(SBIN_PROGS)
267 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(BIN_PROGS)
268 @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
270 uninstalllib::
271 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
272 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS)
274 uninstallheader::
275 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
277 uninstallman::
278 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
280 uninstallplugins::
282 config.status:
283 @echo "config.status does not exist. Please run ./configure."
284 @/bin/false
286 data.mk: config.status $(MK_FILES)
287 ./config.status
289 testcov-html::
291 include $(pidldir)/config.mk
292 selftestdir := $(srcdir)/selftest
293 include $(selftestdir)/config.mk
295 showflags::
296 @echo ' pwd = '`/bin/pwd`