diff Makefile.in @ 853:19fdeef40ada

Factor out common request functionality, in preparation for supporting different protocols
author Adam Chlipala <adamc@hcoop.net>
date Tue, 23 Jun 2009 14:05:12 -0400
parents 5368deb3764b
children 28e42b22424d
line wrap: on
line diff
--- a/Makefile.in	Tue Jun 23 12:53:47 2009 -0400
+++ b/Makefile.in	Tue Jun 23 14:05:12 2009 -0400
@@ -13,7 +13,7 @@
 
 smlnj: src/urweb.cm
 mlton: bin/urweb
-c: lib/c/urweb.o lib/c/driver.o
+c: lib/c/urweb.o lib/c/request.o lib/c/driver.o
 
 clean:
 	rm -f src/*.mlton.grm.* src/*.mlton.lex.* \
@@ -21,11 +21,8 @@
 		lib/c/*.o
 	rm -rf .cm src/.cm
 
-lib/c/urweb.o: src/c/urweb.c include/*.h
-	gcc -O3 -I include -c src/c/urweb.c -o lib/c/urweb.o $(CFLAGS)
-
-lib/c/driver.o: src/c/driver.c include/*.h
-	gcc -O3 -I include -c src/c/driver.c -o lib/c/driver.o $(CFLAGS)
+lib/c/%.o: src/c/%.c include/*.h
+	gcc -O3 -I include -c $< -o $@ $(CFLAGS)
 
 src/urweb.cm: src/prefix.cm src/sources
 	cat src/prefix.cm src/sources \