Makefile.am 2.58 KB
Newer Older
1
common_cflags = $(PYGTK_CFLAGS) $(GST_CFLAGS) $(PYGST_CFLAGS) -fno-strict-aliasing
2 3
common_libadd = $(GST_LIBS)
common_ldflags = -module -avoid-version
4

5 6
pkgpythondir = $(pythondir)/gst-$(GST_MAJORMINOR)/gst
pkgpyexecdir = $(pyexecdir)/gst-$(GST_MAJORMINOR)/gst
David I. Lehn's avatar
David I. Lehn committed
7

8 9 10 11
pygstdir = $(pkgpythondir)
pygst_PYTHON = __init__.py

pygstexecdir = $(pkgpyexecdir)
Edward Hervey's avatar
Edward Hervey committed
12
pygstexec_LTLIBRARIES = _gst.la $(interface_lib)
David I. Lehn's avatar
David I. Lehn committed
13

Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
14 15
interface_lib = interfaces.la

16
defs_DATA = gst-types.defs \
17 18
	gst-extrafuncs.defs \
	libs.defs
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
19
defsdir = $(pkgdatadir)/$(GST_MAJORMINOR)/defs
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
20

21
noinst_HEADERS = common.h pygstvalue.h pygstminiobject.h pygstobject.h pygstexception.h
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
22

23
INCLUDES = $(PYTHON_INCLUDES)
24
EXTRA_DIST = $(defs_DATA) common.h arg-types.py
25
PYGTK_DEFSDIR = @PYGTK_DEFSDIR@
26
GEN_FILES = arg-types.py gst-types.defs libs.defs
27 28 29 30

# GStreamer bindings
_gst_la_CFLAGS = $(common_cflags)
_gst_la_LIBADD = $(common_libadd)
31 32
_gst_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gst \
	$(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_NET_LIBS)
33 34 35 36 37 38
_gst_la_SOURCES = 		\
	gst-argtypes.c 		\
	gstmodule.c 		\
	pygstiterator.c		\
	pygstminiobject.c 	\
	pygstobject.c		\
39 40
	pygstvalue.c 		\
	pygstexception.c
41

42
nodist__gst_la_SOURCES = gst.c
43 44 45 46
GST_OVERRIDES = 		\
	gst.override 		\
	gstbin.override 	\
	gstbuffer.override 	\
Edward Hervey's avatar
Edward Hervey committed
47 48
	gstbus.override		\
	gstevent.override	\
49 50
	gstcaps.override 	\
	gstelement.override 	\
51
	gstelementfactory.override \
Edward Hervey's avatar
Edward Hervey committed
52
	gstmessage.override	\
53
	gstobject.override	\
Edward Hervey's avatar
Edward Hervey committed
54
	gstquery.override	\
55
	gstpad.override		\
56
	gststructure.override	\
57
	gsttaglist.override	\
58
	gstlibs.override
59

60
GST_DEFS = gst.defs gst-types.defs gst-extrafuncs.defs libs.defs
61
CLEANFILES = gst.c
62
EXTRA_DIST += $(GST_DEFS) $(GST_OVERRIDES)
63
gst.c: $(GST_DEFS) $(GST_OVERRIDES) $(GEN_FILES)
64

65
# GStreamer interfaces bindings
66
interfaces_la_CFLAGS = $(common_cflags) $(GST_PLUGINS_BASE_CFLAGS)
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
67
interfaces_la_LIBADD = $(common_libadd) -lgstinterfaces-$(GST_MAJORMINOR) 
68
interfaces_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initinterface $(GST_PLUGINS_BASE_LIBS)
69 70
interfaces_la_SOURCES = interfacesmodule.c
nodist_interfaces_la_SOURCES = interfaces.c
71 72
INTERFACES_OVERRIDES = interfaces.override xoverlay.override
INTERFACES_DEFS = interfaces.defs xoverlay.defs xwindowlistener.defs
73
CLEANFILES += interfaces.c
74
EXTRA_DIST += $(INTERFACES_DEFS) $(INTERFACES_OVERRIDES) 
75
interfaces.c: $(INTERFACES_DEFS) $(INTERFACES_OVERRIDES) $(GEN_FILES)
76

77
.defs.c: 
78
	(cd $(srcdir) \
79
	&& python $(top_srcdir)/codegen/codegen.py \
80
		--load-types $(srcdir)/arg-types.py \
81 82 83 84 85
		--register $(srcdir)/gst-types.defs \
		--override $*.override \
		--prefix py$* $*.defs) > gen-$*.c \
	&& cp gen-$*.c $*.c \
	&& rm -f gen-$*.c
86 87

SUBDIRS = extend