Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-abartlet
[kai/samba-autobuild/.git] / source4 / 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)
18
19 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
20 HOSTLD_FLAGS = $(LDFLAGS)
21
22 default: all
23
24 include rules.mk
25 include data.mk
26
27 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
28                   $(srcdir)/version.h
29
30 binaries::
31 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
32 modules:: $(PLUGINS)
33 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
34 manpages:: $(MANPAGES)
35 all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods
36 everything:: all libraries headers
37
38 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
39
40 # 'make testsuite' creates all binaries which are
41 # needed by samba3's 'make test' and the build-farm
42 # scripts use that it as fallback in case
43 # 'make everything' fails
44 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
45
46 showlayout:: 
47         @echo 'Samba will be installed into:'
48         @echo '  basedir:     $(BASEDIR)'
49         @echo '  bindir:      $(bindir)'
50         @echo '  sbindir:     $(sbindir)'
51         @echo '  libdir:      $(libdir)'
52         @echo '  modulesdir:  $(modulesdir)'
53         @echo '  includedir:  $(includedir)'
54         @echo '  vardir:      $(localstatedir)'
55         @echo '  privatedir:  $(privatedir)'
56         @echo '  piddir:      $(piddir)'
57         @echo '  lockdir:     $(lockdir)'
58         @echo '  logfilebase: $(logfilebase)'
59         @echo '  setupdir:    $(SETUPDIR)'
60         @echo '  jsdir:       $(JSDIR)'
61         @echo '  swatdir:     $(SWATDIR)'
62         @echo '  mandir:      $(mandir)'
63         @echo '  torturedir:  $(TORTUREDIR)'
64         @echo '  datadir:     $(datadir)'
65         @echo '  winbindd_socket_dir:  $(winbindd_socket_dir)'
66
67 showflags::
68         @echo '  srcdir     = $(srcdir)'
69         @echo '  builddir   = $(builddir)'
70
71 # The permissions to give the executables
72 INSTALLPERMS = 0755
73
74 install:: showlayout everything installbin installdat installswat installmisc \
75               installlib installheader installpc installplugins
76
77 # DESTDIR is used here to prevent packagers wasting their time
78 # duplicating the Makefile. Remove it and you will have the privilege
79 # of packaging each samba release for multiple versions of multiple
80 # distributions and operating systems, or at least supplying patches
81 # to all the packaging files required for this, prior to committing
82 # the removal of DESTDIR. Do not remove it even though you think it
83 # is not used.
84
85 installdirs::
86         @$(SHELL) $(srcdir)/script/installdirs.sh \
87                 $(DESTDIR)$(BASEDIR) \
88                 $(DESTDIR)$(bindir) \
89                 $(DESTDIR)$(sbindir) \
90                 $(DESTDIR)$(TORTUREDIR) \
91                 $(DESTDIR)$(libdir) \
92                 $(DESTDIR)$(modulesdir) \
93                 $(DESTDIR)$(mandir) \
94                 $(DESTDIR)$(localstatedir) \
95                 $(DESTDIR)$(privatedir) \
96                 $(DESTDIR)$(datadir) \
97                 $(DESTDIR)$(piddir) \
98                 $(DESTDIR)$(lockdir) \
99                 $(DESTDIR)$(logfilebase) \
100                 $(DESTDIR)$(privatedir)/tls \
101                 $(DESTDIR)$(includedir) \
102                 $(DESTDIR)$(PKGCONFIGDIR) \
103                 $(DESTDIR)$(sysconfdir) \
104
105 installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
106         @$(SHELL) $(srcdir)/script/installbin.sh \
107                 $(INSTALLPERMS) \
108                 $(DESTDIR)$(BASEDIR) \
109                 $(DESTDIR)$(sbindir) \
110                 $(DESTDIR)$(libdir) \
111                 $(DESTDIR)$(localstatedir) \
112                 $(SBIN_PROGS)
113         @$(SHELL) $(srcdir)/script/installbin.sh \
114                 $(INSTALLPERMS) \
115                 $(DESTDIR)$(BASEDIR) \
116                 $(DESTDIR)$(bindir) \
117                 $(DESTDIR)$(libdir) \
118                 $(DESTDIR)$(localstatedir) \
119                 $(BIN_PROGS)
120         @$(SHELL) $(srcdir)/script/installtorture.sh \
121                 $(INSTALLPERMS) \
122                 $(DESTDIR)$(TORTUREDIR) \
123                 $(TORTURE_PROGS)
124
125 installplugins::
126
127 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
128         @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS) 
129         #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
130
131 installheader:: headers installdirs
132         @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
133
134 installdat:: installdirs
135         @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
136
137 installswat:: installdirs
138         @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
139
140 installman:: manpages installdirs
141         @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
142
143 installmisc:: installdirs
144         @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
145
146 installpc:: installdirs
147         @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
148
149 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
150         uninstallplugins
151
152 uninstallmisc::
153         #FIXME
154
155 uninstallbin::
156         @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(SBIN_PROGS)
157         @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(BIN_PROGS)
158         @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
159
160 uninstalllib::
161         @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
162         #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS) 
163
164 uninstallheader::
165         @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
166
167 uninstallman::
168         @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
169
170 uninstallplugins::
171
172 config.status:
173         @echo "config.status does not exist. Please run ./configure."
174         @/bin/false
175
176 data.mk: config.status $(MK_FILES)
177         ./config.status
178
179 testcov-html:: 
180
181 include pidl/config.mk
182 include selftest/config.mk
183
184 showflags::
185         @echo '  pwd        = '`/bin/pwd`