From 8854c3a3de5540ac29f29e01b764f338cfdab0ef Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 30 Dec 2009 20:45:33 +0100 Subject: Remove data header generation and pass datadir directly to sources --- configure.ac | 1 - data/data.h.in | 2 -- src/Makefile.am | 23 +++++++++++++++++++++-- src/sbmanager.c | 8 +++----- 4 files changed, 24 insertions(+), 10 deletions(-) delete mode 100644 data/data.h.in diff --git a/configure.ac b/configure.ac index 8e09c86..c0082b5 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,6 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_OUTPUT([ Makefile -data/data.h data/Makefile src/Makefile ]) diff --git a/data/data.h.in b/data/data.h.in deleted file mode 100644 index 9faaea0..0000000 --- a/data/data.h.in +++ /dev/null @@ -1,2 +0,0 @@ -#define BGPIC "@prefix@/share/sbmanager/background.png" -#define PAGE_DOT "@prefix@/share/sbmanager/dot.png" diff --git a/src/Makefile.am b/src/Makefile.am index 7529a0e..90fab74 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,24 @@ -AM_CFLAGS = $(GLOBAL_CFLAGS) $(libiphone_CFLAGS) $(libglib2_CFLAGS) $(libgthread2_CFLAGS) $(libplist_CFLAGS) $(libclutter_CFLAGS) $(libcluttergtk_CFLAGS) $(libgtk_CFLAGS) $(libgdkpixbuf_CFLAGS) -AM_LDFLAGS = $(libiphone_LIBS) $(libglib2_LIBS) $(libgthread2_LIBS) $(libplist_LIBS) $(libclutter_LIBS) $(libcluttergtk_LIBS) $(libgtk_LIBS) $(libgdkpixbuf_LIBS) +AM_CFLAGS = \ + $(GLOBAL_CFLAGS) \ + $(libiphone_CFLAGS) \ + $(libglib2_CFLAGS) \ + $(libgthread2_CFLAGS) \ + $(libplist_CFLAGS) \ + $(libclutter_CFLAGS) \ + $(libcluttergtk_CFLAGS) \ + $(libgtk_CFLAGS) \ + $(libgdkpixbuf_CFLAGS) \ + -DSBMGR_DATA=\"$(pkgdatadir)\" + +AM_LDFLAGS = \ + $(libiphone_LIBS) \ + $(libglib2_LIBS) \ + $(libgthread2_LIBS) \ + $(libplist_LIBS) \ + $(libclutter_LIBS) \ + $(libcluttergtk_LIBS) \ + $(libgtk_LIBS) \ + $(libgdkpixbuf_LIBS) bin_PROGRAMS = sbmanager diff --git a/src/sbmanager.c b/src/sbmanager.c index a13c9bb..6edb89f 100644 --- a/src/sbmanager.c +++ b/src/sbmanager.c @@ -35,8 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include "../data/data.h" - #define STAGE_WIDTH 320 #define STAGE_HEIGHT 480 #define DOCK_HEIGHT 90 @@ -1234,7 +1232,7 @@ int main(int argc, char **argv) GError *err = NULL; actor = clutter_texture_new(); clutter_texture_set_load_async(CLUTTER_TEXTURE(actor), TRUE); - clutter_texture_set_from_file(CLUTTER_TEXTURE(actor), BGPIC, &err); + clutter_texture_set_from_file(CLUTTER_TEXTURE(actor), SBMGR_DATA "/background.png", &err); if (err) { g_error_free(err); err = NULL; @@ -1266,9 +1264,9 @@ int main(int argc, char **argv) /* page indicator (dummy), will be cloned when the pages are created */ page_indicator = clutter_texture_new(); clutter_texture_set_load_async(CLUTTER_TEXTURE(page_indicator), TRUE); - clutter_texture_set_from_file(CLUTTER_TEXTURE(page_indicator), PAGE_DOT, &err); + clutter_texture_set_from_file(CLUTTER_TEXTURE(page_indicator), SBMGR_DATA "/dot.png", &err); if (err) { - fprintf(stderr, "Could not load texture " PAGE_DOT ": %s\n", err->message); + fprintf(stderr, "Could not load texture " SBMGR_DATA "/dot.png" ": %s\n", err->message); g_error_free(err); err = NULL; } -- cgit v1.1-32-gdbae