865d3c20c8 | ||
---|---|---|
.. | ||
generated | ||
mpdecimal_sources | ||
README.md | ||
genSources.sh |
README.md
Wrapper for mpdecimal
For users
When installing through nimble, configuration is done automatically.
For development on your local machine
mpdecimal checks at compile-time if the computer is 32-bit or 64-bit and GCC builtin __uint128_t.
It then generates mpdecimal.h
from the template mpdecimal.h.in
.
To support multiple architectures: x86_64, ARMv7 32-bit and ARMv9 64-bit you should run the
genSources.sh
build script which would configure mpdecimal properly for your platform.
Details
When doing ./configure, mpdecimal creates:
- Makefile (unused)
- libmpdec/Makefile (unused)
- tests/Makefile (unused)
- limpdec/mpdecimal.h (used everywhere)
- config.h (contains global defines like pointer size and uint128 support)
For our Nim wrapping purpose:
- We copy the source files in a temp dir
mpdecimal_temp
- We run .configure in this dir
- We copy
config.h
to agenerated
destination folder - We append
#include "config.h"
and copy the.h
and.c
files to thegenerated
destination folder - We delete
mpdecimal_temp