summaryrefslogtreecommitdiff
path: root/common/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'common/Makefile.am')
-rw-r--r--common/Makefile.am83
1 files changed, 73 insertions, 10 deletions
diff --git a/common/Makefile.am b/common/Makefile.am
index 8551d6e..c9068a5 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1,12 +1,31 @@
NULL =
-noinst_LTLIBRARIES = libspice-common.la
+# Avoid need for python(pyparsing) by end users
+MARSHALLERS = \
+ $(srcdir)/generated_demarshallers.c \
+ $(srcdir)/generated_demarshallers1.c \
+ $(srcdir)/generated_marshallers.c \
+ $(srcdir)/generated_marshallers1.c \
+ $(NULL)
+
+SERVER_MARSHALLERS = \
+ $(srcdir)/generated_server_demarshallers.c \
+ $(srcdir)/generated_server_marshallers.c \
+ $(srcdir)/generated_server_marshallers.h \
+ $(NULL)
+
+BUILT_SOURCES = $(MARSHALLERS) $(SERVER_MARSHALLERS)
+
+noinst_LTLIBRARIES = libspice-common.la libspice-common-server.la
libspice_common_la_SOURCES = \
+ $(MARSHALLERS) \
+ backtrace.c \
+ backtrace.h \
bitops.h \
- client_marshallers.h \
- client_demarshallers.h \
canvas_utils.c \
canvas_utils.h \
+ client_demarshallers.h \
+ client_marshallers.h \
draw.h \
lines.c \
lines.h \
@@ -37,41 +56,85 @@ libspice_common_la_SOURCES = \
spice_common.h \
ssl_verify.c \
ssl_verify.h \
- backtrace.c \
- backtrace.h \
$(NULL)
+libspice_common_server_la_SOURCES = \
+ $(SERVER_MARSHALLERS) \
+ $(NULL)
+
+libspice_common_server_la_CFLAGS = -DFIXME_SERVER_SMARTCARD
+
if SUPPORT_GL
libspice_common_la_SOURCES += \
gl_utils.h \
- glc.h \
glc.c \
- ogl_ctx.h \
+ glc.h \
ogl_ctx.c \
+ ogl_ctx.h \
$(NULL)
endif
-AM_CPPFLAGS = \
+AM_CPPFLAGS = \
$(GL_CFLAGS) \
$(PIXMAN_CFLAGS) \
$(PROTOCOL_CFLAGS) \
+ $(SMARTCARD_CFLAGS) \
$(VISIBILITY_HIDDEN_CFLAGS) \
$(WARN_CFLAGS) \
-std=gnu99 \
$(NULL)
+MARSHALLERS_DEPS = \
+ $(top_srcdir)/python_modules/__init__.py \
+ $(top_srcdir)/python_modules/codegen.py \
+ $(top_srcdir)/python_modules/demarshal.py \
+ $(top_srcdir)/python_modules/marshal.py \
+ $(top_srcdir)/python_modules/ptypes.py \
+ $(top_srcdir)/python_modules/spice_parser.py \
+ $(top_srcdir)/spice_codegen.py \
+ Makefile \
+ $(NULL)
+
+# Note despite being autogenerated these are not part of CLEANFILES, they are
+# actually a part of EXTRA_DIST, to avoid the need for pyparser by end users
+generated_demarshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h $< $@ >/dev/null
+
+generated_demarshallers1.c: $(top_srcdir)/spice1.proto $(MARSHALLERS_DEPS)
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h --prefix 1 --ptrsize 8 $< $@ >/dev/null
+
+generated_marshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include client_marshallers.h --client $< $@ >/dev/null
+
+generated_marshallers1.c: $(top_srcdir)/spice1.proto $(MARSHALLERS_DEPS)
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include client_marshallers.h --client --prefix 1 --ptrsize 8 $< $@ >/dev/null
+
+generated_server_demarshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --server --include messages.h $< $@ >/dev/null
+
+STRUCTS = -M String -M Rect -M Point -M DisplayBase -M Fill -M Opaque -M Copy -M Blend -M Blackness -M Whiteness -M Invers -M Rop3 -M Stroke -M Text -M Transparent -M AlphaBlend
+generated_server_marshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include messages.h $< $@ >/dev/null
+
+generated_server_marshallers.h: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include messages.h -H $< $@ >/dev/null
+
EXTRA_DIST = \
+ $(MARSHALLERS) \
+ $(SERVER_MARSHALLERS) \
canvas_base.c \
canvas_base.h \
gdi_canvas.c \
gdi_canvas.h \
gl_canvas.c \
gl_canvas.h \
- sw_canvas.c \
- sw_canvas.h \
lz_compress_tmpl.c \
lz_decompress_tmpl.c \
quic_family_tmpl.c \
quic_rgb_tmpl.c \
quic_tmpl.c \
+ sw_canvas.c \
+ sw_canvas.h \
$(NULL)
+
+-include $(top_srcdir)/git.mk