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