changeset 163:7d700e5f82ba

* revert M4FLAGS
author "Mat <MatLinuxer2@gmail.com>"
date Mon, 20 Oct 2008 14:25:31 +0800
parents 5535899513ce
children 3fec69d26be3
files examples/svg2code_ex/Makefile examples/tank/Makefile
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/examples/svg2code_ex/Makefile	Sun Oct 19 00:33:24 2008 +0800
+++ b/examples/svg2code_ex/Makefile	Mon Oct 20 14:25:31 2008 +0800
@@ -1,10 +1,13 @@
 SVG=svg2code_ex.svg
 TOOLSDIR=/usr/local/share/mb
-INCS=-I/usr/local/include
+INCS=-I/usr/local/include -I../../src/mb
 CFLAGS+=`pkg-config --cflags cairo` $(INCS) -Wall
 LDFLAGS=-L/usr/local/lib `pkg-config --libs cairo`
 LIBS=-lmbfly
 BINS=	ex1
+SVG2CODE=	../../tools/svg2code.py
+MB_C_HEADER=    ../../tools/mb_c_header.m4
+MB_C_SOURCE=    ../../tools/mb_c_source.m4
 
 all:	$(BINS)
 
@@ -18,13 +21,13 @@
 	$(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/)
 
 $(SVG:C/.svg/.mb/): $(SVG)
-	/usr/local/bin/svg2code.py $(.ALLSRC) $@
+	$(SVG2CODE) $(.ALLSRC) $@
 
 $(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/)
-	m4 -I $(TOOLSDIR) mb_c_source.m4 $(.ALLSRC) > $@
+	m4 -I $(TOOLSDIR) $(MB_C_SOURCE) $(.ALLSRC) > $@
 
 $(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/)
-	m4 -I $(TOOLSDIR) mb_c_header.m4 $(.ALLSRC) > $@
+	m4 -I $(TOOLSDIR) $(MB_C_HEADER) $(.ALLSRC) > $@
 
 clean:
 	for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \
@@ -32,4 +35,4 @@
 			echo "delete $$i"; \
 			rm -f "$$i"; \
 		fi; \
-	done
\ No newline at end of file
+	done
--- a/examples/tank/Makefile	Sun Oct 19 00:33:24 2008 +0800
+++ b/examples/tank/Makefile	Mon Oct 20 14:25:31 2008 +0800
@@ -7,7 +7,7 @@
 SVG2CODE=	../../tools/svg2code.py
 MB_C_HEADER=    ../../tools/mb_c_header.m4
 M4 =	m4
-M4FLAGS =	-I /usr/local/share/mb -I../../src/mb
+M4FLAGS =	-I /usr/local/share/mb 
 LDFLAGS +=	
 LIBS +=		-lmbfly -lX11 -L/usr/local/lib `pkg-config --libs cairo`
 CFLAGS +=	-I/usr/local/include `pkg-config --cflags cairo` -I../../src