Merge branch 'master' into gtk3
[projects/chimara/chimara.git] / libchimara / Makefile.am
index f1ef3f4a35bef37afc962277b89adefa391d0826..81c5bc7aec27e371752f666a958b12e63cb0c43e 100644 (file)
@@ -42,7 +42,7 @@ libchimara_la_SOURCES = \
        style.c style.h \
        timer.c timer.h \
        window.c window.h
-libchimara_la_CPPFLAGS = \
+libchimara_la_CPPFLAGS = $(AM_CPPFLAGS) \
        -DG_LOG_DOMAIN=\"Chimara\" \
        -DLOCALEDIR=\""$(datadir)/locale"\" \
        -DPLUGINDIR=\""$(pluginpath)"\" \
@@ -84,7 +84,7 @@ introspection_sources = \
        chimara-if.c chimara-if.h
 
 Chimara-1.0.gir: libchimara.la
-Chimara_1_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gtk-2.0
+Chimara_1_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gtk-3.0
 Chimara_1_0_gir_CFLAGS = @CHIMARA_CFLAGS@ -I$(top_srcdir)
 Chimara_1_0_gir_LIBS = libchimara.la
 Chimara_1_0_gir_FILES = $(introspection_sources)
@@ -103,10 +103,16 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
 CLEANFILES += $(gir_DATA) $(typelib_DATA)
 endif
-
-# Currently, install the Vala VAPI file statically - generation is broken?
+GITIGNOREFILES = Chimara-1.0.gir Chimara-1.0.typelib
 
 vapidir = $(datadir)/vala/vapi
 dist_vapi_DATA = chimara.vapi
 
+if BUILDING_VAPI
+chimara.vapi: $(INTROSPECTION_GIRS)
+       $(AM_V_GEN)$(VAPIGEN) --library=chimara --pkg gtk+-3.0 Chimara-1.0.gir && \
+       touch $@
+endif
+
+MAINTAINERCLEANFILES = chimara.vapi
 -include $(top_srcdir)/git.mk