Mercurial > MadButterfly
changeset 404:e774868fb7df
merge
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 16 Jun 2009 23:03:07 +0800 |
parents | aee0f66b1154 (current diff) 6024f98bbf5e (diff) |
children | 903283e72c5d 92a459a1c5aa |
files | |
diffstat | 9 files changed, 34 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Tue Jun 16 23:01:38 2009 +0800 +++ b/configure.ac Tue Jun 16 23:03:07 2009 +0800 @@ -13,8 +13,8 @@ AC_PROG_LIBTOOL # Checks for libraries. -PKG_CHECK_MODULES([cairo], [cairo >= 0.22], , AC_MSG_ERROR([cairo >= 0.22 not found])) -PKG_CHECK_MODULES([pangocairo], [pangocairo >= 0.22], , AC_MSG_ERROR([pangocairo >= 0.22 not found])) +PKG_CHECK_MODULES([cairo], [cairo >= 1.6], , AC_MSG_ERROR([cairo >= 1.6 not found])) +PKG_CHECK_MODULES([pangocairo], [pangocairo >= 1.22], , AC_MSG_ERROR([pangocairo >= 1.22 not found])) # Checks for header files. AC_PATH_X
--- a/examples/dynamic/Makefile.am Tue Jun 16 23:01:38 2009 +0800 +++ b/examples/dynamic/Makefile.am Tue Jun 16 23:03:07 2009 +0800 @@ -2,7 +2,8 @@ #SUFFIXES=.svg .mbso -noinst_PROGRAMS = dynamic hello text button.so mytext.so scene.so +noinst_PROGRAMS = dynamic hello text +noinst_LTLIBRARIES = button.la mytext.la scene.la EXTRA_DIST = menu.svg button.svg dynamic_SOURCES = main.c @@ -25,12 +26,20 @@ text_LDFLAGS = @pangocairo_LIBS@ text_LDADD = $(top_builddir)/src/libmbfly.la -button.so: button.o - $(CC) $(CFLAGS) -I ../../include -shared -o $@ $< + +button_la_SOURCES = button.c +button_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared + -button.o: button.c button.h +mytext_la_SOURCES = mytext.c +mytext_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared + -button.c: button.mb +scene_la_SOURCES = scene.c +scene_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared + + +button.c: button.mb button.h m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ button.h: button.mb @@ -39,12 +48,7 @@ button.mb: button.svg $(top_srcdir)/tools/svg2code.py $< $@ -mytext.so: mytext.o - $(CC) $(CFLAGS) -I ../../include -shared -o $@ $< - -mytext.o: mytext.c mytext.h - -mytext.c: mytext.mb +mytext.c: mytext.mb mytext.h m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ mytext.h: mytext.mb @@ -53,12 +57,7 @@ mytext.mb: mytext.svg $(top_srcdir)/tools/svg2code.py $< $@ -scene.so: scene.o - $(CC) $(CFLAGS) -I ../../include -shared -o $@ $< - -scene.o: scene.c scene.h - -scene.c: scene.mb +scene.c: scene.mb scene.h m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ scene.h: scene.mb
--- a/examples/dynamic/hello.c Tue Jun 16 23:01:38 2009 +0800 +++ b/examples/dynamic/hello.c Tue Jun 16 23:03:07 2009 +0800 @@ -48,7 +48,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("scene"); + myApp = MBApp_Init(".libs/scene"); data.currentscene=0; MBApp_setData(myApp,&data); //b = mb_button_new(myApp, myApp->rootsprite, "btn");
--- a/examples/dynamic/main.c Tue Jun 16 23:01:38 2009 +0800 +++ b/examples/dynamic/main.c Tue Jun 16 23:03:07 2009 +0800 @@ -121,7 +121,7 @@ mb_button_t *b; mb_sprite_t *sprite; - sprite = sprite_load("button", myApp->rdman, myApp->rdman->root_coord); + sprite = sprite_load(".libs/button", myApp->rdman, myApp->rdman->root_coord); b = mb_button_new(myApp->rdman, sprite, "btn"); mb_button_add_onClick(b, test,NULL); } @@ -140,7 +140,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("scene"); + myApp = MBApp_Init(".libs/scene"); data.currentscene=0; draw_text(); MBApp_setData(myApp,&data);
--- a/examples/dynamic/text.c Tue Jun 16 23:01:38 2009 +0800 +++ b/examples/dynamic/text.c Tue Jun 16 23:03:07 2009 +0800 @@ -67,7 +67,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("mytext"); + myApp = MBApp_Init(".libs/mytext"); data.currentscene=0; MBApp_setData(myApp,&data); get_now(&tmo);
--- a/examples/menu/Makefile.am Tue Jun 16 23:01:38 2009 +0800 +++ b/examples/menu/Makefile.am Tue Jun 16 23:03:07 2009 +0800 @@ -2,34 +2,31 @@ #SUFFIXES=.svg .so -list.so: list.o - $(CC) $(CFLAGS) -I ../../include -shared -o $@ $< - -list.o: list.h +noinst_LTLIBRARIES = list.la browser.la +list_la_SOURCES = list.c +list_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared +browser_la_SOURCES = browser.c +browser_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared list.mb: $(srcdir)/list.svg $(top_srcdir)/tools/svg2code.py $< $@ -list.c: list.mb +list.c: list.mb list.h m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ list.h: list.mb m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ -browser.so: browser.o - $(CC) $(CFLAGS) -I../../include -I ../../include -shared -o $@ $< - -browser.o: browser.h - browser.h: browser.mb m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ -browser.c: browser.mb +browser.c: browser.mb browser.h m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ + browser.mb: $(srcdir)/browser.svg $(top_srcdir)/tools/svg2code.py $< $@ -noinst_PROGRAMS = menu filebrowser list.so browser.so +noinst_PROGRAMS = menu filebrowser EXTRA_DIST = menu_SOURCES = main.c
--- a/examples/menu/filebrowser.c Tue Jun 16 23:01:38 2009 +0800 +++ b/examples/menu/filebrowser.c Tue Jun 16 23:03:07 2009 +0800 @@ -226,7 +226,7 @@ dir = argv[1]; else dir ="/tmp"; - myApp = MBApp_Init("browser"); + myApp = MBApp_Init(".libs/browser"); MBApp_setData(myApp,&data); MyApp_InitContent(dir);
--- a/examples/menu/main.c Tue Jun 16 23:01:38 2009 +0800 +++ b/examples/menu/main.c Tue Jun 16 23:03:07 2009 +0800 @@ -76,7 +76,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("list"); + myApp = MBApp_Init(".libs/list"); MBApp_setData(myApp,&data); MyApp_InitContent();
--- a/src/sprite.c Tue Jun 16 23:01:38 2009 +0800 +++ b/src/sprite.c Tue Jun 16 23:03:07 2009 +0800 @@ -57,7 +57,7 @@ return NULL; } s = name + strlen(name)-1; - while((s != name) && *s != '/') s--; + while((s != name) && *(s-1) != '/') s--; snprintf(path,sizeof(path), "%s_new", s); new = dlsym(handle,path); if (new == NULL) {