From d604288365829e6971d928e5ce8c9c7bd1d79474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sun, 6 Aug 2023 16:12:10 +0200 Subject: [PATCH] docs: improve usage explanations --- README.md | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 7fecf40..2f40357 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ C is a low-level programming language and we often end up reinventing the wheel as the C standard library (`libc`) is quite small and in my humble opinion, not well designed. -**libcproject** solve this by providing common functions or data structures (`hash_map`, `array_list`, `linked_list`, `queue`, `stack`, etc.) we might need in our C projects. +**libcproject** solve this by providing common functions or data structures (`hash_map`, `array_list`, `linked_list`, `queue`, `stack`, etc.), we might need in our C projects. [Online documentation](https://libcproject.vercel.app/). @@ -36,7 +36,10 @@ C is a low-level programming language and we often end up reinventing the wheel For example on GNU/Linux Ubuntu: ```sh +# Install Build Tools sudo apt-get install build-essential gcc make clang-format + +# Install Documentation Tools sudo apt-get install doxygen doxygen-gui doxygen-doc graphviz ``` @@ -55,7 +58,14 @@ nm ./build/libcproject.a # to see the symbols Steps to create a new C project that uses `libcproject`: -### Step 1: Install and Compile `libcproject` +### Step 1: Create a new project + +```sh +mkdir my-project +cd my-project +``` + +### Step 2: Install and Compile `libcproject` in the project ```sh # Clone the repository @@ -68,25 +78,10 @@ cd libcproject make ``` -### Step 2: Create a new project - -```sh -mkdir my-project -cd my-project -``` - -### Step 3: Install `libcproject` in the project - -```sh -mkdir libcproject -cp --recursive ./ # copy -# or -ln -s ./ # symbolic link -``` - -### Step 4: Create a new C file +### Step 3: Create a new C file ```sh +cd .. touch main.c ``` @@ -104,7 +99,7 @@ int main() { } ``` -### Step 5: Compile your project and link it with the library +### Step 4: Compile your project and link it with the library ```sh gcc -o ./main ./main.c -L. -l:./libcproject/build/libcproject.a