diff src/Makefile @ 78:3645e29e4986

Add runtime for Xlib.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 20 Aug 2008 23:33:04 +0800
parents a6763f080da5
children 565b55508c8d
line wrap: on
line diff
--- a/src/Makefile	Wed Aug 20 00:32:11 2008 +0800
+++ b/src/Makefile	Wed Aug 20 23:33:04 2008 +0800
@@ -5,13 +5,17 @@
 TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g}
 CFLAGS+=	-Wall -I/usr/local/include `pkg-config --cflags cairo`
 LDFLAGS =	`pkg-config --libs cairo`
-BINS =	testcase X_main
+BINS =	testcase libmbfly.a X_main
 
 all: $(BINS)
 
 testcase: testcase.o $(TESTCASE_OBJS)
 	$(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit
 
+libmbfly.a: $(OBJS)
+	$(AR) -cr $@ $(.ALLSRC)
+
+
 .for i in $(TESTCASE_OBJS)
 ${i}: ${i:C/testcase-(.*).o/\1.c/}
 	$(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC)
@@ -20,7 +24,7 @@
 testcase.o:	testcase.c
 	$(CC) $(CFLAGS) -c $(.ALLSRC)
 
-X_main: X_main.o $(OBJS)
+X_main: X_main.o libmbfly.a
 	$(CC) $(CFALGS) `pkg-config --libs cairo` -o $@ $(.ALLSRC)
 
 X_main.o: X_main.c