summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
author <shinichiro.hamaji@gmail.com>2008-12-19 15:20:40 +0000
committer <shinichiro.hamaji@gmail.com>2008-12-19 15:20:40 +0000
commitafd586a5d5c96a606773bd48422b892957419b59 (patch)
treeb807abf9182af1dd4d6832c45c3b4bdfd80a5813 /Makefile.am
parentc54c735616b5dba9966c342b0e14e07833bbec7b (diff)
downloadglog-afd586a5d5c96a606773bd48422b892957419b59.tar.gz
glog-afd586a5d5c96a606773bd48422b892957419b59.tar.bz2
glog-afd586a5d5c96a606773bd48422b892957419b59.zip
Initial windows support. Now we don't have the stacktrace and several unittests.
git-svn-id: https://google-glog.googlecode.com/svn/trunk@23 eb4d4688-79bd-11dd-afb4-1d65580434c0
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am65
1 files changed, 46 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am
index 5b55e0f..163f16e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,11 @@ 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.)
-gloginclude_HEADERS = src/glog/log_severity.h src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h
+## We have to include both the .h and .h.in forms. The latter we
+## put in noinst_HEADERS.
+gloginclude_HEADERS = src/glog/log_severity.h
+nodist_gloginclude_HEADERS = src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h
+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
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
## This is for HTML and other documentation you want to install.
@@ -56,8 +60,10 @@ noinst_SCRIPTS =
TEST_BINARIES =
TESTS += logging_unittest
-logging_unittest_SOURCES = $(gloginclude_HEADERS) src/config.h \
- src/logging_unittest.cc
+logging_unittest_SOURCES = $(gloginclude_HEADERS) \
+ src/logging_unittest.cc \
+ src/config_for_unittests.h
+nodist_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
logging_unittest_LDADD = libglog.la $(COMMON_LIBS)
@@ -81,64 +87,73 @@ signalhandler_unittest_sh: signalhandler_unittest
$(top_srcdir)/src/signalhandler_unittest.sh
TEST_BINARIES += logging_striptest0
-logging_striptest0_SOURCES = $(gloginclude_HEADERS) src/config.h \
+logging_striptest0_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest_main.cc
+nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest0_LDADD = libglog.la $(COMMON_LIBS)
TEST_BINARIES += logging_striptest2
-logging_striptest2_SOURCES = $(gloginclude_HEADERS) src/config.h \
+logging_striptest2_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest2.cc
+nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest2_LDADD = libglog.la $(COMMON_LIBS)
TEST_BINARIES += logging_striptest10
-logging_striptest10_SOURCES = $(gloginclude_HEADERS) src/config.h \
+logging_striptest10_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest10.cc
+nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest10_LDADD = libglog.la $(COMMON_LIBS)
TESTS += demangle_unittest
-demangle_unittest_SOURCES = $(gloginclude_HEADERS) src/config.h \
+demangle_unittest_SOURCES = $(gloginclude_HEADERS) \
src/demangle_unittest.cc
+nodist_demangle_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
demangle_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
demangle_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
demangle_unittest_LDADD = libglog.la $(COMMON_LIBS)
TESTS += stacktrace_unittest
-stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) src/config.h \
+stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \
src/stacktrace_unittest.cc
+nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS)
TESTS += symbolize_unittest
-symbolize_unittest_SOURCES = $(gloginclude_HEADERS) src/config.h \
+symbolize_unittest_SOURCES = $(gloginclude_HEADERS) \
src/symbolize_unittest.cc
+nodist_symbolize_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
symbolize_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
symbolize_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
symbolize_unittest_LDADD = libglog.la $(COMMON_LIBS)
TESTS += stl_logging_unittest
-stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) src/config.h \
+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_LDFLAGS = $(PTHREAD_CFLAGS)
stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS)
TEST_BINARIES += signalhandler_unittest
-signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) src/config.h \
+signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \
src/signalhandler_unittest.cc
+nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS)
TESTS += utilities_unittest
-utilities_unittest_SOURCES = $(gloginclude_HEADERS) src/config.h \
+utilities_unittest_SOURCES = $(gloginclude_HEADERS) \
src/utilities_unittest.cc
+nodist_utilities_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
utilities_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
utilities_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
utilities_unittest_LDADD = libglog.la $(COMMON_LIBS)
@@ -146,7 +161,7 @@ utilities_unittest_LDADD = libglog.la $(COMMON_LIBS)
## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
lib_LTLIBRARIES += libglog.la
-libglog_la_SOURCES = $(gloginclude_HEADERS) src/config.h \
+libglog_la_SOURCES = $(gloginclude_HEADERS) \
src/logging.cc src/raw_logging.cc src/vlog_is_on.cc \
src/utilities.cc src/utilities.h \
src/demangle.cc src/demangle.h \
@@ -160,11 +175,17 @@ libglog_la_SOURCES = $(gloginclude_HEADERS) src/config.h \
src/signalhandler.cc \
src/base/mutex.h src/base/googleinit.h \
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_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
+
## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
@@ -178,13 +199,19 @@ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
deb: dist-gzip packages/deb.sh packages/deb/*
@cd packages && ./deb.sh ${PACKAGE} ${VERSION}
-# TODO(hamaji): We don't support Visual Studio for now.
-## Windows wants write permission to .vcproj files and maybe even sln files.
-#dist-hook:
-# test -e "$(distdir)/vsprojects" \
-# && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/
+# Windows wants write permission to .vcproj files and maybe even sln files.
+dist-hook:
+ test -e "$(distdir)/vsprojects" \
+ && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
+
EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \
- $(SCRIPTS) src/logging_unittest.err src/demangle_unittest.txt
+ $(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 \
+ src/windows/glog/log_severity.h src/windows/glog/logging.h \
+ src/windows/glog/raw_logging.h src/windows/glog/stl_logging.h \
+ src/windows/glog/vlog_is_on.h \
+ $(WINDOWS_PROJECTS)