NULL = bin_SCRIPTS = EXTRA_DIST = codegendir = $(libdir)/gdbus-codegen codegen_PYTHON = \ __init__.py \ codegen.py \ codegen_main.py \ codegen_docbook.py \ config.py \ dbustypes.py \ parser.py \ utils.py \ $(NULL) bin_SCRIPTS += gdbus-codegen EXTRA_DIST += gdbus-codegen.in gdbus-codegen: gdbus-codegen.in Makefile $(AM_V_GEN) sed -e s,@libdir\@,$(libdir), -e s,@PYTHON\@,$(PYTHON), $< > $@.tmp && mv $@.tmp $@ @chmod a+x $@ # ---------------------------------------------------------------------------------------------------- BUILT_SOURCES = \ gdbuscodegen-marshal.h gdbuscodegen-marshal.c \ gdbuscodegen-enumtypes.h gdbuscodegen-enumtypes.c \ $(NULL) enumhfiles=gdbusobjectmanagerclient.h gdbusinterfacestub.h gdbusinterface.h gdbuscodegen-enumtypes.h: $(enumhfiles) gdbuscodegen-enumtypes.h.template ( top_builddir=`cd $(top_builddir) && pwd`; \ cd $(srcdir) && glib-mkenums --template gdbuscodegen-enumtypes.h.template $(enumhfiles) ) > \ gdbuscodegen-enumtypes.h.tmp && mv gdbuscodegen-enumtypes.h.tmp gdbuscodegen-enumtypes.h gdbuscodegen-enumtypes.c: $(enumhfiles) gdbuscodegen-enumtypes.c.template ( top_builddir=`cd $(top_builddir) && pwd`; \ cd $(srcdir) && glib-mkenums --template gdbuscodegen-enumtypes.c.template $(enumhfiles) ) > \ gdbuscodegen-enumtypes.c.tmp && mv gdbuscodegen-enumtypes.c.tmp gdbuscodegen-enumtypes.c gdbuscodegen-marshal.h: $(top_srcdir)/src/gdbuscodegen-marshal.list glib-genmarshal $< --prefix=_gdbuscodegen_marshal --header > $@ gdbuscodegen-marshal.c: $(top_srcdir)/src/gdbuscodegen-marshal.list echo "#include \"gdbuscodegen-marshal.h\"" > $@ && glib-genmarshal $< --prefix=_gdbuscodegen_marshal --body >> $@ # temporary library until this has been merged into GLib # pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gdbus-codegen.pc lib_LTLIBRARIES = libgdbus-codegen.la libgdbus_codegenincludedir = $(includedir)/gdbus-codegen libgdbus_codegeninclude_HEADERS = \ gdbusinterface.h \ gdbusinterfacestub.h \ gdbusobject.h \ gdbusobjectproxy.h \ gdbusobjectstub.h \ gdbusobjectmanager.h \ gdbusobjectmanagerclient.h \ gdbusobjectmanagerserver.h \ gdbuscodegen-enumtypes.h \ gdbuscodegenprivate.h \ $(NULL) libgdbus_codegen_la_SOURCES = \ gdbusinterface.h gdbusinterface.c \ gdbusinterfacestub.h gdbusinterfacestub.c \ gdbusobject.h gdbusobject.c \ gdbusobjectproxy.h gdbusobjectproxy.c \ gdbusobjectstub.h gdbusobjectstub.c \ gdbusobjectmanager.h gdbusobjectmanager.c \ gdbusobjectmanagerclient.h gdbusobjectmanagerclient.c \ gdbusobjectmanagerserver.h gdbusobjectmanagerserver.c \ gdbuscodegen-marshal.h gdbuscodegen-marshal.c \ gdbuscodegen-enumtypes.h gdbuscodegen-enumtypes.c \ $(NULL) libgdbus_codegen_la_CFLAGS = \ $(GLIB2_CFLAGS) \ $(NULL) libgdbus_codegen_la_LIBADD = \ $(GLIB2_LIBS) \ $(NULL) # ---------------------------------------------------------------------------------------------------- BUILT_SOURCES += test-generated.h test-generated.c test-generated.h test-generated.c : Makefile.am org.project.xml $(codegen_PYTHON) $(PYTHON) ./codegen_main.py \ --c-namespace Foo \ --interface-prefix org.project. \ --generate-c-code test-generated \ --generate-docbook test-generated-doc \ --annotate "org.project.Bar" Key1 Value1 \ --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \ --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \ --annotate "org.project.Bar::TestSignal" Key4 Value4 \ --annotate "org.project.Bar:ay" Key5 Value5 \ --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \ --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \ --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \ org.project.xml \ $(NULL) noinst_LTLIBRARIES = libgen.la libgen_la_SOURCES = \ test-generated.h test-generated.c \ $(NULL) libgen_la_CFLAGS = \ $(GLIB2_CFLAGS) \ $(NULL) libgen_la_LIBADD = \ $(GLIB2_LIBS) \ libgdbus-codegen.la \ $(NULL) # ---------------------------------------------------------------------------------------------------- noinst_PROGRAMS = test gdbus-example-objectmanager gdbus-example-proxymanager test_SOURCES = test.c util.h util.c test_CFLAGS = $(GLIB2_CFLAGS) test_LDADD = $(GLIB2_LIBS) libgen.la gdbus_example_objectmanager_SOURCES = gdbus-example-objectmanager.c gdbus_example_objectmanager_CFLAGS = $(GLIB2_CFLAGS) gdbus_example_objectmanager_LDADD = $(GLIB2_LIBS) libgen.la gdbus_example_proxymanager_SOURCES = gdbus-example-proxymanager.c gdbus_example_proxymanager_CFLAGS = $(GLIB2_CFLAGS) gdbus_example_proxymanager_LDADD = $(GLIB2_LIBS) libgen.la # ---------------------------------------------------------------------------------------------------- EXTRA_DIST += gdbus-codegen.pc.in CLEANFILES = test-generated.[ch] test-generated-doc-*.xml clean-local: rm -f *~