aboutsummaryrefslogtreecommitdiff
path: root/bindings/vala/examples/Makefile.am
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-10 22:05:20 -0600
committerTed Gould <ted@gould.cx>2011-02-10 22:05:20 -0600
commit889b2da654b149bca523f7f57492de190ae8d865 (patch)
treef242ee496034b8cca5ff132cfe99386265b246a4 /bindings/vala/examples/Makefile.am
parent61a686f2933c677574c17d40b651cd3b5bfba899 (diff)
downloadlibayatana-appindicator-889b2da654b149bca523f7f57492de190ae8d865.tar.gz
libayatana-appindicator-889b2da654b149bca523f7f57492de190ae8d865.tar.bz2
libayatana-appindicator-889b2da654b149bca523f7f57492de190ae8d865.zip
Changing the build so that it uses the right version of the vala files and removes the predefined header location
Diffstat (limited to 'bindings/vala/examples/Makefile.am')
-rw-r--r--bindings/vala/examples/Makefile.am30
1 files changed, 26 insertions, 4 deletions
diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am
index f5f2c56..484a00a 100644
--- a/bindings/vala/examples/Makefile.am
+++ b/bindings/vala/examples/Makefile.am
@@ -1,14 +1,36 @@
+if USE_GTK3
+VER=3
+else
+VER=
+endif
VALAFILES = indicator-example.vala
EXTRA_DIST = $(VALAFILES)
-VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps
+VALAFLAGS = \
+ --pkg appindicator$(VER)-0.1 \
+ --vapidir=$(top_builddir)/bindings/vala \
+ --save-temps
if HAVE_VALAC
-indicator-example: $(VALAFILES) Makefile.am
- $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES)
-check: indicator-example
+BUILT_SOURCES = indicator-example.c
+
+indicator-example.c: $(VALAFILES) Makefile.am
+ $(VALAC) $(VALAFLAGS) -C $< -o $@
+ $(SED) -i "s|#include\s*<\s*libappindicator/app-indicator.h\s*>||g" $@
+
+nodist_indicator_example_SOURCES = indicator-example.c
+indicator_example_CFLAGS = \
+ $(LIBRARY_CFLAGS) \
+ -Wall -Werror \
+ -I$(top_srcdir)/src \
+ -include $(top_srcdir)/src/app-indicator.h
+indicator_example_LDADD = \
+ $(LIBRARY_LIBS) \
+ $(top_builddir)/src/libappindicator$(VER).la
+
+check_PROGRAMS = indicator-example
CLEANFILES = \
*.c \