Fix authservice count.
[jelmer/samba4-debian.git] / source / Makefile
1 #!gmake
2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
4
5 include mkconfig.mk
6
7 VPATH = $(builddir):$(srcdir):heimdal_build:heimdal/lib/asn1:heimdal/lib/krb5:heimdal/lib/gssapi:heimdal/lib/hdb:heimdal/lib/roken:heimdal/lib/des
8
9 BASEDIR = $(prefix)
10 TORTUREDIR = $(libdir)/torture
11 SWATDIR = $(datadir)/swat
12 JSDIR = $(datadir)/js
13 SETUPDIR = $(datadir)/setup
14 NCALRPCDIR = $(localstatedir)/ncalrpc
15
16 BNLD = $(LD)
17 BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
18
19 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
20 HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
21
22 .DEFAULT_GOAL := all
23
24 ifneq ($(automatic_dependencies),yes)
25 ALL_PREDEP = proto
26 .NOTPARALLEL:
27 endif
28
29 include rules.mk
30 include data.mk
31
32 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
33                    include/includes.d
34
35 ifeq ($(automatic_dependencies),yes)
36 ifneq ($(MAKECMDGOALS),clean)
37 ifneq ($(MAKECMDGOALS),distclean)
38 ifneq ($(MAKECMDGOALS),realdistclean)
39 ifneq ($(SKIP_DEP_FILES),yes)
40 -include $(DEP_FILES)
41 endif
42 endif
43 endif
44 endif
45
46 ifneq ($(SKIP_DEP_FILES),yes)
47 clean::
48         @echo Removing dependency files
49         @find . -name '*.d' -o -name '*.hd' | xargs rm -f
50 endif
51 else
52 include $(srcdir)/static_deps.mk
53 endif
54
55 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
56                   $(srcdir)/version.h
57
58 binaries::
59 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
60 modules:: $(PLUGINS)
61 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
62 manpages:: $(MANPAGES)
63 all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods libraries headers
64 everything:: all
65
66 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
67
68 # 'make testsuite' creates all binaries which are
69 # needed by samba3's 'make test' and the build-farm
70 # scripts use that it as fallback in case
71 # 'make everything' fails
72 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
73
74 showlayout:: 
75         @echo 'Samba will be installed into:'
76         @echo '  basedir:     $(BASEDIR)'
77         @echo '  bindir:      $(bindir)'
78         @echo '  sbindir:     $(sbindir)'
79         @echo '  libdir:      $(libdir)'
80         @echo '  modulesdir:  $(modulesdir)'
81         @echo '  includedir:  $(includedir)'
82         @echo '  vardir:      $(localstatedir)'
83         @echo '  privatedir:  $(privatedir)'
84         @echo '  piddir:      $(piddir)'
85         @echo '  lockdir:     $(lockdir)'
86         @echo '  logfilebase: $(logfilebase)'
87         @echo '  setupdir:    $(SETUPDIR)'
88         @echo '  jsdir:       $(JSDIR)'
89         @echo '  swatdir:     $(SWATDIR)'
90         @echo '  mandir:      $(mandir)'
91         @echo '  torturedir:  $(TORTUREDIR)'
92         @echo '  datadir:     $(datadir)'
93         @echo '  winbindd_socket_dir:  $(winbindd_socket_dir)'
94
95 showflags::
96         @echo '  srcdir     = $(srcdir)'
97         @echo '  builddir   = $(builddir)'
98
99 # The permissions to give the executables
100 INSTALLPERMS = 0755
101
102 install:: showlayout everything installbin installdat installswat installmisc \
103               installlib installheader installpc installplugins
104
105 # DESTDIR is used here to prevent packagers wasting their time
106 # duplicating the Makefile. Remove it and you will have the privilege
107 # of packaging each samba release for multiple versions of multiple
108 # distributions and operating systems, or at least supplying patches
109 # to all the packaging files required for this, prior to committing
110 # the removal of DESTDIR. Do not remove it even though you think it
111 # is not used.
112
113 installdirs::
114         @$(SHELL) $(srcdir)/script/installdirs.sh \
115                 $(DESTDIR)$(BASEDIR) \
116                 $(DESTDIR)$(bindir) \
117                 $(DESTDIR)$(sbindir) \
118                 $(DESTDIR)$(TORTUREDIR) \
119                 $(DESTDIR)$(libdir) \
120                 $(DESTDIR)$(modulesdir) \
121                 $(DESTDIR)$(mandir) \
122                 $(DESTDIR)$(localstatedir) \
123                 $(DESTDIR)$(privatedir) \
124                 $(DESTDIR)$(datadir) \
125                 $(DESTDIR)$(piddir) \
126                 $(DESTDIR)$(lockdir) \
127                 $(DESTDIR)$(logfilebase) \
128                 $(DESTDIR)$(privatedir)/tls \
129                 $(DESTDIR)$(includedir) \
130                 $(DESTDIR)$(PKGCONFIGDIR) \
131                 $(DESTDIR)$(sysconfdir) \
132
133 installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
134         @$(SHELL) $(srcdir)/script/installbin.sh \
135                 $(INSTALLPERMS) \
136                 $(DESTDIR)$(BASEDIR) \
137                 $(DESTDIR)$(sbindir) \
138                 $(DESTDIR)$(libdir) \
139                 $(DESTDIR)$(localstatedir) \
140                 $(SBIN_PROGS)
141         @$(SHELL) $(srcdir)/script/installbin.sh \
142                 $(INSTALLPERMS) \
143                 $(DESTDIR)$(BASEDIR) \
144                 $(DESTDIR)$(bindir) \
145                 $(DESTDIR)$(libdir) \
146                 $(DESTDIR)$(localstatedir) \
147                 $(BIN_PROGS)
148         @$(SHELL) $(srcdir)/script/installtorture.sh \
149                 $(INSTALLPERMS) \
150                 $(DESTDIR)$(TORTUREDIR) \
151                 $(TORTURE_PROGS)
152
153 installplugins::
154
155 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
156         @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS) 
157         #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
158
159 installheader:: headers installdirs
160         @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
161
162 installdat:: installdirs
163         @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
164
165 installswat:: installdirs
166 #SWAT has been disabled until further notice
167 #       @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
168
169 installman:: manpages installdirs
170         @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
171
172 installmisc:: installdirs
173         @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
174
175 installpc:: installdirs
176         @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
177
178 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
179         uninstallplugins
180
181 uninstallmisc::
182         #FIXME
183
184 uninstallbin::
185         @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(SBIN_PROGS)
186         @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(BIN_PROGS)
187         @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
188
189 uninstalllib::
190         @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
191         #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS) 
192
193 uninstallheader::
194         @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
195
196 uninstallman::
197         @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
198
199 uninstallplugins::
200
201 config.status:
202         @echo "config.status does not exist. Please run ./configure."
203         @/bin/false
204
205 data.mk: config.status $(MK_FILES)
206         ./config.status
207
208 testcov-html:: 
209
210 include pidl/config.mk
211 include selftest/config.mk
212
213 showflags::
214         @echo '  pwd        = '`/bin/pwd`