build: organize building system, support sphinx doc

Change-Id: I88ba0186a3defe1ffcbd55fb5f8ef81b5d2d3d81
diff --git a/src/boost-header.h b/src/boost-header.h
new file mode 100644
index 0000000..aca4ba8
--- /dev/null
+++ b/src/boost-header.h
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012-2014 University of California, Los Angeles
+ *
+ * This file is part of ChronoSync, synchronization library for distributed realtime
+ * applications for NDN.
+ *
+ * ChronoSync is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ChronoSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#ifndef BOOST_HEADER_HPP
+#define BOOST_HEADER_HPP
+
+// suppress Boost warnings
+#pragma GCC system_header
+#pragma clang system_header
+
+#include <boost/random.hpp>
+
+#include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
+
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/archive/iterators/dataflow_exception.hpp>
+#include <boost/archive/iterators/transform_width.hpp>
+
+#endif // BOOST_HEADER_HPP
diff --git a/src/sync-digest.cc b/src/sync-digest.cc
index 81d3e4e..ce1d506 100644
--- a/src/sync-digest.cc
+++ b/src/sync-digest.cc
@@ -24,8 +24,8 @@
 #include "sync-digest.h"
 #include <string.h>
 
-#include <boost/assert.hpp>
-#include <boost/throw_exception.hpp>
+#include "boost-header.h"
+
 typedef boost::error_info<struct tag_errmsg, std::string> errmsg_info_str;
 typedef boost::error_info<struct tag_errmsg, int> errmsg_info_int;
 
@@ -36,9 +36,7 @@
 // #include <boost/archive/iterators/binary_from_base64.hpp>
 // #endif
 
-#include <boost/archive/iterators/transform_width.hpp>
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/archive/iterators/dataflow_exception.hpp>
+
 
 using namespace boost;
 using namespace boost::archive::iterators;
diff --git a/src/sync-interest-table.cc b/src/sync-interest-table.cc
index 114b7d7..548ebe2 100644
--- a/src/sync-interest-table.cc
+++ b/src/sync-interest-table.cc
@@ -24,7 +24,7 @@
 #include "sync-interest-table.h"
 #include "sync-logging.h"
 
-INIT_LOGGER ("SyncInterestTable");
+INIT_LOGGER ("SyncInterestTable")
 
 namespace Sync
 {
diff --git a/src/sync-logic.cc b/src/sync-logic.cc
index 5f6f83c..0567b60 100644
--- a/src/sync-logic.cc
+++ b/src/sync-logic.cc
@@ -34,7 +34,7 @@
 
 using namespace ndn;
 
-INIT_LOGGER ("SyncLogic");
+INIT_LOGGER ("SyncLogic")
 
 
 #ifdef _DEBUG
diff --git a/src/sync-logic.h b/src/sync-logic.h
index ac0c6e3..181979b 100644
--- a/src/sync-logic.h
+++ b/src/sync-logic.h
@@ -25,7 +25,7 @@
 #ifndef SYNC_LOGIC_H
 #define SYNC_LOGIC_H
 
-#include <boost/random.hpp>
+#include "boost-header.h"
 #include <memory>
 #include <map>
 
diff --git a/src/sync-socket.cc b/src/sync-socket.cc
index 661ae48..b344a3e 100644
--- a/src/sync-socket.cc
+++ b/src/sync-socket.cc
@@ -27,7 +27,7 @@
 
 using namespace ndn;
 
-INIT_LOGGER ("SyncSocket");
+INIT_LOGGER ("SyncSocket")
 
 namespace Sync {
 
diff --git a/src/sync-validator.cc b/src/sync-validator.cc
index 37321e3..e5cc0f5 100644
--- a/src/sync-validator.cc
+++ b/src/sync-validator.cc
@@ -26,7 +26,7 @@
 
 using namespace ndn;
 
-INIT_LOGGER ("SyncValidator");
+INIT_LOGGER ("SyncValidator")
 
 namespace Sync {