Add beginnings of subcompiler

This commit is contained in:
James McKaskill 2013-05-07 22:54:30 -04:00
parent 3f29732c69
commit c5e771dcd0
9 changed files with 668 additions and 216 deletions

View file

@ -3,7 +3,7 @@
LDFLAGS=-g -Wall -Werror -fPIC
CFLAGS=-g -Wall -Werror -fPIC -I. -Wno-unused-function -ansi -pedantic
all: capn.so test
all: capn.so capnpc-c test
clean:
rm -f *.o *.so capnpc-c compiler/*.o
@ -14,11 +14,14 @@ clean:
capn.so: capn-malloc.o capn-stream.o capn.o
$(CC) -shared $(LDFLAGS) $^ -o $@
capnpc-c: compiler/capnpc-c.o compiler/schema.o capn.so
$(CC) $(LDFLAGS) $^ -o $@
test: capn-test
./capn-test
%-test.o: %-test.cpp *.h *.c *.inc
$(CXX) `gtest-config --cppflags --cxxflags` -o $@ -c $<
$(CXX) -g -Wall -Werror -I. `gtest-config --cppflags --cxxflags` -o $@ -c $<
capn-test: capn-test.o capn-stream-test.o
$(CXX) `gtest-config --ldflags --libs` -o $@ $^
capn-test: capn-test.o capn-stream-test.o compiler/schema-test.o compiler/schema.o
$(CXX) -g -Wall -Werror -I. `gtest-config --ldflags --libs` -o $@ $^