diff --git a/.gitignore b/.gitignore index 5e1f3fb..9bfa36b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /capn-test /capnpc-c /capn.a +/gtest-all.a .cproject .project .settings diff --git a/Makefile b/Makefile index 1e90bca..3733027 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ prefix = /usr all: capn.a capn.so capnpc-c test clean: - rm -f *.o *.so capnpc-c compiler/*.o + rm -f *.o *.so capnpc-c compiler/*.o *.a gtest/src/*.o %.o: %.c *.h *.inc compiler/*.h $(CC) $(CFLAGS) -c $< -o $@ @@ -26,12 +26,15 @@ test: capn-test ./capn-test %-test.o: %-test.cpp *.h *.c *.inc - $(CXX) --std=c++11 -g -I. -Igtest/include -o $@ -c $< + $(CXX) --std=c++11 -g -I. -Igtest -o $@ -c $< -gtest-all.o: gtest/src/*.cc - $(CXX) --std=c++11 -g -I. -Igtest/include -Igtest -o $@ -c $< +gtest/src/%.o: gtest/src/%.cc gtest/src/*.h + $(CXX) --std=c++11 -g -I. -Igtest -o $@ -c $< -capn-test: capn-test.o capn-stream-test.o compiler/test.capnp.o compiler/schema-test.o compiler/schema.capnp.o capn.a gtest-all.o -lpthread +gtest-all.a: $(patsubst %.cc,%.o,$(wildcard gtest/src/*.cc)) + $(AR) rcs $@ $^ + +capn-test: capn-test.o capn-stream-test.o compiler/test.capnp.o compiler/schema-test.o compiler/schema.capnp.o capn.a gtest-all.a -lpthread $(CXX) -std=c++11 -g -I. -o $@ $^ install: diff --git a/gtest/include/gtest-death-test.h b/gtest/gtest/gtest-death-test.h similarity index 100% rename from gtest/include/gtest-death-test.h rename to gtest/gtest/gtest-death-test.h diff --git a/gtest/include/gtest-message.h b/gtest/gtest/gtest-message.h similarity index 100% rename from gtest/include/gtest-message.h rename to gtest/gtest/gtest-message.h diff --git a/gtest/include/gtest-param-test.h b/gtest/gtest/gtest-param-test.h similarity index 100% rename from gtest/include/gtest-param-test.h rename to gtest/gtest/gtest-param-test.h diff --git a/gtest/include/gtest-param-test.h.pump b/gtest/gtest/gtest-param-test.h.pump similarity index 100% rename from gtest/include/gtest-param-test.h.pump rename to gtest/gtest/gtest-param-test.h.pump diff --git a/gtest/include/gtest-printers.h b/gtest/gtest/gtest-printers.h similarity index 100% rename from gtest/include/gtest-printers.h rename to gtest/gtest/gtest-printers.h diff --git a/gtest/include/gtest-spi.h b/gtest/gtest/gtest-spi.h similarity index 100% rename from gtest/include/gtest-spi.h rename to gtest/gtest/gtest-spi.h diff --git a/gtest/include/gtest-test-part.h b/gtest/gtest/gtest-test-part.h similarity index 100% rename from gtest/include/gtest-test-part.h rename to gtest/gtest/gtest-test-part.h diff --git a/gtest/include/gtest-typed-test.h b/gtest/gtest/gtest-typed-test.h similarity index 100% rename from gtest/include/gtest-typed-test.h rename to gtest/gtest/gtest-typed-test.h diff --git a/gtest/include/gtest.h b/gtest/gtest/gtest.h similarity index 100% rename from gtest/include/gtest.h rename to gtest/gtest/gtest.h diff --git a/gtest/include/gtest_pred_impl.h b/gtest/gtest/gtest_pred_impl.h similarity index 100% rename from gtest/include/gtest_pred_impl.h rename to gtest/gtest/gtest_pred_impl.h diff --git a/gtest/include/gtest_prod.h b/gtest/gtest/gtest_prod.h similarity index 100% rename from gtest/include/gtest_prod.h rename to gtest/gtest/gtest_prod.h diff --git a/gtest/include/internal/gtest-death-test-internal.h b/gtest/gtest/internal/gtest-death-test-internal.h similarity index 100% rename from gtest/include/internal/gtest-death-test-internal.h rename to gtest/gtest/internal/gtest-death-test-internal.h diff --git a/gtest/include/internal/gtest-filepath.h b/gtest/gtest/internal/gtest-filepath.h similarity index 100% rename from gtest/include/internal/gtest-filepath.h rename to gtest/gtest/internal/gtest-filepath.h diff --git a/gtest/include/internal/gtest-internal.h b/gtest/gtest/internal/gtest-internal.h similarity index 100% rename from gtest/include/internal/gtest-internal.h rename to gtest/gtest/internal/gtest-internal.h diff --git a/gtest/include/internal/gtest-linked_ptr.h b/gtest/gtest/internal/gtest-linked_ptr.h similarity index 100% rename from gtest/include/internal/gtest-linked_ptr.h rename to gtest/gtest/internal/gtest-linked_ptr.h diff --git a/gtest/include/internal/gtest-param-util-generated.h b/gtest/gtest/internal/gtest-param-util-generated.h similarity index 100% rename from gtest/include/internal/gtest-param-util-generated.h rename to gtest/gtest/internal/gtest-param-util-generated.h diff --git a/gtest/include/internal/gtest-param-util-generated.h.pump b/gtest/gtest/internal/gtest-param-util-generated.h.pump similarity index 100% rename from gtest/include/internal/gtest-param-util-generated.h.pump rename to gtest/gtest/internal/gtest-param-util-generated.h.pump diff --git a/gtest/include/internal/gtest-param-util.h b/gtest/gtest/internal/gtest-param-util.h similarity index 100% rename from gtest/include/internal/gtest-param-util.h rename to gtest/gtest/internal/gtest-param-util.h diff --git a/gtest/include/internal/gtest-port.h b/gtest/gtest/internal/gtest-port.h similarity index 100% rename from gtest/include/internal/gtest-port.h rename to gtest/gtest/internal/gtest-port.h diff --git a/gtest/include/internal/gtest-string.h b/gtest/gtest/internal/gtest-string.h similarity index 100% rename from gtest/include/internal/gtest-string.h rename to gtest/gtest/internal/gtest-string.h diff --git a/gtest/include/internal/gtest-tuple.h b/gtest/gtest/internal/gtest-tuple.h similarity index 100% rename from gtest/include/internal/gtest-tuple.h rename to gtest/gtest/internal/gtest-tuple.h diff --git a/gtest/include/internal/gtest-tuple.h.pump b/gtest/gtest/internal/gtest-tuple.h.pump similarity index 100% rename from gtest/include/internal/gtest-tuple.h.pump rename to gtest/gtest/internal/gtest-tuple.h.pump diff --git a/gtest/include/internal/gtest-type-util.h b/gtest/gtest/internal/gtest-type-util.h similarity index 100% rename from gtest/include/internal/gtest-type-util.h rename to gtest/gtest/internal/gtest-type-util.h diff --git a/gtest/include/internal/gtest-type-util.h.pump b/gtest/gtest/internal/gtest-type-util.h.pump similarity index 100% rename from gtest/include/internal/gtest-type-util.h.pump rename to gtest/gtest/internal/gtest-type-util.h.pump