cher-nov/gena

Add ability to compile as a library

Opened this issue · 1 comments

Notes:

  • Preserve ability to use as plain sources too.
  • Add ability to run tests, get rid of hardcoded CodeBlocks project.
  • Modular library compilation (i.e. user should be able to choose only necessary data structures).
  • Use CMake (halp ;C).
  • Add safe compilation mode that will use -O2 instead of -O3, -fno-strict-aliasing etc. since the C standard is utterly retarded but GCC considers it as a honor to follow it.

A good example of talking some sense to GCC is here:
https://repo.or.cz/k8vavoom.git/blob/08d44a45c7eae3a1bebab49cbb1da4e66f522637:/CMakeLists.txt#l278

Instead of CMake, something other should be used, that meet at least the following requirements:

  1. Up-to-date and clear enough documentation.
  2. Free and open-source.
  3. Actual state of development and availability of support.
  4. Ability to describe project structure, compilation flags, targets etc. in a machine-readable form like JSON / XML to provide an opportunity for third-party developers to compile it in environments where the build system could be unavailable (for example, when building the Python extension through distutils).

Consider using SCons with json module being used in the build script.
https://habr.com/ru/post/95693/