toolkit/crashreporter/google-breakpad/src/third_party/glog/Makefile.am

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 ## Process this file with automake to produce Makefile.in
michael@0 2
michael@0 3 # Make sure that when we re-make ./configure, we get the macros we need
michael@0 4 ACLOCAL_AMFLAGS = -I m4
michael@0 5
michael@0 6 # This is so we can #include <glog/foo>
michael@0 7 AM_CPPFLAGS = -I$(top_srcdir)/src
michael@0 8
michael@0 9 # This is mostly based on configure options
michael@0 10 AM_CXXFLAGS =
michael@0 11
michael@0 12 # These are good warnings to turn on by default
michael@0 13 if GCC
michael@0 14 AM_CXXFLAGS += -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
michael@0 15 endif
michael@0 16
michael@0 17 # These are x86-specific, having to do with frame-pointers
michael@0 18 if X86_64
michael@0 19 if ENABLE_FRAME_POINTERS
michael@0 20 AM_CXXFLAGS += -fno-omit-frame-pointer
michael@0 21 else
michael@0 22 # TODO(csilvers): check if -fomit-frame-pointer might be in $(CXXFLAGS),
michael@0 23 # before setting this.
michael@0 24 AM_CXXFLAGS += -DNO_FRAME_POINTER
michael@0 25 endif
michael@0 26 endif
michael@0 27
michael@0 28 glogincludedir = $(includedir)/glog
michael@0 29 ## The .h files you want to install (that is, .h files that people
michael@0 30 ## who install this package can include in their own applications.)
michael@0 31 ## We have to include both the .h and .h.in forms. The latter we
michael@0 32 ## put in noinst_HEADERS.
michael@0 33 gloginclude_HEADERS = src/glog/log_severity.h
michael@0 34 nodist_gloginclude_HEADERS = src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h
michael@0 35 noinst_HEADERS = src/glog/logging.h.in src/glog/raw_logging.h.in src/glog/vlog_is_on.h.in src/glog/stl_logging.h.in
michael@0 36
michael@0 37 docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
michael@0 38 ## This is for HTML and other documentation you want to install.
michael@0 39 ## Add your documentation files (in doc/) in addition to these
michael@0 40 ## top-level boilerplate files. Also add a TODO file if you have one.
michael@0 41 dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README.windows \
michael@0 42 doc/designstyle.css doc/glog.html
michael@0 43
michael@0 44 ## The libraries (.so's) you want to install
michael@0 45 lib_LTLIBRARIES =
michael@0 46
michael@0 47 # The libraries libglog depends on.
michael@0 48 COMMON_LIBS = $(PTHREAD_LIBS) $(GFLAGS_LIBS) $(UNWIND_LIBS)
michael@0 49 # Compile switches for our unittest.
michael@0 50 TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(GFLAGS_CFLAGS) $(AM_CXXFLAGS)
michael@0 51 # Libraries for our unittest.
michael@0 52 TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) $(GFLAGS_LIBS)
michael@0 53
michael@0 54 ## unittests you want to run when people type 'make check'.
michael@0 55 ## TESTS is for binary unittests, check_SCRIPTS for script-based unittests.
michael@0 56 ## TESTS_ENVIRONMENT sets environment variables for when you run unittest,
michael@0 57 ## but it only seems to take effect for *binary* unittests (argh!)
michael@0 58 TESTS =
michael@0 59 TESTS_ENVIRONMENT =
michael@0 60 check_SCRIPTS =
michael@0 61 # Every time you add a unittest to check_SCRIPTS, add it here too
michael@0 62 noinst_SCRIPTS =
michael@0 63 # Binaries used for script-based unittests.
michael@0 64 TEST_BINARIES =
michael@0 65
michael@0 66 TESTS += logging_unittest
michael@0 67 logging_unittest_SOURCES = $(gloginclude_HEADERS) \
michael@0 68 src/logging_unittest.cc \
michael@0 69 src/config_for_unittests.h \
michael@0 70 src/mock-log.h
michael@0 71 nodist_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 72 logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 73 logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 74 logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
michael@0 75
michael@0 76 check_SCRIPTS += logging_striplog_test_sh
michael@0 77 noinst_SCRIPTS += src/logging_striplog_test.sh
michael@0 78 logging_striplog_test_sh: logging_striptest0 logging_striptest2 logging_striptest10
michael@0 79 $(top_srcdir)/src/logging_striplog_test.sh
michael@0 80
michael@0 81 check_SCRIPTS += demangle_unittest_sh
michael@0 82 noinst_SCRIPTS += src/demangle_unittest.sh
michael@0 83 demangle_unittest_sh: demangle_unittest
michael@0 84 $(builddir)/demangle_unittest # force to create lt-demangle_unittest
michael@0 85 $(top_srcdir)/src/demangle_unittest.sh
michael@0 86
michael@0 87 check_SCRIPTS += signalhandler_unittest_sh
michael@0 88 noinst_SCRIPTS += src/signalhandler_unittest.sh
michael@0 89 signalhandler_unittest_sh: signalhandler_unittest
michael@0 90 $(builddir)/signalhandler_unittest # force to create lt-signalhandler_unittest
michael@0 91 $(top_srcdir)/src/signalhandler_unittest.sh
michael@0 92
michael@0 93 TEST_BINARIES += logging_striptest0
michael@0 94 logging_striptest0_SOURCES = $(gloginclude_HEADERS) \
michael@0 95 src/logging_striptest_main.cc
michael@0 96 nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 97 logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 98 logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 99 logging_striptest0_LDADD = libglog.la $(COMMON_LIBS)
michael@0 100
michael@0 101 TEST_BINARIES += logging_striptest2
michael@0 102 logging_striptest2_SOURCES = $(gloginclude_HEADERS) \
michael@0 103 src/logging_striptest2.cc
michael@0 104 nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 105 logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 106 logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 107 logging_striptest2_LDADD = libglog.la $(COMMON_LIBS)
michael@0 108
michael@0 109 TEST_BINARIES += logging_striptest10
michael@0 110 logging_striptest10_SOURCES = $(gloginclude_HEADERS) \
michael@0 111 src/logging_striptest10.cc
michael@0 112 nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 113 logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 114 logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 115 logging_striptest10_LDADD = libglog.la $(COMMON_LIBS)
michael@0 116
michael@0 117 TESTS += demangle_unittest
michael@0 118 demangle_unittest_SOURCES = $(gloginclude_HEADERS) \
michael@0 119 src/demangle_unittest.cc
michael@0 120 nodist_demangle_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 121 demangle_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 122 demangle_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 123 demangle_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
michael@0 124
michael@0 125 TESTS += stacktrace_unittest
michael@0 126 stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \
michael@0 127 src/stacktrace_unittest.cc
michael@0 128 nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 129 stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 130 stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 131 stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS)
michael@0 132
michael@0 133 TESTS += symbolize_unittest
michael@0 134 symbolize_unittest_SOURCES = $(gloginclude_HEADERS) \
michael@0 135 src/symbolize_unittest.cc
michael@0 136 nodist_symbolize_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 137 symbolize_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 138 symbolize_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 139 symbolize_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
michael@0 140
michael@0 141 TESTS += stl_logging_unittest
michael@0 142 stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \
michael@0 143 src/stl_logging_unittest.cc
michael@0 144 nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 145 stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 146 stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 147 stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
michael@0 148
michael@0 149 TEST_BINARIES += signalhandler_unittest
michael@0 150 signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \
michael@0 151 src/signalhandler_unittest.cc
michael@0 152 nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 153 signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 154 signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 155 signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
michael@0 156
michael@0 157 TESTS += utilities_unittest
michael@0 158 utilities_unittest_SOURCES = $(gloginclude_HEADERS) \
michael@0 159 src/utilities_unittest.cc
michael@0 160 nodist_utilities_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 161 utilities_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 162 utilities_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 163 utilities_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
michael@0 164
michael@0 165 if HAVE_GMOCK
michael@0 166 TESTS += mock_log_test
michael@0 167 mock_log_test_SOURCES = $(gloginclude_HEADERS) \
michael@0 168 src/mock-log_test.cc
michael@0 169 nodist_mock_log_test_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 170 mock_log_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
michael@0 171 mock_log_test_LDFLAGS = $(PTHREAD_CFLAGS)
michael@0 172 mock_log_test_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
michael@0 173 endif
michael@0 174
michael@0 175 ## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
michael@0 176
michael@0 177 lib_LTLIBRARIES += libglog.la
michael@0 178 libglog_la_SOURCES = $(gloginclude_HEADERS) \
michael@0 179 src/logging.cc src/raw_logging.cc src/vlog_is_on.cc \
michael@0 180 src/utilities.cc src/utilities.h \
michael@0 181 src/demangle.cc src/demangle.h \
michael@0 182 src/stacktrace.h \
michael@0 183 src/stacktrace_generic-inl.h \
michael@0 184 src/stacktrace_libunwind-inl.h \
michael@0 185 src/stacktrace_powerpc-inl.h \
michael@0 186 src/stacktrace_x86-inl.h \
michael@0 187 src/stacktrace_x86_64-inl.h \
michael@0 188 src/symbolize.cc src/symbolize.h \
michael@0 189 src/signalhandler.cc \
michael@0 190 src/base/mutex.h src/base/googleinit.h \
michael@0 191 src/base/commandlineflags.h src/googletest.h
michael@0 192 nodist_libglog_la_SOURCES = $(nodist_gloginclude_HEADERS)
michael@0 193
michael@0 194 libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_CFLAGS) $(AM_CXXFLAGS) -DNDEBUG
michael@0 195 libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_LDFLAGS)
michael@0 196 libglog_la_LIBADD = $(COMMON_LIBS)
michael@0 197
michael@0 198 ## The location of the windows project file for each binary we make
michael@0 199 WINDOWS_PROJECTS = google-glog.sln
michael@0 200 WINDOWS_PROJECTS += vsprojects/libglog/libglog.vcproj
michael@0 201 WINDOWS_PROJECTS += vsprojects/logging_unittest/logging_unittest.vcproj
michael@0 202 WINDOWS_PROJECTS += vsprojects/libglog_static/libglog_static.vcproj
michael@0 203 WINDOWS_PROJECTS += vsprojects/logging_unittest_static/logging_unittest_static.vcproj
michael@0 204
michael@0 205 ## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
michael@0 206
michael@0 207
michael@0 208 ## This should always include $(TESTS), but may also include other
michael@0 209 ## binaries that you compile but don't want automatically installed.
michael@0 210 noinst_PROGRAMS = $(TESTS) $(TEST_BINARIES)
michael@0 211
michael@0 212 rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
michael@0 213 @cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
michael@0 214
michael@0 215 deb: dist-gzip packages/deb.sh packages/deb/*
michael@0 216 @cd packages && ./deb.sh ${PACKAGE} ${VERSION}
michael@0 217
michael@0 218 # Windows wants write permission to .vcproj files and maybe even sln files.
michael@0 219 dist-hook:
michael@0 220 test -e "$(distdir)/vsprojects" \
michael@0 221 && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/
michael@0 222
michael@0 223 libtool: $(LIBTOOL_DEPS)
michael@0 224 $(SHELL) ./config.status --recheck
michael@0 225
michael@0 226 EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \
michael@0 227 $(SCRIPTS) src/logging_unittest.err src/demangle_unittest.txt \
michael@0 228 src/windows/config.h src/windows/port.h src/windows/port.cc \
michael@0 229 src/windows/preprocess.sh \
michael@0 230 src/windows/glog/log_severity.h src/windows/glog/logging.h \
michael@0 231 src/windows/glog/raw_logging.h src/windows/glog/stl_logging.h \
michael@0 232 src/windows/glog/vlog_is_on.h \
michael@0 233 $(WINDOWS_PROJECTS)
michael@0 234
michael@0 235 CLEANFILES = core demangle.dm demangle.nm signalhandler.out* \
michael@0 236 signalhandler_unittest.*.log.INFO.*
michael@0 237
michael@0 238 # Add pkgconfig file
michael@0 239 pkgconfigdir = $(libdir)/pkgconfig
michael@0 240 pkgconfig_DATA = libglog.pc

mercurial