6 PARTLINK
= $(PROG_LD
) -r
8 MDLD_FLAGS
= $(LDSHFLAGS
)
10 samba4srcdir
= $(srcdir)/..
/source4
12 # Flags used for the samba 4 files
13 # $(srcdir)/include is required for config.h
14 SAMBA4_CFLAGS
= -I
$(samba4srcdir
) -I
$(samba4srcdir
)/include \
15 -I
$(samba4srcdir
)/..
/lib
/replace
-I
$(samba4srcdir
)/lib \
16 -I
$(heimdalsrcdir
)/lib
/hcrypto
-I
$(tallocdir
) \
17 -I
$(srcdir)/include -D_SAMBA_BUILD_
=4 -DHAVE_CONFIG_H
21 # No cross compilation for now, thanks
23 @if
(: >> $@ ||
: > $@
) >/dev
/null
2>&1; then
rm -f
$@
; else \
24 dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR
); fi
25 @if
test -n
"$(CC_CHECKER)"; then \
26 echo
"Checking $*.c with '$(CC_CHECKER)'";\
30 @
$(COMPILE
) && exit
0;\
31 echo
"The following command failed:" 1>&2;\
32 echo
"$(subst ",\",$(COMPILE_CC
))" 1>&2;\
33 $(COMPILE_CC) >/dev/null 2>&1
35 # The order really does matter here! GNU Make 3.80 will break if the more specific
36 # overrides are not specified first.
37 ifeq ($(MAKE_VERSION),3.81)
39 $(samba4srcdir)/%.o: CFLAGS=$(SAMBA4_CFLAGS)
40 $(samba4srcdir)/%.ho: CFLAGS=$(SAMBA4_CFLAGS)
41 $(heimdalsrcdir)/%.o: CFLAGS=-I$(heimdalbuildsrcdir) $(SAMBA4_CFLAGS) -I$(srcdir)
42 $(heimdalsrcdir)/%.ho: CFLAGS=-I$(heimdalbuildsrcdir) $(SAMBA4_CFLAGS) -I$(srcdir)
44 $(heimdalsrcdir)/%.o: CFLAGS=-I$(heimdalbuildsrcdir) $(SAMBA4_CFLAGS) -I$(srcdir)
45 $(heimdalsrcdir)/%.ho: CFLAGS=-I$(heimdalbuildsrcdir) $(SAMBA4_CFLAGS) -I$(srcdir)
46 $(samba4srcdir)/%.o: CFLAGS=$(SAMBA4_CFLAGS)
47 $(samba4srcdir)/%.ho: CFLAGS=$(SAMBA4_CFLAGS)
51 # Create a static library
58 INTERN_LDFLAGS = -L${builddir}/bin/static -L${builddir}/bin/shared
60 pidldir = $(samba4srcdir)/../pidl
61 include $(pidldir)/config.mk
62 include samba4-config.mk
63 include samba4-templates.mk
65 zlibsrcdir := $(samba4srcdir)/lib/zlib
66 dynconfigsrcdir := $(samba4srcdir)/dynconfig
67 heimdalsrcdir := $(samba4srcdir)/heimdal
68 dsdbsrcdir := $(samba4srcdir)/dsdb
69 smbdsrcdir := $(samba4srcdir)/smbd
70 clustersrcdir := $(samba4srcdir)/cluster
71 libnetsrcdir := $(samba4srcdir)/libnet
72 authsrcdir := $(samba4srcdir)/auth
73 nsswitchsrcdir := $(samba4srcdir)/nsswitch
74 libsrcdir := $(samba4srcdir)/lib
75 libsocketsrcdir := $(samba4srcdir)/lib/socket
76 libcharsetsrcdir := $(samba4srcdir)/lib/charset
77 ldb_sambasrcdir := $(samba4srcdir)/lib/ldb-samba
78 libtlssrcdir := $(samba4srcdir)/lib/tls
79 libregistrysrcdir := $(samba4srcdir)/lib/registry
80 libmessagingsrcdir := $(samba4srcdir)/lib/messaging
81 libeventssrcdir := $(samba4srcdir)/lib/events
82 libcmdlinesrcdir := $(samba4srcdir)/lib/cmdline
83 poptsrcdir := $(samba4srcdir)/../lib/popt
84 socketwrappersrcdir := $(samba4srcdir)/../lib/socket_wrapper
85 nsswrappersrcdir := $(samba4srcdir)/../lib/nss_wrapper
86 libstreamsrcdir := $(samba4srcdir)/lib/stream
87 libutilsrcdir := $(samba4srcdir)/lib/util
88 libtdrsrcdir := $(samba4srcdir)/lib/tdr
89 libdbwrapsrcdir := $(samba4srcdir)/lib/dbwrap
90 libcryptosrcdir := $(samba4srcdir)/../lib/crypto
91 libtorturesrcdir := $(samba4srcdir)/lib/torture
92 libcompressionsrcdir := $(samba4srcdir)/../lib/compression
93 libgencachesrcdir := $(samba4srcdir)/lib
94 paramsrcdir := $(samba4srcdir)/param
95 smb_serversrcdir := $(samba4srcdir)/smb_server
96 rpc_serversrcdir := $(samba4srcdir)/rpc_server
97 ldap_serversrcdir := $(samba4srcdir)/ldap_server
98 web_serversrcdir := $(samba4srcdir)/web_server
99 winbindsrcdir := $(samba4srcdir)/winbind
100 nbt_serversrcdir := $(samba4srcdir)/nbt_server
101 wrepl_serversrcdir := $(samba4srcdir)/wrepl_server
102 cldap_serversrcdir := $(samba4srcdir)/cldap_server
103 librpcsrcdir := $(samba4srcdir)/librpc
104 torturesrcdir := $(samba4srcdir)/torture
105 utilssrcdir := $(samba4srcdir)/utils
106 ntvfssrcdir := $(samba4srcdir)/ntvfs
107 ntptrsrcdir := $(samba4srcdir)/ntptr
108 clientsrcdir := $(samba4srcdir)/client
109 libclisrcdir := $(samba4srcdir)/libcli
110 libclinbtsrcdir := $(samba4srcdir)/../libcli
111 pyscriptsrcdir := $(samba4srcdir)/scripting/python
112 kdcsrcdir := $(samba4srcdir)/kdc
113 smbreadlinesrcdir := $(samba4srcdir)/lib/smbreadline
114 ntp_signdsrcdir := $(samba4srcdir)/ntp_signd
115 tdbsrcdir := $(samba4srcdir)/../lib/tdb
116 ldbsrcdir := $(samba4srcdir)/lib/ldb
117 tallocsrcdir := $(samba4srcdir)/../lib/talloc
118 comsrcdir := $(samba4srcdir)/lib/com
119 override ASN1C = bin/asn1_compile4
120 override ET_COMPILER = bin/compile_et4
121 include samba4-data.mk
122 include $(samba4srcdir)/static_deps.mk
123 include $(samba4srcdir)/build/make/python.mk
127 $(DESTDIR)$(bindir)/%: bin/%4 installdirs
129 @echo Installing $(@F) as $@
130 @if test -f $@; then rm -f $@.old; mv $@ $@.old; fi
132 @chmod $(INSTALLPERMS) $@
134 $(DESTDIR)$(sbindir)/%: bin/%4 installdirs
136 @echo Installing $(@F) as $@
137 @if test -f $@; then rm -f $@.old; mv $@ $@.old; fi
139 @chmod $(INSTALLPERMS) $@
142 @echo Removing samba 4 objects
143 @-find $(samba4srcdir) -name '*.o' -exec rm -f '{}' \;
144 @echo Removing samba 4 hostcc objects
145 @-find $(samba4srcdir) -name '*.ho' -exec rm -f '{}' \;
146 @echo Removing samba 4 libraries
147 @-rm -f $(STATIC_LIBS) $(SHARED_LIBS)
148 @-rm -f bin/static/*.a bin/shared/*.$(SHLIBEXT) bin/mergedobj/*.o
149 @echo Removing samba 4 modules
150 @-rm -f bin/modules/*/*.$(SHLIBEXT)
151 @-rm -f bin/*_init_module.c
152 @echo Removing samba 4 dummy targets
154 @echo Removing samba 4 generated files
155 @-rm -f bin/*_init_module.c
156 @-rm -rf $(samba4srcdir)/librpc/gen_*
158 proto:: $(PROTO_HEADERS)
161 all:: basics bin/samba4 bin/regpatch4 bin/regdiff4 bin/regshell4 bin/regtree4 bin/smbclient4
162 torture:: basics bin/smbtorture4
163 everything:: basics $(patsubst %,%4,$(BINARIES))
167 etags --append=yes `find $(samba4srcdir) -name "*.
[ch
]"`
170 ctags --append=yes `find $(samba4srcdir) -name "*.
[ch
]"`