Skip to content

Commit

Permalink
minor changes to build and updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphGL committed Aug 18, 2024
1 parent f98f918 commit b5e7af7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# CLibs
My set of C libraries

| **Library** | **Purpose** |
|-------------|-------------------------------------------|
| vec | generic dynamic array data structure |
| bstr | high level string library |
| flag | CLI flag parsing library inspired by Go's |

Note: This set of libraries still depend on libc for memory allocation, the str* functions, etc. It is not meant to be a standalone library at least for now.
It is not possible to change the memory allocator used for now but I'll change that later possibly.

## Building
The recommended way is to just build everything and then take whatever libraries you want from the generated `lib` directory
and it's corresponding header file from said library directory.

```sh
$ cmake . -DCMAKE_BUILD_TYPE=Release
$ make
```
1 change: 1 addition & 0 deletions flag/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ cmake_minimum_required(VERSION 3.10)
project(flag DESCRIPTION "flag parsing library")

add_library(flag flag.c)
target_compile_features(flag PUBLIC c_std_11)
1 change: 1 addition & 0 deletions vec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ project(vec DESCRIPTION "dynamically growable vector structure")

add_library(vec STATIC vector.c)
target_link_libraries(vec PRIVATE m)
target_compile_features(vec PUBLIC c_std_11)

0 comments on commit b5e7af7

Please sign in to comment.