From: Alex Badea Date: Thu, 17 Jun 2010 20:10:23 +0000 (+0300) Subject: applet: optionally build stand-alone executable for testing X-Git-Url: http://git.maemo.org/git/?p=espeaktime;a=commitdiff_plain;h=36322b34face3976bb2cd2501bf9bdbc87a0f84d applet: optionally build stand-alone executable for testing --- diff --git a/src/Makefile.am b/src/Makefile.am index 599f5f3..e6024e6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,3 +11,7 @@ libespeaktime_cp_la_CFLAGS = $(HILDON_CFLAGS) $(OSSO_CFLAGS) libespeaktime_cp_la_LDFLAGS = -module -avoid-version libespeaktime_cp_la_LIBADD = $(HILDON_LIBS) +EXTRA_PROGRAMS = applet +applet_SOURCES = applet.c +applet_CFLAGS = -DTEST $(HILDON_CFLAGS) $(OSSO_CFLAGS) +applet_LDADD = $(HILDON_LIBS) diff --git a/src/applet.c b/src/applet.c index 72e47f1..82170de 100644 --- a/src/applet.c +++ b/src/applet.c @@ -27,3 +27,10 @@ osso_return_t save_state(osso_context_t *osso, gpointer data) return OSSO_OK; } +#ifdef TEST +int main(int argc, char *argv[]) +{ + gtk_init(&argc, &argv); + return execute(NULL, NULL, 0); +} +#endif