Re-add alignment removed by metze in 0e2f6d481b3e35ed392b2b3340b244c77593819c
[Samba.git] / source / Makefile
blob0ee36ec830d62d7f2f54ca2cc371bf08f90bb6aa
1 #!gmake
2 # The Samba 4 Makefile.
3 # This file is *NOT* autogenerated.
5 include mkconfig.mk
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
11 BASEDIR = $(prefix)
12 TORTUREDIR = $(libdir)/torture
13 SWATDIR = $(datadir)/swat
14 JSDIR = $(datadir)/js
15 SETUPDIR = $(datadir)/setup
16 NCALRPCDIR = $(localstatedir)/ncalrpc
18 BNLD = $(LD)
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)/
27 .DEFAULT_GOAL := all
29 ifneq ($(automatic_dependencies),yes)
30 ALL_PREDEP = basics
31 .NOTPARALLEL:
32 endif
34 regen_version::
35 @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
37 clean_pch::
38 @echo "Removing precompiled headers"
39 @-rm -f include/includes.h.gch
41 pch:: clean_pch include/includes.h.gch
43 .DEFAULT_GOAL := all
45 ifneq ($(automatic_dependencies),yes)
46 ALL_PREDEP = basics
47 .NOTPARALLEL:
48 endif
50 include build/make/rules.mk
51 include build/make/python.mk
52 include data.mk
54 BINARIES += $(BIN_PROGS) $(SBIN_PROGS)
56 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
58 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
59 include/includes.d
61 ifeq ($(automatic_dependencies),yes)
62 ifneq ($(MAKECMDGOALS),clean)
63 ifneq ($(MAKECMDGOALS),distclean)
64 ifneq ($(MAKECMDGOALS),realdistclean)
65 ifneq ($(SKIP_DEP_FILES),yes)
66 -include $(DEP_FILES)
67 endif
68 endif
69 endif
70 endif
72 ifneq ($(SKIP_DEP_FILES),yes)
73 clean::
74 @echo Removing dependency files
75 @find . -name '*.d' -o -name '*.hd' | xargs rm -f
76 endif
77 else
78 include $(srcdir)/static_deps.mk
79 endif
81 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
82 $(srcdir)/version.h
84 binaries:: $(BINARIES)
85 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
86 modules:: $(PLUGINS)
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
90 everything:: all
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
100 showlayout::
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)'
121 showflags::
122 @echo ' srcdir = $(srcdir)'
123 @echo ' builddir = $(builddir)'
125 # The permissions to give the executables
126 INSTALLPERMS = 0755
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
137 # is not used.
139 installdirs::
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 \
161 $(INSTALLPERMS) \
162 $(DESTDIR)$(BASEDIR) \
163 $(DESTDIR)$(sbindir) \
164 $(DESTDIR)$(libdir) \
165 $(DESTDIR)$(localstatedir) \
166 $(SBIN_PROGS)
167 @$(SHELL) $(srcdir)/script/installbin.sh \
168 $(INSTALLPERMS) \
169 $(DESTDIR)$(BASEDIR) \
170 $(DESTDIR)$(bindir) \
171 $(DESTDIR)$(libdir) \
172 $(DESTDIR)$(localstatedir) \
173 $(BIN_PROGS)
174 @$(SHELL) $(srcdir)/script/installtorture.sh \
175 $(INSTALLPERMS) \
176 $(DESTDIR)$(TORTUREDIR) \
177 $(TORTURE_PROGS)
179 installplugins::
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 \
205 uninstallplugins
207 uninstallmisc::
208 #FIXME
210 uninstallbin::
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)
215 uninstalllib::
216 @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS)
217 #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS)
219 uninstallheader::
220 @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS)
222 uninstallman::
223 @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
225 uninstallplugins::
227 config.status:
228 @echo "config.status does not exist. Please run ./configure."
229 @/bin/false
231 data.mk: config.status $(MK_FILES)
232 ./config.status
234 testcov-html::
236 include pidl/config.mk
237 include selftest/config.mk
239 showflags::
240 @echo ' pwd = '`/bin/pwd`