From 54ca88f6ac018b4a0011f1062316745e8b7a9c19 Mon Sep 17 00:00:00 2001 From: Baruch Even Date: Sun, 3 Aug 2014 22:28:41 +0300 Subject: [PATCH] Simpler makefile No real need to build a gtest archive, gtest-all.cc includes all the files so a single .o is fine. --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3733027..a159d19 100644 --- a/Makefile +++ b/Makefile @@ -28,13 +28,10 @@ test: capn-test %-test.o: %-test.cpp *.h *.c *.inc $(CXX) --std=c++11 -g -I. -Igtest -o $@ -c $< -gtest/src/%.o: gtest/src/%.cc gtest/src/*.h +gtest-all.o: gtest/src/gtest-all.cc gtest/src/*.h gtest/src/*.cc $(CXX) --std=c++11 -g -I. -Igtest -o $@ -c $< -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 +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 $(CXX) -std=c++11 -g -I. -o $@ $^ install: