From bebdc009b484295f06185b5bab884a3754bbbacd Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 9 Jan 2015 19:13:29 -0800 Subject: Coverage support for coveralls.io. --- Makefile | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c456484..8af52d4 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ dep: clean_leave_profile: @rm -rf obj lib - @rm -f tests/*.pb* tests/google_message?.h + @rm -f tests/google_message?.h @rm -f $(TESTS) tests/testmain.o tests/t.* @rm -f upb/descriptor.pb @rm -rf tools/upbc deps @@ -115,8 +115,8 @@ clean: clean_leave_profile .SECONDEXPANSION: to_srcs = $(subst .,_,$(1)_SRCS) pc = % -make_objs = $$(patsubst upb/$$(pc).c,obj/$$(pc).$(1),$$($$(call to_srcs,$$*))) -make_objs_cc = $$(patsubst upb/$$(pc).cc,obj/$$(pc).$(1),$$($$(call to_srcs,$$*))) +make_objs = $$(patsubst upb/$$(pc).c,obj/upb/$$(pc).$(1),$$($$(call to_srcs,$$*))) +make_objs_cc = $$(patsubst upb/$$(pc).cc,obj/upb/$$(pc).$(1),$$($$(call to_srcs,$$*))) # Core libraries (ie. not bindings). ############################################################### @@ -146,8 +146,7 @@ upb_pb_SRCS = \ # If Lua is present we can use DynASM to regenerate the .h file. ifdef USE_JIT upb_pb_SRCS += upb/pb/compile_decoder_x64.c -obj/pb/compile_decoder_x64.o obj/pb/compile_decoder_x64.lo: upb/pb/compile_decoder_x64.h -obj/pb/compile_decoder_x64.o: CFLAGS=-std=gnu99 +obj/upb/pb/compile_decoder_x64.o obj/upb/pb/compile_decoder_x64.lo: upb/pb/compile_decoder_x64.h upb/pb/compile_decoder_x64.h: upb/pb/compile_decoder_x64.dasc $(E) DYNASM $< @@ -168,11 +167,11 @@ ifeq (, $(findstring -O, $(USER_CPPFLAGS))) OPT = -O3 lib/libupb.a : OPT = -Os lib/libupb.descriptor.a : OPT = -Os -obj/pb/compile_decoder.o : OPT = -Os -obj/pb/compile_decoder_64.o : OPT = -Os +obj/upb/pb/compile_decoder.o : OPT = -Os +obj/upb/pb/compile_decoder_64.o : OPT = -Os ifdef USE_JIT -obj/pb/compile_decoder_x64.o: OPT=-Os +obj/upb/pb/compile_decoder_x64.o: OPT=-Os endif endif @@ -186,19 +185,19 @@ $(UPB_LIBS): lib/lib%.a: $(call make_objs,o) $(Q) mkdir -p lib && ar rcs $@ $^ -obj/%.o: upb/%.c | $$(@D)/. +obj/upb/%.o: upb/%.c | $$(@D)/. $(E) CC $< $(Q) $(CC) $(OPT) $(WARNFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< -obj/%.o: upb/%.cc | $$(@D)/. +obj/upb/%.o: upb/%.cc | $$(@D)/. $(E) CXX $< $(Q) $(CXX) $(OPT) $(WARNFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< -obj/%.lo: upb/%.c | $$(@D)/. +obj/upb/%.lo: upb/%.c | $$(@D)/. $(E) 'CC -fPIC' $< $(Q) $(CC) $(OPT) $(WARNFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< -fPIC -obj/%.lo: upb/%.cc | $$(@D)/. +obj/upb/%.lo: upb/%.cc | $$(@D)/. $(E) CXX $< $(Q) $(CXX) $(OPT) $(WARNFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< -fPIC @@ -315,7 +314,7 @@ clean_googlepb: googlepb: default $(GOOGLEPB_LIB) googlepbtests: googlepb $(GOOGLEPB_TESTS) -lib/libupb.bindings.googlepb.a: $(upb_bindings_googlepb_SRCS:upb/%.cc=obj/%.o) +lib/libupb.bindings.googlepb.a: $(upb_bindings_googlepb_SRCS:upb/%.cc=obj/upb/%.o) $(E) AR $@ $(Q) mkdir -p lib && ar rcs $@ $^ -- cgit v1.2.3