build: Compile as shared library by default
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4972ae
Refs: #2867
diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index 3266666..cfee3fd 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -125,21 +125,21 @@
./waf
sudo ./waf install
-By default, only the static version of ndn-cxx library is built. To build the shared library,
-use ``--enable-shared`` option for ``./waf configure`` command. For example::
+By default, only the shared version of ndn-cxx library is built. To build the static library,
+use ``--enable-static`` option for ``./waf configure`` command. For example::
- ./waf configure --enable-shared
+ ./waf configure --enable-static
-To disable build of the static library and build only the shared library, use additional
-``--disable-static`` option. Note that at least one version of the library needs to be
+To disable build of the shared library and build only the static library, use additional
+``--disable-shared`` option. Note that at least one version of the library needs to be
enabled.
::
- ./waf configure --enable-shared --disable-static
+ ./waf configure --enable-static --disable-shared
-After shared library is built and installed, some systems require additional actions.
+After the shared library is built and installed, some systems require additional actions.
- on Linux::
diff --git a/wscript b/wscript
index 7eeab19..0521668 100644
--- a/wscript
+++ b/wscript
@@ -37,15 +37,15 @@
dest='with_osx_keychain',
help='''On Darwin, do not use OSX keychain as a default TPM''')
- opt.add_option('--enable-static', action='store_true', default=True,
- dest='enable_static', help='''Build static library (enabled by default)''')
- opt.add_option('--disable-static', action='store_false', default=True,
- dest='enable_static', help='''Do not build static library (enabled by default)''')
+ opt.add_option('--enable-static', action='store_true', default=False,
+ dest='enable_static', help='''Build static library (disabled by default)''')
+ opt.add_option('--disable-static', action='store_false', default=False,
+ dest='enable_static', help='''Do not build static library (disabled by default)''')
- opt.add_option('--enable-shared', action='store_true', default=False,
- dest='enable_shared', help='''Build shared library (disabled by default)''')
- opt.add_option('--disable-shared', action='store_false', default=False,
- dest='enable_shared', help='''Do not build shared library (disabled by default)''')
+ opt.add_option('--enable-shared', action='store_true', default=True,
+ dest='enable_shared', help='''Build shared library (enabled by default)''')
+ opt.add_option('--disable-shared', action='store_false', default=True,
+ dest='enable_shared', help='''Do not build shared library (enabled by default)''')
def configure(conf):
conf.start_msg('Building static library')