2016-02-27 15:19:57 +00:00
|
|
|
include $(top_srcdir)/vala-globals.mk
|
|
|
|
|
2015-12-10 12:54:15 +00:00
|
|
|
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Matrix-GLib\"
|
|
|
|
|
2016-03-01 16:42:19 +00:00
|
|
|
# Empty variables for elements to be added later
|
|
|
|
CLEANFILES =
|
|
|
|
BUILT_SOURCES =
|
|
|
|
EXTRA_DIST =
|
2016-02-27 15:19:57 +00:00
|
|
|
AM_VALAFLAGS =
|
|
|
|
|
|
|
|
# Name of the public header file
|
|
|
|
PUBLIC_HEADER = matrix-glib.h
|
2016-03-01 16:42:19 +00:00
|
|
|
|
|
|
|
# Libraries to create
|
2015-12-10 12:54:15 +00:00
|
|
|
lib_LTLIBRARIES = libmatrix-glib-0.0.la
|
2016-03-01 16:42:19 +00:00
|
|
|
|
2016-02-27 15:19:57 +00:00
|
|
|
# Vala source files
|
|
|
|
libmatrix_glib_0_0_la_VALA_SOURCES = \
|
2016-02-18 16:29:21 +00:00
|
|
|
matrix-api.vala \
|
2016-02-28 13:02:44 +00:00
|
|
|
matrix-client.vala \
|
2016-03-04 07:58:56 +00:00
|
|
|
matrix-enums.vala \
|
2016-02-16 16:30:33 +00:00
|
|
|
matrix-http-api.vala \
|
2016-02-15 15:30:06 +00:00
|
|
|
matrix-http-client.vala \
|
2016-02-27 06:51:04 +00:00
|
|
|
matrix-compacts.vala \
|
2016-02-01 16:16:51 +00:00
|
|
|
matrix-event.vala \
|
2016-02-02 15:51:57 +00:00
|
|
|
matrix-presence-event.vala \
|
2016-02-19 13:33:07 +00:00
|
|
|
matrix-state-event.vala \
|
2016-02-03 13:46:29 +00:00
|
|
|
matrix-room-event.vala \
|
2016-02-03 10:31:57 +00:00
|
|
|
matrix-room-member-event.vala \
|
2016-02-26 16:29:18 +00:00
|
|
|
matrix-room-message-event.vala \
|
2016-02-27 15:19:57 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
AM_CPPFLAGS += \
|
|
|
|
-include $(CONFIG_HEADER) \
|
|
|
|
-I$(top_srcdir) \
|
|
|
|
-g \
|
|
|
|
-Wall \
|
|
|
|
$(GLIB_CFLAGS) \
|
|
|
|
$(GOBJECT_CFLAGS) \
|
|
|
|
$(SOUP_CFLAGS) \
|
|
|
|
$(JSON_CFLAGS) \
|
2016-02-01 16:16:51 +00:00
|
|
|
$(GEE_CFLAGS) \
|
2016-02-27 15:19:57 +00:00
|
|
|
$(VALA_CFLAGS) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
AM_VALAFLAGS += \
|
|
|
|
--library=Matrix-$(MATRIX_GLIB_API_VERSION) \
|
|
|
|
$(VALA_PKG_LIST) \
|
|
|
|
--vapi=Matrix-$(MATRIX_GLIB_API_VERSION).vapi \
|
|
|
|
-H $(PUBLIC_HEADER) \
|
|
|
|
-C \
|
|
|
|
--use-header \
|
|
|
|
--gir=Matrix-$(MATRIX_GLIB_API_VERSION).gir \
|
2016-02-18 16:29:21 +00:00
|
|
|
$(top_srcdir)/src/c-api.vapi \
|
2016-02-27 15:19:57 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
vala-stamp: $(libmatrix_glib_0_0_la_VALA_SOURCES)
|
|
|
|
@rm -f vala-temp
|
|
|
|
@touch vala-temp
|
|
|
|
$(AM_V_GEN) $(VALAC) $(AM_VALAFLAGS) $^
|
|
|
|
@mv -f vala-temp $@
|
|
|
|
|
|
|
|
CLEANFILES += \
|
|
|
|
$(PUBLIC_HEADER) \
|
|
|
|
$(libmatrix_glib_0_0_la_VALA_SOURCES:.vala=.c) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
$(libmatrix_glib_0_0_la_VALA_SOURCES:.vala=.c): vala-stamp
|
|
|
|
@if test -f $@; then :; else \
|
|
|
|
trap 'rm -rf vala-lock vala-stamp' 1 2 13 15; \
|
|
|
|
if mkdir vala-lock 2> /dev/null; then \
|
|
|
|
rm -f vala-stamp; \
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) vala-stamp; \
|
|
|
|
rmdir vala-lock; \
|
|
|
|
else \
|
|
|
|
while test -d vala-lock; do sleep 1; done; \
|
|
|
|
test -f vala-stamp; exit $$?; \
|
|
|
|
fi \
|
|
|
|
fi
|
|
|
|
|
2016-03-01 16:42:19 +00:00
|
|
|
# Binaries to create
|
2016-01-22 11:29:10 +00:00
|
|
|
bin_PROGRAMS = test-api-client test-client
|
2015-12-10 12:54:15 +00:00
|
|
|
|
|
|
|
INST_H_SRC_FILES = \
|
|
|
|
$(NULL)
|
|
|
|
|
2015-12-15 10:58:18 +00:00
|
|
|
INST_H_BUILT_FILES = \
|
|
|
|
matrix-version.h \
|
2016-01-27 18:35:19 +00:00
|
|
|
matrix-marshalers.h \
|
2016-01-07 15:57:10 +00:00
|
|
|
$(NULL)
|
2015-12-10 12:54:15 +00:00
|
|
|
|
|
|
|
libmatrix_glib_0_0_la_SOURCES = \
|
2016-03-01 16:42:19 +00:00
|
|
|
$(INST_H_BUILT_FILES) \
|
2016-01-27 18:35:19 +00:00
|
|
|
matrix-marshalers.c \
|
2016-02-27 15:19:57 +00:00
|
|
|
$(libmatrix_glib_0_0_la_VALA_SOURCES:.vala=.c) \
|
2016-01-27 18:35:19 +00:00
|
|
|
matrix-event-types.c \
|
2015-12-10 12:54:15 +00:00
|
|
|
matrix-version.c \
|
|
|
|
$(INST_H_SRC_FILES) \
|
|
|
|
$(NULL)
|
|
|
|
|
2016-03-01 16:42:19 +00:00
|
|
|
libmatrix_glib_0_0_la_CFLAGS = \
|
|
|
|
$(GLIB_CFLAGS) \
|
|
|
|
$(GOBJECT_CFLAGS) \
|
|
|
|
$(SOUP_CFLAGS) \
|
|
|
|
$(JSON_CFLAGS) \
|
2016-02-01 16:16:51 +00:00
|
|
|
$(GEE_CFLAGS) \
|
2016-03-01 16:42:19 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
libmatrix_glib_0_0_la_LIBADD = \
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
$(GOBJECT_LIBS) \
|
|
|
|
$(SOUP_LIBS) \
|
|
|
|
$(JSON_LIBS) \
|
2016-02-01 16:16:51 +00:00
|
|
|
$(GEE_LIBS) \
|
2016-03-01 16:42:19 +00:00
|
|
|
$(NULL)
|
2015-12-10 12:54:15 +00:00
|
|
|
|
2016-03-01 16:42:19 +00:00
|
|
|
libmatrix_glib_0_0_la_LDFLAGS = \
|
|
|
|
-version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)"
|
|
|
|
|
2016-02-27 15:19:57 +00:00
|
|
|
$(PUBLIC_HEADER): vala-stamp
|
|
|
|
|
2016-03-04 11:29:02 +00:00
|
|
|
Matrix-0.0.vapi: libmatrix-glib-$(MATRIX_GLIB_API_VERSION).la
|
|
|
|
vapidir = $(datadir)/vala/vapi
|
|
|
|
dist_vapi_DATA = \
|
|
|
|
Matrix-$(MATRIX_GLIB_API_VERSION).vapi \
|
|
|
|
Matrix-$(MATRIX_GLIB_API_VERSION).deps \
|
|
|
|
$(NULL)
|
|
|
|
|
2016-03-01 16:42:19 +00:00
|
|
|
BUILT_SOURCES += \
|
2016-01-27 18:35:19 +00:00
|
|
|
matrix-marshalers.c \
|
|
|
|
matrix-marshalers.h \
|
2016-01-22 10:40:12 +00:00
|
|
|
$(NULL)
|
2015-12-15 10:58:18 +00:00
|
|
|
|
2016-02-11 10:42:07 +00:00
|
|
|
test_api_client_SOURCES = test-api-client.c
|
2016-02-27 15:19:57 +00:00
|
|
|
test_api_client_CFLAGS = $(libmatrix_glib_0_0_la_CFLAGS) $(AM_CFLAGS)
|
2016-03-01 16:42:19 +00:00
|
|
|
test_api_client_LDADD = \
|
|
|
|
$(libmatrix_glib_0_0_la_LIBADD) \
|
|
|
|
libmatrix-glib-$(MATRIX_GLIB_API_VERSION).la \
|
|
|
|
$(NULL)
|
2015-12-14 15:29:22 +00:00
|
|
|
|
2016-01-22 11:29:10 +00:00
|
|
|
test_client_SOURCES = test-client.c
|
|
|
|
test_client_CFLAGS = $(libmatrix_glib_0_0_la_CFLAGS) $(AM_CFLAGS)
|
|
|
|
test_client_LDADD = \
|
|
|
|
$(libmatrix_glib_0_0_la_LIBADD) \
|
|
|
|
libmatrix-glib-$(MATRIX_GLIB_API_VERSION).la \
|
|
|
|
$(NULL)
|
|
|
|
|
2016-03-01 16:42:19 +00:00
|
|
|
CLEANFILES += $(BUILT_SOURCES)
|
|
|
|
EXTRA_DIST += \
|
2016-01-27 18:35:19 +00:00
|
|
|
matrix-marshalers.list \
|
2015-12-15 10:58:18 +00:00
|
|
|
$(INST_H_SRC_FILES) \
|
|
|
|
$(NULL)
|
|
|
|
|
2016-01-27 18:35:19 +00:00
|
|
|
matrix-marshalers.h: stamp-matrix-marshalers
|
|
|
|
@true
|
|
|
|
|
|
|
|
stamp-matrix-marshalers: matrix-marshalers.list
|
|
|
|
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_matrix_marshal \
|
|
|
|
$(srcdir)/matrix-marshalers.list \
|
|
|
|
--header \
|
|
|
|
--valist-marshallers >> xgen-gmlh \
|
|
|
|
&& (cmp -s xgen-gmlh matrix-marshalers.h \
|
|
|
|
|| cp xgen-gmlh matrix-marshalers.h) \
|
|
|
|
&& rm -f xgen-gmlh \
|
|
|
|
&& echo timestamp > $(@F)
|
|
|
|
|
|
|
|
matrix-marshalers.c: matrix-marshalers.h
|
|
|
|
$(AM_V_GEN) (echo "#include \"matrix-marshalers.h\""; \
|
|
|
|
echo "#undef G_ENABLE_DEBUG"; \
|
|
|
|
$(GLIB_GENMARSHAL) --prefix=_matrix_marshal \
|
|
|
|
$(srcdir)/matrix-marshalers.list \
|
|
|
|
--body \
|
|
|
|
--valist-marshallers) >> xgen-gmlc \
|
|
|
|
&& cp xgen-gmlc matrix-marshalers.c \
|
|
|
|
&& rm -f xgen-gmlc
|
|
|
|
|
|
|
|
CLEANFILES += stamp-matrix-marshalers
|
|
|
|
|
2015-12-10 12:54:15 +00:00
|
|
|
include $(INTROSPECTION_MAKEFILE)
|
2016-03-01 16:42:19 +00:00
|
|
|
Matrix-0.0.gir: libmatrix-glib-$(MATRIX_GLIB_API_VERSION).la
|
|
|
|
|
2015-12-10 12:54:15 +00:00
|
|
|
typelibsdir = $(libdir)/girepository-1.0
|
|
|
|
typelibs_DATA = Matrix-$(MATRIX_GLIB_API_VERSION).typelib
|
|
|
|
|
2016-03-01 16:42:19 +00:00
|
|
|
headerdir = $(includedir)/matrix-glib-$(MATRIX_GLIB_API_VERSION)
|
2015-12-10 12:54:15 +00:00
|
|
|
header_DATA = \
|
2016-02-27 15:19:57 +00:00
|
|
|
$(PUBLIC_HEADER) \
|
2015-12-10 12:54:15 +00:00
|
|
|
$(INST_H_SRC_FILES) \
|
|
|
|
$(INST_H_BUILT_FILES) \
|
|
|
|
$(NULL)
|
|
|
|
|
2016-03-04 11:29:02 +00:00
|
|
|
CLEANFILES += $(typelibs_DATA)
|