Simpler makefile

No real need to build a gtest archive, gtest-all.cc includes all the
files so a single .o is fine.
This commit is contained in:
Baruch Even 2014-08-03 22:28:41 +03:00
parent 20bd625dc2
commit 54ca88f6ac

View file

@ -28,13 +28,10 @@ test: capn-test
%-test.o: %-test.cpp *.h *.c *.inc %-test.o: %-test.cpp *.h *.c *.inc
$(CXX) --std=c++11 -g -I. -Igtest -o $@ -c $< $(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 $< $(CXX) --std=c++11 -g -I. -Igtest -o $@ -c $<
gtest-all.a: $(patsubst %.cc,%.o,$(wildcard gtest/src/*.cc)) 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
$(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 $@ $^ $(CXX) -std=c++11 -g -I. -o $@ $^
install: install: