# BUILD INSTRUCTIONS FOR WINDOWS
#
# 1. Checkout usrsctp source:
#
#   a) cd src/native/sctp
#
#   b) git clone https://github.com/sctplab/usrsctp.git
#
# 2. Build usrsctp:
#
#   a) open Visual Studio console(x86 for 32 bit, 64 for 64 bit)
#
#   b) cd src/native/sctp/usrsctp/
#
#   c) nmake -f Makefile.nmake
# NOTES: Encountering the following warning/errors:
# user_mbuf.c(735) : error C2220: warning treated as error - no 'object' file generated
# user_mbuf.c(735) : warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data
#
# Edit usrsctplib/Makefile.nmake and programs/Makefile.nmake and remove /WX
# from CFLAGS to ignore the warning.
#
# 3. Build native Sctp wrapper:
#
# a) cd src/native/sctp
#
# b) build and install
#
#    32bit:
#      nmake -f Makfile.nmake install32
#
#    64bit:
#      nmake -f Makfile.nmake install64
#
# Reminder:
# The command below is used to re-generate jni header
# (run from classes output folder)
# javah -jni org.jitsi.sctp4j.Sctp
# NOTES: To fix the following error
#  [cc]    Creating library jnsctp.lib and object jnsctp.exp
#  [cc] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
#  [cc] LINK : fatal error LNK1101: incorrect MSPDB140.DLL version; recheck installation of this product
# > copy "C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\bin\mspdbsrv.exe" "C:\Program Files (x86)\Microsoft Visual Studio 15.0\Common7\IDE"
#
# BUILD INSTRUCTIONS FOR LINUX
#
#
# BUILD USRSCTP LIB (required to build/run native SCTP wrapper)
#
# 1. Go to dir src/native/sctp
#
#    cd src/native/sctp
#
# 2. Checkout usrsctp
#
#    git clone https://github.com/sctplab/usrsctp.git
#
# 3. Go to usrsctp src root
#
#    cd sctp-refimpl-read-only/KERN/usrsctp
#
# 4. Build and install usrsctp lib
#
#    a) libtoolize
#
#    b) aclocal
#
#    c) autoconf
#
#    d) touch AUTHORS NEWS README ChangeLog
#
#    e) automake --add-missing
#
#    f) ./configure --prefix=/usr
#       (./configure --prefix=/usr --with-pic, in order to static link the usrsctp)
#
#    g) sudo make install
#       ( no need to install if making binary with ant target)
#
# BUILD NATIVE WRAPPER FOR SCTP
#
# 1. Go to dir src/native/sctp
# 2. 32 bit:
#     make install32
#    64 bit:
#     make install64