5 VPATH = $(builddir):$(srcdir):heimdal_build:heimdal/lib/asn1:heimdal/lib/krb5:heimdal/lib/gssapi:heimdal/lib/hdb:heimdal/lib/roken:heimdal/lib/des
8 TORTUREDIR = $(libdir)/torture
9 SWATDIR = $(datadir)/swat
11 SETUPDIR = $(datadir)/setup
12 NCALRPCDIR = $(localstatedir)/ncalrpc
15 BNLD_FLAGS = $(LDFLAGS)
17 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
18 HOSTLD_FLAGS = $(LDFLAGS)
24 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
27 binaries:: $(BINARIES)
28 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
29 modules:: $(SHARED_MODULES)
30 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
31 manpages:: $(MANPAGES)
32 all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods
33 everything:: all libraries headers
35 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
37 # 'make testsuite' creates all binaries which are
38 # needed by samba3's 'make test' and the build-farm
39 # scripts use that it as fallback in case
40 # 'make everything' fails
41 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
44 @echo 'Samba will be installed into:'
45 @echo ' basedir: $(BASEDIR)'
46 @echo ' bindir: $(bindir)'
47 @echo ' sbindir: $(sbindir)'
48 @echo ' libdir: $(libdir)'
49 @echo ' modulesdir: $(modulesdir)'
50 @echo ' includedir: $(includedir)'
51 @echo ' vardir: $(localstatedir)'
52 @echo ' privatedir: $(privatedir)'
53 @echo ' piddir: $(piddir)'
54 @echo ' lockdir: $(lockdir)'
55 @echo ' logfilebase: $(logfilebase)'
56 @echo ' setupdir: $(SETUPDIR)'
57 @echo ' jsdir: $(JSDIR)'
58 @echo ' swatdir: $(SWATDIR)'
59 @echo ' mandir: $(mandir)'
60 @echo ' torturedir: $(TORTUREDIR)'
61 @echo ' datadir: $(datadir)'
62 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
65 @echo ' srcdir = $(srcdir)'
66 @echo ' builddir = $(builddir)'
68 # The permissions to give the executables
71 install:: showlayout everything installbin installdat installswat installmisc installlib \
72 installheader installpc installplugins
74 # DESTDIR is used here to prevent packagers wasting their time
75 # duplicating the Makefile. Remove it and you will have the privilege
76 # of packaging each samba release for multiple versions of multiple
77 # distributions and operating systems, or at least supplying patches
78 # to all the packaging files required for this, prior to committing
79 # the removal of DESTDIR. Do not remove it even though you think it
83 @$(SHELL) $(srcdir)/script/installdirs.sh \
84 $(DESTDIR)$(BASEDIR) \
86 $(DESTDIR)$(sbindir) \
87 $(DESTDIR)$(TORTUREDIR) \
89 $(DESTDIR)$(modulesdir) \
91 $(DESTDIR)$(localstatedir) \
92 $(DESTDIR)$(privatedir) \
93 $(DESTDIR)$(datadir) \
95 $(DESTDIR)$(lockdir) \
96 $(DESTDIR)$(logfilebase) \
97 $(DESTDIR)$(privatedir)/tls \
98 $(DESTDIR)$(includedir) \
99 $(DESTDIR)$(PKGCONFIGDIR) \
100 $(DESTDIR)$(sysconfdir) \
102 installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
103 @$(SHELL) $(srcdir)/script/installbin.sh \
105 $(DESTDIR)$(BASEDIR) \
106 $(DESTDIR)$(sbindir) \
107 $(DESTDIR)$(libdir) \
108 $(DESTDIR)$(localstatedir) \
110 @$(SHELL) $(srcdir)/script/installbin.sh \
112 $(DESTDIR)$(BASEDIR) \
113 $(DESTDIR)$(bindir) \
114 $(DESTDIR)$(libdir) \
115 $(DESTDIR)$(localstatedir) \
117 @$(SHELL) $(srcdir)/script/installtorture.sh \
119 $(DESTDIR)$(TORTUREDIR) \
122 installlib:: $(INSTALLABLE_SHARED_LIBS) $(STATIC_LIBS) installdirs
123 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(INSTALLABLE_SHARED_LIBS)
124 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
126 installheader:: headers installdirs
127 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
129 installdat:: installdirs
130 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
132 installswat:: installdirs
133 @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
135 installman:: manpages installdirs
136 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
138 installmisc:: installdirs
139 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
141 installpc:: installdirs
142 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
144 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
151 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(SBIN_PROGS)
152 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(BIN_PROGS)
153 @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
156 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
157 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS)
160 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
163 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
165 data.mk: config.status $(MK_FILES)
168 pidl/Makefile: pidl/Makefile.PL
169 cd pidl && $(PERL) Makefile.PL
171 testcov-html:: pidl-testcov
173 pidl-testcov: pidl/Makefile
174 cd pidl && cover -test
176 installpidl:: pidl/Makefile
177 $(MAKE) -C pidl install
179 uninstallpidl:: pidl/Makefile
180 $(MAKE) -C pidl uninstall
182 $(IDL_HEADER_FILES) \
183 $(IDL_NDR_PARSE_H_FILES) $(IDL_NDR_PARSE_C_FILES) \
184 $(IDL_NDR_CLIENT_C_FILES) $(IDL_NDR_CLIENT_H_FILES) \
185 $(IDL_NDR_SERVER_C_FILES) $(IDL_SWIG_FILES) \
186 $(IDL_NDR_EJS_C_FILES) $(IDL_NDR_EJS_H_FILES) \
187 $(IDL_NDR_PY_C_FILES) $(IDL_NDR_PY_H_FILES): idl
189 idl_full:: pidl/lib/Parse/Pidl/IDL.pm pidl/lib/Parse/Pidl/Expr.pm
190 @CPP="$(CPP)" PERL="$(PERL)" srcdir=$(srcdir) $(srcdir)/script/build_idl.sh FULL
192 idl:: pidl/lib/Parse/Pidl/IDL.pm pidl/lib/Parse/Pidl/Expr.pm
193 @CPP="$(CPP)" PERL="$(PERL)" srcdir=$(srcdir) $(srcdir)/script/build_idl.sh PARTIAL
195 pidl/lib/Parse/Pidl/IDL.pm: pidl/idl.yp
196 -$(YAPP) -m 'Parse::Pidl::IDL' -o pidl/lib/Parse/Pidl/IDL.pm pidl/idl.yp ||\
197 touch pidl/lib/Parse/Pidl/IDL.pm
199 pidl/lib/Parse/Pidl/Expr.pm: pidl/idl.yp
200 -$(YAPP) -m 'Parse::Pidl::Expr' -o pidl/lib/Parse/Pidl/Expr.pm pidl/expr.yp ||\
201 touch pidl/lib/Parse/Pidl/Expr.pm
203 include selftest/config.mk
207 @echo ' pwd = '`/bin/pwd`