--- a/Makefile.am +++ b/Makefile.am @@ -32,6 +32,8 @@ AM_CXXFLAGS = -std=gnu++11 -I./$(PROTOBU LIBS += -lpthread LIBELF = -lelf +LDADD_GFLAGS = -lgflags + COMMON_PROFILE_CREATOR_FILES = addr2line.cc gcov.cc instruction_map.cc \ module_grouper.cc profile_creator.cc \ profile_writer.cc sample_reader.cc \ @@ -40,39 +42,39 @@ COMMON_PROFILE_CREATOR_FILES = addr2line bin_PROGRAMS = create_gcov create_gcov_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) create_gcov.cc -create_gcov_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a $(LIBELF) $(PROTOBUF_DEP) +create_gcov_LDADD = libquipper.a libglog.a libsymbolize.a $(LDADD_GFLAGS) $(LIBELF) $(PROTOBUF_DEP) nodist_create_gcov_SOURCES = $(protoc_outputs) $(am_create_gcov_OBJECTS): $(protoc_outputs) bin_PROGRAMS += dump_gcov dump_gcov_SOURCES = profile_reader.cc symbol_map.cc module_grouper.cc gcov.cc \ dump_gcov.cc -dump_gcov_LDADD = libglog.a libgflags.a libsymbolize.a +dump_gcov_LDADD = libglog.a $(LDADD_GFLAGS) libsymbolize.a bin_PROGRAMS += sample_merger sample_merger_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) sample_merger.cc -sample_merger_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a $(LIBELF) $(PROTOBUF_DEP) +sample_merger_LDADD = libquipper.a libglog.a libsymbolize.a $(LDADD_GFLAGS) $(LIBELF) $(PROTOBUF_DEP) nodist_sample_merger_SOURCES = $(protoc_outputs) $(am_sample_merger_OBJECTS): $(protoc_outputs) bin_PROGRAMS += profile_merger profile_merger_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) profile_reader.cc \ profile_merger.cc -profile_merger_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a $(LIBELF) $(PROTOBUF_DEP) +profile_merger_LDADD = libquipper.a libglog.a libsymbolize.a $(LDADD_GFLAGS) $(LIBELF) $(PROTOBUF_DEP) nodist_profile_merger_SOURCES = $(protoc_outputs) $(am_profile_merger_OBJECTS): $(protoc_outputs) bin_PROGRAMS += profile_diff profile_diff_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) profile_reader.cc \ profile_diff.cc -profile_diff_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a $(LIBELF) $(PROTOBUF_DEP) +profile_diff_LDADD = libquipper.a libglog.a libsymbolize.a $(LDADD_GFLAGS) $(LIBELF) $(PROTOBUF_DEP) nodist_profile_diff_SOURCES = $(protoc_outputs) $(am_profile_diff_OBJECTS): $(protoc_outputs) bin_PROGRAMS += profile_update profile_update_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) profile_reader.cc \ profile_update.cc -profile_update_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a $(LIBELF) $(PROTOBUF_DEP) +profile_update_LDADD = libquipper.a libglog.a libsymbolize.a $(LDADD_GFLAGS) $(LIBELF) $(PROTOBUF_DEP) nodist_profile_update_SOURCES = $(protoc_outputs) $(am_profile_update_OBJECTS): $(protoc_outputs) @@ -80,7 +82,7 @@ bin_PROGRAMS += create_llvm_prof create_llvm_prof_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) \ llvm_profile_writer.cc create_llvm_prof.cc create_llvm_prof_LDADD = $(LLVM_LDFLAGS) $(LLVM_LIBS) libquipper.a libglog.a \ - libsymbolize.a libgflags.a $(LIBELF) $(PROTOBUF_DEP) + libsymbolize.a $(LDADD_GFLAGS) $(LIBELF) $(PROTOBUF_DEP) create_llvm_prof_CXXFLAGS = $(LLVM_CXXFLAGS) -DCREATE_LLVM_PROF nodist_create_llvm_prof_SOURCES = $(protoc_outputs) $(am_create_llvm_prof_OBJECTS): $(protoc_outputs) @@ -121,11 +123,6 @@ libglog_a_SOURCES = glog/src/glog/log_se glog/src/signalhandler.cc \ glog/src/base/mutex.h glog/src/base/googleinit.h \ glog/src/base/commandlineflags.h glog/src/googletest.h -libglog_a_CXXFLAGS = -DNO_THREADS - -noinst_LIBRARIES += libgflags.a -libgflags_a_SOURCES = gflags/gflags.cc gflags/gflags_completions.cc \ - gflags/gflags_reporting.cc noinst_LIBRARIES += libsymbolize.a libsymbolize_a_SOURCES = symbolize/addr2line_inlinestack.cc \