From: Christophe de Dinechin <dinechin@xxxxxxxxxx> Make-it-Quick is a make-only build system that uses makefiles for autoconfiguration. For SPICE, it provides a faster, easier to maintain and more flexible build system. A key feature made possible by this build system is top-level builds. Top-level builds are made from a 'spice' directory that has protocol, common, server and client as its sub-directories. This makes it easy to make changes in protocol or common and rebuild all impacted server and client code, with proper header dependency tracking. The make-it-quick system is still evolving rapidly. In its current incarnation, it does not yet offer all the usual targets expected from a makefile generated by automake. Github review link: https://github.com/c3d/spice-common/commits/c3d-build Signed-off-by: Christophe de Dinechin <dinechin@xxxxxxxxxx> --- Makefile | 5 +++ common/Makefile | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 Makefile create mode 100644 common/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6ddf718 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +MIQ=make-it-quick/ +SUBDIRS=common +include $(MIQ)rules.mk +$(MIQ)rules.mk: + git clone http://github.com/c3d/make-it-quick diff --git a/common/Makefile b/common/Makefile new file mode 100644 index 0000000..38895ed --- /dev/null +++ b/common/Makefile @@ -0,0 +1,121 @@ +MIQ=../make-it-quick/ + +ifeq ($(VARIANT),) +override VARIANTS= common server client +endif + +PRODUCTS= $(PRODUCTS_$(VARIANT)) +PRODUCTS_common=spice-common.dll +PRODUCTS_server=spice-common-server.dll +PRODUCTS_client=spice-common-client.dll + +PKGCONFIGS= pixman-1 \ + openssl \ + gobject-2.0 \ + gio-2.0 \ + gthread-2.0 \ + glib-2.0 \ + opus? \ + celt051? + +ifndef SPICE_PROTOCOL +PKGCONFIGS+= spice-protocol +endif + +CONFIG= alloca \ + <execinfo.h> \ + <stdlib.h> \ + <alloca.h> + +INCLUDES= . \ + .. \ + $(SPICE_PROTOCOL) + +DEFINES= HAVE_CONFIG_H \ + $(DEFINES_$(TARGET)) +DEFINES_debug= ENABLE_EXTRA_CHECKS + + +SOURCES= backtrace.c \ + canvas_utils.c \ + lines.c \ + log.c \ + lz.c \ + marshaller.c \ + mem.c \ + pixman_utils.c \ + quic.c \ + region.c \ + rop3.c \ + snd_codec.c \ + ssl_verify.c \ + sw_canvas.c \ + $(SOURCES_$(OS_NAME)) \ + $(SOURCES_$(VARIANT)) + +SOURCES_windows=gdi_canvas.c + +SOURCES_server= \ + generated_server_demarshallers.c \ + generated_server_marshallers.c + +SOURCES_client= \ + generated_client_demarshallers.c \ + generated_client_demarshallers1.c \ + generated_client_marshallers.c \ + generated_client_marshallers1.c + +include $(MIQ)rules.mk + +$(MIQ)rules.mk: + git submodule update --init --recursive && ln -s recorder/make-it-quick .. + +MARSHALLERS_DEPS = \ + ../spice.proto \ + ../python_modules/__init__.py \ + ../python_modules/codegen.py \ + ../python_modules/demarshal.py \ + ../python_modules/marshal.py \ + ../python_modules/ptypes.py \ + ../python_modules/spice_parser.py \ + ../spice_codegen.py + +MARSHALLER_GENERATED = \ + generated_client_marshallers.h \ + generated_server_marshallers.h \ + generated_client_demarshallers.c \ + generated_client_demarshallers1.c \ + generated_client_marshallers.c \ + generated_client_marshallers1.c \ + generated_server_demarshallers.c \ + generated_server_marshallers.c \ + +.prebuild: $(MARSHALLER_GENERATED) + + +# 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_%.c generated_%.h: $(MARSHALLERS_DEPS) $(MAKEFILE_DEPS) + $(PRINT_GENERATE) $(PYTHON) $(GENERATE_CODEGEN) +GENERATE_CODEGEN=../spice_codegen.py $(GEN_$@) $< $@ >/dev/null +GEN_generated_client_demarshallers.c= \ + --generate-demarshallers --client --include common/messages.h +GEN_generated_client_demarshallers1.c= \ + --generate-demarshallers --client --include common/messages.h \ + --prefix 1 --ptrsize 8 +GEN_generated_client_marshallers.h= \ + --generate-marshallers -P --client --include common/messages.h -H +GEN_generated_client_marshallers.c= \ + --generate-marshallers -P --include client_marshallers.h --client +GEN_generated_client_marshallers1.c= \ + --generate-marshallers -P --include common/messages.h \ + --include client_marshallers.h --client --prefix 1 --ptrsize 8 +GEN_generated_server_demarshallers.c= \ + --generate-demarshallers --server --include common/messages.h +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 -M Composite +GEN_generated_server_marshallers.c= \ + --generate-marshallers $(STRUCTS) --server \ + --include common/messages.h +GEN_generated_server_marshallers.h= \ + --generate-marshallers $(STRUCTS) --server \ + --include common/messages.h -H -- 2.13.5 (Apple Git-94) _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel