summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 1f554b706a6a6beb54344d96899984f869a48a4d (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
EXTSOURCES =	xproto.py \
		bigreq.py \
		xc_misc.py
EXTENSION_XML = xproto.xml \
		bigreq.xml \
		xc_misc.xml

pkgpythondir = $(pyexecdir)/xcb

pkgpython_LTLIBRARIES = xcb.la

xcb_la_LIBADD = $(LIBXCB_LIBS)
xcb_la_CPPFLAGS = -I$(PYTHON_INCLUDE)
xcb_la_CFLAGS = -g $(CWARNFLAGS) $(LIBXCB_CFLAGS)
xcb_la_LDFLAGS = -module
xcb_la_SOURCES = conn.c constant.c cookie.c error.c event.c except.c \
		 ext.c extkey.c iter.c list.c module.c protobj.c \
		 reply.c request.c response.c struct.c union.c void.c \
		 py_client.py

noinst_HEADERS = conn.h constant.h cookie.h error.h event.h except.h \
		 ext.h extkey.h iter.h list.h module.h protobj.h \
		 reply.h request.h response.h struct.h union.h void.h
include_HEADERS = xpyb.h

# FIXME: find a way to autogenerate this from the XML files.

if BUILD_COMPOSITE
EXTSOURCES += composite.py
EXTENSION_XML += composite.xml
endif

if BUILD_DAMAGE
EXTSOURCES += damage.py
EXTENSION_XML += damage.xml
endif

if BUILD_DPMS
EXTSOURCES += dpms.py
EXTENSION_XML += dpms.xml
endif

if BUILD_DRI2
EXTSOURCES += dri2.py
EXTENSION_XML += dri2.xml
endif

if BUILD_GLX
EXTSOURCES += glx.py
EXTENSION_XML += glx.xml
endif

if BUILD_RANDR
EXTSOURCES += randr.py
EXTENSION_XML += randr.xml
endif

if BUILD_RECORD
EXTSOURCES += record.py
EXTENSION_XML += record.xml
endif

if BUILD_RENDER
EXTSOURCES += render.py
EXTENSION_XML += render.xml
endif

if BUILD_RESOURCE
EXTSOURCES += res.py
EXTENSION_XML += res.xml
endif

if BUILD_SCREENSAVER
EXTSOURCES += screensaver.py
EXTENSION_XML += screensaver.xml
endif

if BUILD_SHAPE
EXTSOURCES += shape.py
EXTENSION_XML += shape.xml
endif

if BUILD_SHM
EXTSOURCES += shm.py
EXTENSION_XML += shm.xml
endif

if BUILD_SYNC
EXTSOURCES += sync.py
EXTENSION_XML += sync.xml
endif

if BUILD_XEVIE
EXTSOURCES += xevie.py
EXTENSION_XML += xevie.xml
endif

if BUILD_XFREE86_DRI
EXTSOURCES += xf86dri.py
EXTENSION_XML += xf86dri.xml
endif

if BUILD_XFIXES
EXTSOURCES += xfixes.py
EXTENSION_XML += xfixes.xml
endif

if BUILD_XINERAMA
EXTSOURCES += xinerama.py
EXTENSION_XML += xinerama.xml
endif

if BUILD_XINPUT
EXTSOURCES += xinput.py
EXTENSION_XML += xinput.xml
endif

if BUILD_XPRINT
EXTSOURCES += xprint.py
EXTENSION_XML += xprint.xml
endif

if BUILD_SELINUX
EXTSOURCES += xselinux.py
EXTENSION_XML += xselinux.xml
endif

if BUILD_XTEST
EXTSOURCES += xtest.py
EXTENSION_XML += xtest.xml
endif

if BUILD_XV
EXTSOURCES += xv.py
EXTENSION_XML += xv.xml
endif

if BUILD_XVMC
EXTSOURCES += xvmc.py
EXTENSION_XML += xvmc.xml
endif


pkgpython_PYTHON = __init__.py
nodist_pkgpython_PYTHON = $(EXTSOURCES)

BUILT_SOURCES = $(EXTSOURCES)
CLEANFILES = $(EXTSOURCES) $(EXTENSION_XML)

$(EXTSOURCES): py_client.py

SUFFIXES = .xml

.xml.py:
	$(PYTHON) $(srcdir)/py_client.py -p $(XCBPROTO_XCBPYTHONDIR) $(XCBPROTO_XCBINCLUDEDIR)/$<

$(EXTENSION_XML):
	$(LN_S) -f $(XCBPROTO_XCBINCLUDEDIR)/$@ $@