Browse files

Merge pull request #1 from typester/maketest

Makefile for testing
  • Loading branch information...
2 parents ca52aa8 + 2d3bb95 commit 46502c0ffb01db2fa116ab615d96946b20bb5b30 @kazuho kazuho committed Nov 17, 2011
Showing with 26 additions and 0 deletions.
  1. +26 −0 Makefile
View
26 Makefile
@@ -0,0 +1,26 @@
+CC?=gcc
+PROVE?=prove
+
+test: build_request build_response
+ $(PROVE) -e '/bin/sh -c' ./test_request
+ $(PROVE) -e '/bin/sh -c' ./test_response
+
+test_request: build_request
+ $(PROVE) -e '/bin/sh -c' ./test_request
+
+test_response: build_request
+ $(PROVE) -e '/bin/sh -c'./test_response
+
+build_request: picohttpparser.o test.o
+ $(CC) $(LDFLAGS) -o test_request $^
+
+build_response: picohttpparser.o test_response.o
+ $(CC) $(LDFLAGS) -o test_response $^
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $<
+
+clean:
+ rm -f *.o
+ rm -f test_request
+ rm -f test_response

0 comments on commit 46502c0

Please sign in to comment.