build.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <p>To build the library you need one of supported C++ compilers and
  2. <link href="https://www.gnu.org/software/make">GNU Make</link> utility version
  3. 3.82 or higher available in your command line environment (shell).</p>
  4. <p>Currently supported compilers are:</p>
  5. <list style="bulleted">
  6. <item>GNU C++ v 4.7+ [<tt>gcc</tt>]</item>
  7. <item>Clang v 3.4+ [<tt>clang</tt>]</item>
  8. </list>
  9. <p>Go to <tt>src</tt> subdirectory and write:</p>
  10. <tty>
  11. $ gmake
  12. </tty>
  13. <p>The library file will be built for you.</p>
  14. <p>C++17 is used by default but you can choose another language standard
  15. version using <tt>std</tt> option. E.g. to build the library in C++98 mode
  16. write:</p>
  17. <tty>
  18. $ gmake std=98
  19. </tty>
  20. <p>Available values include: 98, 11, 14, 17, 20 and 23.</p>
  21. <p>Also you can choose the used compiler manually:</p>
  22. <tty>
  23. $ gmake compiler=gcc
  24. </tty>
  25. <p>To generate position-independent code (PIC) suitable for use in a shared
  26. library write:</p>
  27. <tty>
  28. $ gmake pic=1
  29. </tty>
  30. <p>Alternatively <link href="https://www.freebsd.org/cgi/man.cgi?query=make&amp;sektion=1">
  31. bmake</link> utility can be used on FreeBSD 10+ instead of gmake:</p>
  32. <tty>
  33. $ make -f Makefile.freebsd
  34. </tty>
  35. <p>Finally, to use the library you just need to copy the library file and
  36. contents of <tt>include</tt> subdirectory to some place where compiler/linker
  37. can find it, e.g to <tt>/usr/local/include</tt> and <tt>/usr/local/lib</tt>.</p>