[passepartout] also create the standalone binary for the inspiration



commit 899c957d4fac3f140ca0e022d912653dd7bd95e0
Author: Sven Herzberg <herzi lanedo com>
Date:   Sat May 2 12:31:22 2009 +0200

    also create the standalone binary for the inspiration
    
    * src/pptout/Makefile.am,
    * src/pptout/inspiration.cc: make sure the standalone application compiles
---
 src/pptout/Makefile.am    |   14 +++++++++++++-
 src/pptout/inspiration.cc |    9 +++++----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/pptout/Makefile.am b/src/pptout/Makefile.am
index 1140328..84b838a 100644
--- a/src/pptout/Makefile.am
+++ b/src/pptout/Makefile.am
@@ -2,7 +2,8 @@ SUBDIRS = document widget icons
 
 EXTRA_DIST = NOTES
 
-bin_PROGRAMS = passepartout
+bin_PROGRAMS=passepartout
+noinst_PROGRAMS=inspiration
 
 dist_noinst_HEADERS=\
 	aboutdialog.h \
@@ -61,6 +62,17 @@ passepartout_LDADD=\
 	$(XMLPP_LIBS) $(GTKMM_LIBS) $(GNOMECANVAS_LIBS) \
 	$(GTHREAD_LIBS) $(GNOME_LIBS) $(GNOMEVFS_LIBS)
 
+inspiration_CPPFLAGS=\
+	-DSTANDALONE_INSPIRATION \
+	$(GTKMM_CFLAGS) \
+	$(WARN_CFLAGS)
+inspiration_LDADD=\
+	widget/libwidget.la \
+	../util/libpptutil.la \
+	$(GTKMM_LIBS) \
+	$(NULL)
+inspiration_SOURCES=inspiration.cc
+
 # Extra dependencies for builddate, so it is rebuilt every time anything else
 # is rebuilt
 passepartout-builddate.$(OBJEXT): \
diff --git a/src/pptout/inspiration.cc b/src/pptout/inspiration.cc
index 4ce94da..a10b376 100644
--- a/src/pptout/inspiration.cc
+++ b/src/pptout/inspiration.cc
@@ -12,10 +12,11 @@
 #include <gdkmm.h>
 #include <util/stringutil.h>
 
-// To build as stand-alone program:
-// g++ -g -DSTANDALONE_INSPIRATION -Wall -o inspiration `pkg-config gtkmm-2.0 --cflags --libs` inspiration.cc 
+#include "defines.h"
+#include <glib/gi18n.h>
+
 #ifdef STANDALONE_INSPIRATION
-unsigned int border_width = 12;
+const unsigned int border_width = 12;
 #endif
 
 class Game: public Gtk::DrawingArea {
@@ -326,7 +327,7 @@ Inspiration::score_change (long score_)
 #ifdef STANDALONE_INSPIRATION
 int main(int argc, char **argv) {
   Gtk::Main kit(argc, argv);
-  Inspiration inspiration;
+  Inspiration& inspiration = Inspiration::instance ();
   Gtk::Main::run(inspiration);
   return 0;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]