A library of generic data structures implemented in C.
This library features various generic data structures for C. These data structures are all generic, supporting anything you can throw at them! The data structures provided (or intended to be provided) in this library are:
- Linky: A generic linked list implemented in C.
- Stacky: A generic stack implemented in C.
- Queue: A generic queue implemented in C.
- Binary Tree: A generic binary tree implemented in C.
Required:
Optional:
- Compilation
From the root of the project:
$ cmake -S ./ -B ./build/
$ make [all] -C ./build/
The modules which are compiled into the mdata library can be controlled through the use of the 'MDATA_MODULES' variable when executing cmake. The 'MDATA_MODULES' variable takes a semicolon-seperated list of which modules should be included into the final build of the library. The modules are defined as follows:
- LINKY
- STACKY
- QUEUE
- BT
If the 'MDATA_MODULES' variable is not defined, the library will include all modules by default.
Example:
$ cmake -S ./ -B ./build -D MDATA_MODULES="LINKY;STACKY"
Would compile the Linky and Stacky modules into the mdata library
- Verify Tests (if check is installed)
The 'mtests' build target will compile all tests and must be run prior to attempting the 'test' target
$ make mtests -C ./build/
$ make test -C ./build/
Note: The 'mtests' target will only compile tests for modules which have been enabled. Similarly, the 'test' target will only execute tests from modules which have been enabled.
- Install onto system (requires root)
# make install -C ./build/