diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2015-08-17 14:40:21 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2015-08-17 14:40:21 +0100 |
commit | d5a95fb705c6d450cc5731dc886d1a2f3cb0266b (patch) | |
tree | 5f34124b42ead31c039e2b002879a6304ff16df5 /Makefile | |
parent | fe2d21957e3d58edf0fc695ed787ab75ff07e125 (diff) |
Write a simple Makefile that generate all missing files using
spice-protocol code generator and add some minor files.
Currently Windows is not supported.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0cdbfcf --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +CC ?= gcc + +GENDIR := $(shell pkg-config spice-protocol --variable=codegendir) + +SRCS := plugin.c packet-spice.c packet-main.c +HDRS := packet-main.h packet-spice.h + +spice2.so: $(SRCS) $(HDRS) + $(CC) -O2 -Wall $$(pkg-config --cflags wireshark) -DSPICE_DISSECTOR -fPIC -DPIC -Wl,-soname -Wl,$@ -Wl,--as-needed -o $@ -fwrapv -shared -pthread $(SRCS) + +packet-main.c: $(GENDIR)/spice.proto + $(GENDIR)/spice_codegen.py --generate-dissector $< $@ + +packet-main.h: $(GENDIR)/spice.proto + $(GENDIR)/spice_codegen.py --generate-dissector $< --header $@ + +packet-spice.h: $(GENDIR)/spice.proto + $(GENDIR)/spice_codegen.py --generate-wireshark-dissector $< $@ + +clean:: + rm -f *.o spice2.so packet-main.c packet-spice.h packet-main.h + |