diff examples/svg2code_ex/Makefile @ 73:9ab15ebc9061

Observer for mouse events
author Thinker K.F. Li <thinker@branda.to>
date Mon, 18 Aug 2008 01:59:26 +0800
parents 171a8cb7e4b5
children 3645e29e4986
line wrap: on
line diff
--- a/examples/svg2code_ex/Makefile	Wed Aug 13 09:25:57 2008 +0800
+++ b/examples/svg2code_ex/Makefile	Mon Aug 18 01:59:26 2008 +0800
@@ -1,7 +1,12 @@
 SVG=svg2code_ex.svg
 TOOLSDIR=../../tools
+INCS=-I../../src
+CFLAGS=-g `pkg-config --cflags cairo` $(INCS) -Wall
 
-all: $(SVG:C/.svg/.mb/) $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/)
+all:	$(SVG:C/.svg/.o/)
+
+$(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)
 	$(TOOLSDIR)/svg2code.py $(.ALLSRC) $@
@@ -13,7 +18,7 @@
 	m4 -I $(TOOLSDIR) mb_c_header.m4 $(.ALLSRC) > $@
 
 clean:
-	for i in *.mb *.o *~; do \
+	for i in *.mb *.o *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/); do \
 		if [ -e "$$i" ]; then \
 			echo "delete $$i"; \
 			rm -f "$$i"; \