Mercurial > MadButterfly
changeset 178:d0646a6df46f
Autoolize examples.
author | sylee@eeepc |
---|---|
date | Sun, 02 Nov 2008 02:37:18 +0800 |
parents | c8cf6343868b |
children | 06a90c35ba67 |
files | Makefile.am autogen.sh configure.ac examples/Makefile.am examples/calculator/Makefile examples/calculator/Makefile.am examples/calculator/Makefile.pmake examples/svg2code_ex/Makefile examples/svg2code_ex/Makefile.am examples/svg2code_ex/Makefile.pmake src/Makefile.am |
diffstat | 11 files changed, 128 insertions(+), 88 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.am Sat Nov 01 20:23:35 2008 +0800 +++ b/Makefile.am Sun Nov 02 02:37:18 2008 +0800 @@ -1,4 +1,4 @@ -SUBDIRS = tools src +SUBDIRS = src tools examples pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libmbfly.pc EXTRA_DIST = libmbfly.pc.in
--- a/autogen.sh Sat Nov 01 20:23:35 2008 +0800 +++ b/autogen.sh Sun Nov 02 02:37:18 2008 +0800 @@ -5,4 +5,3 @@ libtoolize --automake --copy automake --add-missing --foreign autoconf -rm -fr autom4te.cache
--- a/configure.ac Sat Nov 01 20:23:35 2008 +0800 +++ b/configure.ac Sun Nov 02 02:37:18 2008 +0800 @@ -34,6 +34,9 @@ AC_CONFIG_FILES([Makefile libmbfly.pc + examples/Makefile + examples/calculator/Makefile + examples/svg2code_ex/Makefile src/Makefile tools/Makefile]) AC_OUTPUT
--- a/examples/Makefile.am Sat Nov 01 20:23:35 2008 +0800 +++ b/examples/Makefile.am Sun Nov 02 02:37:18 2008 +0800 @@ -1,1 +1,1 @@ -SUBDIRS = calculator svg2code_ex tank +SUBDIRS = calculator svg2code_ex
--- a/examples/calculator/Makefile Sat Nov 01 20:23:35 2008 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -SVG=calculator_scr.svg -PREFIX?=/usr/local -INCDIR?=$(PREFIX)/include -LIBDIR?=$(PREFIX)/lib -TOOLSDIR?=$(PREFIX)/share/mb -BINDIR?=$(PREFIX)/bin -INCS=-I$(INCDIR) -CFLAGS+=$(INCS) `pkg-config --cflags cairo` -Wall -LDFLAGS=-L$(LIBDIR) `pkg-config --libs cairo` -LIBS=-lmbfly -BINS= calc -SVG2CODE= $(BINDIR)/svg2code.py -MB_C_HEADER= $(TOOLSDIR)/mb_c_header.m4 -MB_C_SOURCE= $(TOOLSDIR)/mb_c_source.m4 - -all: $(BINS) - -calc: main.o $(SVG:C/.svg/.o/) - $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) - -main.o: main.c $(SVG:C/.svg/.h/) - $(CC) $(CFLAGS) -c -o $@ main.c - -$(SVG:C/.svg/.o/): $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) - $(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/) - -$(SVG:C/.svg/.mb/): $(SVG) - $(SVG2CODE) $(.ALLSRC) $@ - -$(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/) - m4 -I $(TOOLSDIR) $(MB_C_SOURCE) $(.ALLSRC) > $@ - -$(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/) - m4 -I $(TOOLSDIR) $(MB_C_HEADER) $(.ALLSRC) > $@ - -clean: - for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \ - if [ -e "$$i" ]; then \ - echo "delete $$i"; \ - rm -f "$$i"; \ - fi; \ - done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/calculator/Makefile.am Sun Nov 02 02:37:18 2008 +0800 @@ -0,0 +1,19 @@ +noinst_PROGRAMS = calc +EXTRA_DIST = calculator_scr.svg + +calc_SOURCES = main.c +nodist_calc_SOURCES = calculator_scr.c calculator_scr.h +calc_CPPFLAGS = @cairo_CFLAGS@ -I$(srcdir) +calc_LDFLAGS = @cairo_LIBS@ +calc_LDADD = $(top_builddir)/src/libmbfly.la +BUILT_SOURCES = calculator_scr.c calculator_scr.h calculator_scr.mb +CLEANFILES = calculator_scr.c calculator_scr.h calculator_scr.mb + +calculator_scr.mb: $(srcdir)/calculator_scr.svg + $(top_srcdir)/tools/svg2code.py $? $@ + +calculator_scr.h: calculator_scr.mb + m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ + +calculator_scr.c: calculator_scr.mb + m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/calculator/Makefile.pmake Sun Nov 02 02:37:18 2008 +0800 @@ -0,0 +1,42 @@ +SVG=calculator_scr.svg +PREFIX?=/usr/local +INCDIR?=$(PREFIX)/include +LIBDIR?=$(PREFIX)/lib +TOOLSDIR?=$(PREFIX)/share/mb +BINDIR?=$(PREFIX)/bin +INCS=-I$(INCDIR) +CFLAGS+=$(INCS) `pkg-config --cflags cairo` -Wall +LDFLAGS=-L$(LIBDIR) `pkg-config --libs cairo` +LIBS=-lmbfly +BINS= calc +SVG2CODE= $(BINDIR)/svg2code.py +MB_C_HEADER= $(TOOLSDIR)/mb_c_header.m4 +MB_C_SOURCE= $(TOOLSDIR)/mb_c_source.m4 + +all: $(BINS) + +calc: main.o $(SVG:C/.svg/.o/) + $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) + +main.o: main.c $(SVG:C/.svg/.h/) + $(CC) $(CFLAGS) -c -o $@ main.c + +$(SVG:C/.svg/.o/): $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) + $(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/) + +$(SVG:C/.svg/.mb/): $(SVG) + $(SVG2CODE) $(.ALLSRC) $@ + +$(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/) + m4 -I $(TOOLSDIR) $(MB_C_SOURCE) $(.ALLSRC) > $@ + +$(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/) + m4 -I $(TOOLSDIR) $(MB_C_HEADER) $(.ALLSRC) > $@ + +clean: + for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \ + if [ -e "$$i" ]; then \ + echo "delete $$i"; \ + rm -f "$$i"; \ + fi; \ + done
--- a/examples/svg2code_ex/Makefile Sat Nov 01 20:23:35 2008 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -SVG=svg2code_ex.svg -PREFIX?=/usr/local -TOOLSDIR?=$(PREFIX)/share/mb -INCDIR?=$(PREFIX)/include -LIBDIR?=$(PREFIX)/lib -BINDIR?=$(PREFIX)/bin -INCS=-I$(INCDIR) -CFLAGS+=`pkg-config --cflags cairo` $(INCS) -Wall -LDFLAGS=-L$(LIBDIR) `pkg-config --libs cairo` -LIBS=-lmbfly -BINS= ex1 -SVG2CODE= $(BINDIR)/svg2code.py -MB_C_HEADER= $(TOOLSDIR)/mb_c_header.m4 -MB_C_SOURCE= $(TOOLSDIR)/mb_c_source.m4 - -all: $(BINS) - -ex1: main.o $(SVG:C/.svg/.o/) - $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) - -main.o: main.c $(SVG:C/.svg/.h/) - $(CC) $(CFLAGS) -c -o $@ main.c - -$(SVG:C/.svg/.o/): $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) - $(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/) - -$(SVG:C/.svg/.mb/): $(SVG) - $(SVG2CODE) $(.ALLSRC) $@ - -$(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/) - m4 -I $(TOOLSDIR) $(MB_C_SOURCE) $(.ALLSRC) > $@ - -$(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/) - m4 -I $(TOOLSDIR) $(MB_C_HEADER) $(.ALLSRC) > $@ - -clean: - for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \ - if [ -e "$$i" ]; then \ - echo "delete $$i"; \ - rm -f "$$i"; \ - fi; \ - done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/svg2code_ex/Makefile.am Sun Nov 02 02:37:18 2008 +0800 @@ -0,0 +1,19 @@ +noinst_PROGRAMS = ex1 +EXTRA_DIST = svg2code_ex.svg + +ex1_SOURCES = main.c +nodist_ex1_SOURCES = svg2code_ex.c svg2code_ex.h +ex1_CPPFLAGS = @cairo_CFLAGS@ -I$(srcdir) +ex1_LDFLAGS = @cairo_LIBS@ +ex1_LDADD = $(top_builddir)/src/libmbfly.la +BUILT_SOURCES = svg2code_ex.c svg2code_ex.h svg2code_ex.mb +CLEANFILES = svg2code_ex.c svg2code_ex.h svg2code_ex.mb + +svg2code_ex.mb: $(srcdir)/svg2code_ex.svg + $(top_srcdir)/tools/svg2code.py $? $@ + +svg2code_ex.h: svg2code_ex.mb + m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ + +svg2code_ex.c: svg2code_ex.mb + m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/svg2code_ex/Makefile.pmake Sun Nov 02 02:37:18 2008 +0800 @@ -0,0 +1,42 @@ +SVG=svg2code_ex.svg +PREFIX?=/usr/local +TOOLSDIR?=$(PREFIX)/share/mb +INCDIR?=$(PREFIX)/include +LIBDIR?=$(PREFIX)/lib +BINDIR?=$(PREFIX)/bin +INCS=-I$(INCDIR) +CFLAGS+=`pkg-config --cflags cairo` $(INCS) -Wall +LDFLAGS=-L$(LIBDIR) `pkg-config --libs cairo` +LIBS=-lmbfly +BINS= ex1 +SVG2CODE= $(BINDIR)/svg2code.py +MB_C_HEADER= $(TOOLSDIR)/mb_c_header.m4 +MB_C_SOURCE= $(TOOLSDIR)/mb_c_source.m4 + +all: $(BINS) + +ex1: main.o $(SVG:C/.svg/.o/) + $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) + +main.o: main.c $(SVG:C/.svg/.h/) + $(CC) $(CFLAGS) -c -o $@ main.c + +$(SVG:C/.svg/.o/): $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) + $(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/) + +$(SVG:C/.svg/.mb/): $(SVG) + $(SVG2CODE) $(.ALLSRC) $@ + +$(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/) + m4 -I $(TOOLSDIR) $(MB_C_SOURCE) $(.ALLSRC) > $@ + +$(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/) + m4 -I $(TOOLSDIR) $(MB_C_HEADER) $(.ALLSRC) > $@ + +clean: + for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \ + if [ -e "$$i" ]; then \ + echo "delete $$i"; \ + rm -f "$$i"; \ + fi; \ + done
--- a/src/Makefile.am Sat Nov 01 20:23:35 2008 +0800 +++ b/src/Makefile.am Sun Nov 02 02:37:18 2008 +0800 @@ -3,7 +3,7 @@ lib_LTLIBRARIES = libmbfly.la -bin_PROGRAMS = X_main +noinst_PROGRAMS = X_main libmbfly_la_SOURCES = animate.c chgcolor.c coord.c event.c geo.c observer.c paint.c redraw_man.c rotate.c shape_path.c shape_rect.c shape_text.c shift.c timer.c timertool.c tools.c visibility.c X_supp.c libmbfly_la_CPPFLAGS = @cairo_CFLAGS@