Remove jsdir.
[mat/samba.git] / source4 / Makefile
1 #!gmake
2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
4 #
5 .DEFAULT_GOAL := all
6
7 default: all
8
9 include mkconfig.mk
10
11 pidldir := $(srcdir)/pidl
12
13 BASEDIR = $(prefix)
14 TORTUREDIR = $(libdir)/torture
15 SWATDIR = $(datadir)/swat
16 SETUPDIR = $(datadir)/setup
17 NCALRPCDIR = $(localstatedir)/ncalrpc
18
19 BNLD = $(LD)
20 BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
21
22 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
23 HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
24
25 $(srcdir)/version.h: $(srcdir)/VERSION
26         @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
27
28 ifneq ($(automatic_dependencies),yes)
29 ALL_PREDEP = basics
30 .NOTPARALLEL:
31 endif
32
33 regen_version::
34         @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
35
36 clean_pch::
37         @echo "Removing precompiled headers"
38         @-rm -f include/includes.h.gch
39
40 pch:: clean_pch include/includes.h.gch
41
42 .DEFAULT_GOAL := all
43
44 ifneq ($(automatic_dependencies),yes)
45 ALL_PREDEP = basics
46 .NOTPARALLEL:
47 endif
48
49 include $(srcdir)/build/make/rules.mk
50 include $(srcdir)/build/make/python.mk
51 zlibsrcdir := lib/zlib
52 dynconfigsrcdir := dynconfig
53 heimdalsrcdir := heimdal
54 dsdbsrcdir := dsdb
55 smbdsrcdir := smbd
56 clustersrcdir := cluster
57 libnetsrcdir := libnet
58 authsrcdir := auth
59 nsswitchsrcdir := nsswitch
60 libsrcdir := lib
61 libsocketsrcdir := lib/socket
62 libcharsetsrcdir := lib/charset
63 ldb_sambasrcdir := lib/ldb-samba
64 tdbsrcdir := lib/tdb
65 ldbsrcdir := lib/ldb
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
85 paramsrcdir := param
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
93 utilssrcdir := utils
94 clientsrcdir := client
95 torturesrcdir := torture
96 ntvfssrcdir := ntvfs
97 ntptrsrcdir := ntptr
98 librpcsrcdir := librpc
99 libclisrcdir := libcli
100 pyscriptsrcdir := $(srcdir)/scripting/python
101 kdcsrcdir := kdc
102 ntp_signdsrcdir := ntp_signd
103 wmisrcdir := lib/wmi
104
105 include data.mk
106
107 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
108
109 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
110                    include/includes.d
111
112 ifeq ($(automatic_dependencies),yes)
113 ifneq ($(MAKECMDGOALS),clean)
114 ifneq ($(MAKECMDGOALS),distclean)
115 ifneq ($(MAKECMDGOALS),realdistclean)
116 ifneq ($(SKIP_DEP_FILES),yes)
117 -include $(DEP_FILES)
118 endif
119 endif
120 endif
121 endif
122
123 ifneq ($(SKIP_DEP_FILES),yes)
124 clean::
125         @echo Removing dependency files
126         @find . -name '*.d' -o -name '*.hd' | xargs rm -f
127 endif
128 else
129 include $(srcdir)/static_deps.mk
130 endif
131
132 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
133                   $(srcdir)/version.h
134
135 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
136 modules:: $(PLUGINS)
137 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
138 manpages:: $(MANPAGES)
139 all:: showflags $(ALL_PREDEP) binaries modules pythonmods libraries headers
140 everything:: all
141
142 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
143
144 # 'make testsuite' creates all binaries which are
145 # needed by samba3's 'make test' and the build-farm
146 # scripts use that it as fallback in case
147 # 'make everything' fails
148 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
149
150 showlayout:: 
151         @echo 'Samba will be installed into:'
152         @echo '  basedir:     $(BASEDIR)'
153         @echo '  bindir:      $(bindir)'
154         @echo '  sbindir:     $(sbindir)'
155         @echo '  libdir:      $(libdir)'
156         @echo '  modulesdir:  $(modulesdir)'
157         @echo '  includedir:  $(includedir)'
158         @echo '  vardir:      $(localstatedir)'
159         @echo '  privatedir:  $(privatedir)'
160         @echo '  piddir:      $(piddir)'
161         @echo '  lockdir:     $(lockdir)'
162         @echo '  logfilebase: $(logfilebase)'
163         @echo '  setupdir:    $(SETUPDIR)'
164         @echo '  swatdir:     $(SWATDIR)'
165         @echo '  mandir:      $(mandir)'
166         @echo '  torturedir:  $(TORTUREDIR)'
167         @echo '  datadir:     $(datadir)'
168         @echo '  winbindd_socket_dir:  $(winbindd_socket_dir)'
169         @echo '  ntp_signd_socket_dir:  $(ntp_signd_socket_dir)'
170
171 showflags::
172         @echo '  srcdir     = $(srcdir)'
173         @echo '  builddir   = $(builddir)'
174
175 # The permissions to give the executables
176 INSTALLPERMS = 0755
177
178 install:: showlayout everything installbin installsbin installdat installswat installmisc \
179               installlib installheader installpc installplugins
180
181 # DESTDIR is used here to prevent packagers wasting their time
182 # duplicating the Makefile. Remove it and you will have the privilege
183 # of packaging each samba release for multiple versions of multiple
184 # distributions and operating systems, or at least supplying patches
185 # to all the packaging files required for this, prior to committing
186 # the removal of DESTDIR. Do not remove it even though you think it
187 # is not used.
188
189 installdirs::
190         @$(SHELL) $(srcdir)/script/installdirs.sh \
191                 $(DESTDIR)$(BASEDIR) \
192                 $(DESTDIR)$(bindir) \
193                 $(DESTDIR)$(sbindir) \
194                 $(DESTDIR)$(TORTUREDIR) \
195                 $(DESTDIR)$(libdir) \
196                 $(DESTDIR)$(modulesdir) \
197                 $(DESTDIR)$(mandir) \
198                 $(DESTDIR)$(localstatedir) \
199                 $(DESTDIR)$(localstatedir)/lib \
200                 $(DESTDIR)$(localstatedir)/run \
201                 $(DESTDIR)$(privatedir) \
202                 $(DESTDIR)$(datadir) \
203                 $(DESTDIR)$(piddir) \
204                 $(DESTDIR)$(lockdir) \
205                 $(DESTDIR)$(logfilebase) \
206                 $(DESTDIR)$(privatedir)/tls \
207                 $(DESTDIR)$(includedir) \
208                 $(DESTDIR)$(PKGCONFIGDIR) \
209                 $(DESTDIR)$(sysconfdir)
210
211 installbin:: installdirs
212
213 installplugins::
214
215 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
216         @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS) 
217         #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
218
219 installheader:: headers installdirs
220         @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
221
222 installdat:: installdirs
223         @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
224
225 installswat:: installdirs
226 #SWAT has been disabled until further notice
227 #       @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
228
229 installman:: manpages installdirs
230         @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
231
232 installmisc:: installdirs
233         @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
234
235 installpc:: installdirs
236         @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
237
238 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
239         uninstallplugins
240
241 uninstallmisc::
242         #FIXME
243
244 $(DESTDIR)$(bindir)/%: bin/% installdirs
245         @mkdir -p $(@D)
246         @echo Installing $(@F) as $@
247         @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
248         @cp $< $@
249         @chmod $(INSTALLPERMS) $@
250
251 $(DESTDIR)$(sbindir)/%: 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) $@
257
258 uninstallbin::
259
260 uninstalllib::
261         @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
262         #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS) 
263
264 uninstallheader::
265         @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
266
267 uninstallman::
268         @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
269
270 uninstallplugins::
271
272 config.status:
273         @echo "config.status does not exist. Please run ./configure."
274         @/bin/false
275
276 data.mk: config.status $(MK_FILES)
277         ./config.status
278
279 testcov-html:: 
280
281 include $(pidldir)/config.mk
282 selftestdir := $(srcdir)/selftest
283 include $(selftestdir)/config.mk
284
285 showflags::
286         @echo '  pwd        = '`/bin/pwd`