# HG changeset patch # User john.cylee@gmail.com # Date 1244777039 -28800 # Node ID 674717c2c3eee6236112ca795a2c2e6339d06e7e # Parent 55f38c2cdb8f43283cd2db63ad0f4c07473c54a8 Use libtool to build .so modules. diff -r 55f38c2cdb8f -r 674717c2c3ee examples/dynamic/Makefile.am --- a/examples/dynamic/Makefile.am Thu Jun 11 08:20:39 2009 +0800 +++ b/examples/dynamic/Makefile.am Fri Jun 12 11:23:59 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 @@ -13,7 +14,7 @@ BUILT_SOURCES = CLEANFILES = menu.c menu.h menu.mb \ button.c button.h button.mb \ - scene.c scene.h scene.mb + scene.c scene.h scene.mbn hello_SOURCES = hello.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 = mytext.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 diff -r 55f38c2cdb8f -r 674717c2c3ee examples/menu/Makefile.am --- a/examples/menu/Makefile.am Thu Jun 11 08:20:39 2009 +0800 +++ b/examples/menu/Makefile.am Fri Jun 12 11:23:59 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