X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Makefile.am;h=3756465fe5b73e745b56cd73347b76b6635e8f09;hb=2a7423b346fe77c53ba103e0dfc62909393be085;hp=3d558e96db0bf80fe7818d32da102217720f6919;hpb=eecffc5aa5501b69e9d493ebe8b4e19699d62fb2;p=platform%2Fupstream%2Fglog.git diff --git a/Makefile.am b/Makefile.am index 3d558e9..3756465 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS=subdir-objects + # Make sure that when we re-make ./configure, we get the macros we need ACLOCAL_AMFLAGS = -I m4 @@ -25,6 +27,10 @@ else endif endif +if DISABLE_RTTI + AM_CXXFLAGS += -fno-rtti +endif + glogincludedir = $(includedir)/glog ## The .h files you want to install (that is, .h files that people ## who install this package can include in their own applications.) @@ -38,7 +44,7 @@ docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) ## This is for HTML and other documentation you want to install. ## Add your documentation files (in doc/) in addition to these ## top-level boilerplate files. Also add a TODO file if you have one. -dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README \ +dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README.windows \ doc/designstyle.css doc/glog.html ## The libraries (.so's) you want to install @@ -47,9 +53,10 @@ lib_LTLIBRARIES = # The libraries libglog depends on. COMMON_LIBS = $(PTHREAD_LIBS) $(GFLAGS_LIBS) $(UNWIND_LIBS) # Compile switches for our unittest. -TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) +TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(GFLAGS_CFLAGS) \ + $(MINGW_CFLAGS) $(AM_CXXFLAGS) # Libraries for our unittest. -TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) +TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) $(GFLAGS_LIBS) ## unittests you want to run when people type 'make check'. ## TESTS is for binary unittests, check_SCRIPTS for script-based unittests. @@ -66,7 +73,8 @@ TEST_BINARIES = TESTS += logging_unittest logging_unittest_SOURCES = $(gloginclude_HEADERS) \ src/logging_unittest.cc \ - src/config_for_unittests.h + src/config_for_unittests.h \ + src/mock-log.h nodist_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS) logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS) @@ -80,20 +88,20 @@ logging_striplog_test_sh: logging_striptest0 logging_striptest2 logging_striptes check_SCRIPTS += demangle_unittest_sh noinst_SCRIPTS += src/demangle_unittest.sh demangle_unittest_sh: demangle_unittest - $(top_srcdir)/demangle_unittest # force to create lt-demangle_unittest + $(builddir)/demangle_unittest # force to create lt-demangle_unittest $(top_srcdir)/src/demangle_unittest.sh check_SCRIPTS += signalhandler_unittest_sh noinst_SCRIPTS += src/signalhandler_unittest.sh signalhandler_unittest_sh: signalhandler_unittest - $(top_srcdir)/signalhandler_unittest # force to create lt-signalhandler_unittest + $(builddir)/signalhandler_unittest # force to create lt-signalhandler_unittest $(top_srcdir)/src/signalhandler_unittest.sh TEST_BINARIES += logging_striptest0 logging_striptest0_SOURCES = $(gloginclude_HEADERS) \ src/logging_striptest_main.cc nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) +logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS) logging_striptest0_LDADD = libglog.la $(COMMON_LIBS) @@ -101,7 +109,7 @@ TEST_BINARIES += logging_striptest2 logging_striptest2_SOURCES = $(gloginclude_HEADERS) \ src/logging_striptest2.cc nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) +logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS) logging_striptest2_LDADD = libglog.la $(COMMON_LIBS) @@ -109,7 +117,7 @@ TEST_BINARIES += logging_striptest10 logging_striptest10_SOURCES = $(gloginclude_HEADERS) \ src/logging_striptest10.cc nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) +logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS) logging_striptest10_LDADD = libglog.la $(COMMON_LIBS) @@ -125,7 +133,7 @@ TESTS += stacktrace_unittest stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \ src/stacktrace_unittest.cc nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) +stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS) stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS) @@ -141,17 +149,17 @@ TESTS += stl_logging_unittest stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \ src/stl_logging_unittest.cc nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) +stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) +stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) TEST_BINARIES += signalhandler_unittest signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \ src/signalhandler_unittest.cc nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) +signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) +signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) TESTS += utilities_unittest utilities_unittest_SOURCES = $(gloginclude_HEADERS) \ @@ -190,14 +198,17 @@ libglog_la_SOURCES = $(gloginclude_HEADERS) \ src/base/commandlineflags.h src/googletest.h nodist_libglog_la_SOURCES = $(nodist_gloginclude_HEADERS) -libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) -DNDEBUG -libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS) +libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_CFLAGS) $(MINGW_CFLAGS) \ + $(AM_CXXFLAGS) -DNDEBUG +libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_LDFLAGS) libglog_la_LIBADD = $(COMMON_LIBS) ## The location of the windows project file for each binary we make WINDOWS_PROJECTS = google-glog.sln WINDOWS_PROJECTS += vsprojects/libglog/libglog.vcproj WINDOWS_PROJECTS += vsprojects/logging_unittest/logging_unittest.vcproj +WINDOWS_PROJECTS += vsprojects/libglog_static/libglog_static.vcproj +WINDOWS_PROJECTS += vsprojects/logging_unittest_static/logging_unittest_static.vcproj ## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS @@ -220,7 +231,8 @@ dist-hook: libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck -EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \ +EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec \ + packages/deb.sh packages/deb/* \ $(SCRIPTS) src/logging_unittest.err src/demangle_unittest.txt \ src/windows/config.h src/windows/port.h src/windows/port.cc \ src/windows/preprocess.sh \ @@ -228,3 +240,10 @@ EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb src/windows/glog/raw_logging.h src/windows/glog/stl_logging.h \ src/windows/glog/vlog_is_on.h \ $(WINDOWS_PROJECTS) + +CLEANFILES = core demangle.dm demangle.nm signalhandler.out* \ + signalhandler_unittest.*.log.INFO.* + +# Add pkgconfig file +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libglog.pc