2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
7 pidldir := $(srcdir)/pidl
9 VPATH = $(builddir):$(srcdir):heimdal_build:heimdal/lib/asn1:heimdal/lib/krb5:heimdal/lib/gssapi:heimdal/lib/hdb:heimdal/lib/roken:heimdal/lib/des
12 TORTUREDIR = $(libdir)/torture
13 SWATDIR = $(datadir)/swat
15 SETUPDIR = $(datadir)/setup
16 NCALRPCDIR = $(localstatedir)/ncalrpc
19 BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
21 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
22 HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
24 $(srcdir)/version.h: $(srcdir)/VERSION
25 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
29 ifneq ($(automatic_dependencies),yes)
35 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
38 @echo "Removing precompiled headers"
39 @-rm -f include/includes.h.gch
41 pch:: clean_pch include/includes.h.gch
45 ifneq ($(automatic_dependencies),yes)
50 include build/make/rules.mk
51 include build/make/python.mk
54 BINARIES += $(BIN_PROGS) $(SBIN_PROGS)
56 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
58 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
61 ifeq ($(automatic_dependencies),yes)
62 ifneq ($(MAKECMDGOALS),clean)
63 ifneq ($(MAKECMDGOALS),distclean)
64 ifneq ($(MAKECMDGOALS),realdistclean)
65 ifneq ($(SKIP_DEP_FILES),yes)
72 ifneq ($(SKIP_DEP_FILES),yes)
74 @echo Removing dependency files
75 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
78 include $(srcdir)/static_deps.mk
81 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
84 binaries:: $(BINARIES)
85 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
87 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
88 manpages:: $(MANPAGES)
89 all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods libraries headers
92 LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
94 # 'make testsuite' creates all binaries which are
95 # needed by samba3's 'make test' and the build-farm
96 # scripts use that it as fallback in case
97 # 'make everything' fails
98 testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
101 @echo 'Samba will be installed into:'
102 @echo ' basedir: $(BASEDIR)'
103 @echo ' bindir: $(bindir)'
104 @echo ' sbindir: $(sbindir)'
105 @echo ' libdir: $(libdir)'
106 @echo ' modulesdir: $(modulesdir)'
107 @echo ' includedir: $(includedir)'
108 @echo ' vardir: $(localstatedir)'
109 @echo ' privatedir: $(privatedir)'
110 @echo ' piddir: $(piddir)'
111 @echo ' lockdir: $(lockdir)'
112 @echo ' logfilebase: $(logfilebase)'
113 @echo ' setupdir: $(SETUPDIR)'
114 @echo ' jsdir: $(JSDIR)'
115 @echo ' swatdir: $(SWATDIR)'
116 @echo ' mandir: $(mandir)'
117 @echo ' torturedir: $(TORTUREDIR)'
118 @echo ' datadir: $(datadir)'
119 @echo ' winbindd_socket_dir: $(winbindd_socket_dir)'
122 @echo ' srcdir = $(srcdir)'
123 @echo ' builddir = $(builddir)'
125 # The permissions to give the executables
128 install:: showlayout everything installbin installdat installswat installmisc \
129 installlib installheader installpc installplugins
131 # DESTDIR is used here to prevent packagers wasting their time
132 # duplicating the Makefile. Remove it and you will have the privilege
133 # of packaging each samba release for multiple versions of multiple
134 # distributions and operating systems, or at least supplying patches
135 # to all the packaging files required for this, prior to committing
136 # the removal of DESTDIR. Do not remove it even though you think it
140 @$(SHELL) $(srcdir)/script/installdirs.sh \
141 $(DESTDIR)$(BASEDIR) \
142 $(DESTDIR)$(bindir) \
143 $(DESTDIR)$(sbindir) \
144 $(DESTDIR)$(TORTUREDIR) \
145 $(DESTDIR)$(libdir) \
146 $(DESTDIR)$(modulesdir) \
147 $(DESTDIR)$(mandir) \
148 $(DESTDIR)$(localstatedir) \
149 $(DESTDIR)$(privatedir) \
150 $(DESTDIR)$(datadir) \
151 $(DESTDIR)$(piddir) \
152 $(DESTDIR)$(lockdir) \
153 $(DESTDIR)$(logfilebase) \
154 $(DESTDIR)$(privatedir)/tls \
155 $(DESTDIR)$(includedir) \
156 $(DESTDIR)$(PKGCONFIGDIR) \
157 $(DESTDIR)$(sysconfdir) \
159 installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
160 @$(SHELL) $(srcdir)/script/installbin.sh \
162 $(DESTDIR)$(BASEDIR) \
163 $(DESTDIR)$(sbindir) \
164 $(DESTDIR)$(libdir) \
165 $(DESTDIR)$(localstatedir) \
167 @$(SHELL) $(srcdir)/script/installbin.sh \
169 $(DESTDIR)$(BASEDIR) \
170 $(DESTDIR)$(bindir) \
171 $(DESTDIR)$(libdir) \
172 $(DESTDIR)$(localstatedir) \
174 @$(SHELL) $(srcdir)/script/installtorture.sh \
176 $(DESTDIR)$(TORTUREDIR) \
181 installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
182 @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS)
183 #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
185 installheader:: headers installdirs
186 @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
188 installdat:: installdirs
189 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir)
191 installswat:: installdirs
192 #SWAT has been disabled until further notice
193 # @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
195 installman:: manpages installdirs
196 @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES)
198 installmisc:: installdirs
199 @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir)
201 installpc:: installdirs
202 @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
204 uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
211 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(SBIN_PROGS)
212 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(BIN_PROGS)
213 @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
216 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
217 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS)
220 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
223 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
228 @echo "config.status does not exist. Please run ./configure."
231 data.mk: config.status $(MK_FILES)
236 include pidl/config.mk
237 include selftest/config.mk
240 @echo ' pwd = '`/bin/pwd`