# HG changeset patch # User wycc # Date 1236212383 -28800 # Node ID 6e164a9dd46cac2d2475818f6a3d8bd5621bad72 # Parent 1633b5aadfc38b2c910da7c2c7df91cddf274ea3 Fix the Makefile to generate files correctly. The filebrowser is not working yet. diff -r 1633b5aadfc3 -r 6e164a9dd46c examples/menu/Makefile.am --- a/examples/menu/Makefile.am Thu Mar 05 07:54:35 2009 +0800 +++ b/examples/menu/Makefile.am Thu Mar 05 08:19:43 2009 +0800 @@ -4,29 +4,29 @@ list.so:list.c list.h $(MAKE) $(<:.svg=.o) - $(CC) -shared -o $@ $(<:.svg=.o) + $(CC) $(CFLAGS) -I ../../include -shared -o $@ $(<:.svg=.o) -list.mb: $(srcdir)/list.svg +list.svg.mb: $(srcdir)/list.svg $(top_srcdir)/tools/svg2code.py $< $<.mb -list.c: list.mb list.h - m4 -I $(top_srcdir)/tools mb_c_source.m4 $<.mb > $(<:.svg=.c) +list.c: list.svg.mb list.h + m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $(<:.svg.mb=.c) -list.h: list.mb - m4 -I $(top_srcdir)/tools mb_c_header.m4 $<.mb > $(<:.svg=.h) +list.h: list.svg.mb + m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $(<:.svg.mb=.h) browser.so: browser.c browser.h $(MAKE) $(<:.svg=.o) - $(CC) -shared -o $@ $(<:.svg=.o) + $(CC) $(CFLAGS) -I../../include -I ../../include -shared -o $@ $(<:.svg=.o) browser.h: browser.mb - m4 -I $(top_srcdir)/tools mb_c_header.m4 $<.mb > $(<:.svg=.h) + m4 -I $(top_srcdir)/tools mb_c_header.m4 $(<:.svg=.mb) > $(<:.mb=.h) browser.c: browser.mb browser.h - m4 -I $(top_srcdir)/tools mb_c_source.m4 $<.mb > $(<:.svg=.c) + m4 -I $(top_srcdir)/tools mb_c_source.m4 $(<:.svg=.mb) > $(<:.mb=.c) browser.mb: $(srcdir)/browser.svg - $(top_srcdir)/tools/svg2code.py $< $<.mb + $(top_srcdir)/tools/svg2code.py $< $(<:.svg=.mb) noinst_PROGRAMS = menu filebrowser list.so browser.so EXTRA_DIST = diff -r 1633b5aadfc3 -r 6e164a9dd46c examples/menu/main.c --- a/examples/menu/main.c Thu Mar 05 07:54:35 2009 +0800 +++ b/examples/menu/main.c Thu Mar 05 08:19:43 2009 +0800 @@ -15,23 +15,9 @@ #include #include "menu.h" #include "mbapp.h" +#include "animated_menu.h" -typedef struct _mb_animated_menu { - char **titles; - int *menus_y; - int *items; - int top; - int cur; - int max; - int ready; - int speed; - MBApp *app; - mb_sprite_t *sprite; - mb_obj_t **objects; - mb_obj_t *lightbar; - void (*callback)(struct _mb_animated_menu *m, int sel); -} mb_animated_menu_t; char *menus[] = { "Item 1",