summaryrefslogtreecommitdiff
path: root/source4/scripting/config.mk
blob: 70296cbc7ca219e6f3dedc6d40540724a1e3beab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
include ejs/config.mk

#######################
# Start LIBRARY swig_tdb
[LIBRARY::swig_tdb]
REQUIRED_SUBSYSTEMS = LIBTDB
# End LIBRARY swig_tdb
#######################

#######################
# Start LIBRARY swig_ldb
[LIBRARY::swig_ldb]
REQUIRED_SUBSYSTEMS = ldb
# End LIBRARY swig_ldb
#######################

#######################
# Start LIBRARY swig_dcerpc
[LIBRARY::swig_dcerpc]
REQUIRED_SUBSYSTEMS = LIBCLI NDR_MISC LIBSAMBA-UTIL LIBSAMBA-CONFIG RPC_NDR_SAMR RPC_NDR_LSA
# End LIBRARY swig_dcerpc
#######################

# Swig extensions
swig: scripting/swig/_tdb.so scripting/swig/_ldb.so

scripting/swig/tdb_wrap.c: scripting/swig/tdb.i
	swig -python scripting/swig/tdb.i

scripting/swig/_tdb.so: scripting/swig/tdb_wrap.o
	$(SHLD) $(SHLD_FLAGS) -o scripting/swig/_tdb.so $(LOCAL_LINK_FLAGS) \
		bin/libtdb.$(SHLIBEXT).0.0.1 \
		scripting/swig/tdb_wrap.o

scripting/swig/ldb_wrap.c: scripting/swig/ldb.i
	swig -python scripting/swig/ldb.i

scripting/swig/_ldb.so: scripting/swig/ldb_wrap.o $(LIBRARY_DYNCONFIG_OBJ_LIST)
	$(SHLD) $(SHLD_FLAGS) -o scripting/swig/_ldb.so $(LOCAL_LINK_FLAGS) \
		$(LIBRARY_DYNCONFIG_LINK_LIST) \
		bin/libtdb.$(SHLIBEXT).0.0.1 \
		bin/libldb.$(SHLIBEXT).0.0.1 \
		scripting/swig/ldb_wrap.o

SWIG_INCLUDES = librpc/gen_ndr/samr.i librpc/gen_ndr/lsa.i librpc/gen_ndr/spoolss.i

scripting/swig/dcerpc_wrap.c: scripting/swig/dcerpc.i scripting/swig/samba.i scripting/swig/status_codes.i $(SWIG_INCLUDES)
	swig -python scripting/swig/dcerpc.i

scripting/swig/_dcerpc.so: scripting/swig/dcerpc_wrap.o $(LIBRARY_swig_dcerpc_DEPEND_LIST)
	$(SHLD) $(SHLD_FLAGS) -o scripting/swig/_dcerpc.so scripting/swig/dcerpc_wrap.o $(LIBRARY_swig_dcerpc_LINK_LIST) $(LIBRARY_swig_dcerpc_LINK_FLAGS)

swig_clean:
	-rm -f scripting/swig/_tdb.so scripting/swig/tdb.pyc scripting/swig/tdb.py scripting/swig/tdb_wrap.c scripting/swig/tdb_wrap.o

# Swig testing

swigtest: swig
	./script/tests/test_swig.sh