1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2024-07-17 23:30:12 +02:00

chore: minor improvements

This commit is contained in:
Divlo 2023-01-07 18:57:14 +01:00
parent e844600214
commit 821c27c6a9
No known key found for this signature in database
GPG Key ID: 8F9478F220CE65E9
4 changed files with 22 additions and 6 deletions

View File

@ -1,6 +1,6 @@
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = libcproject
PROJECT_BRIEF = "C static library easier to use than $(libc) (C standard library)."
PROJECT_BRIEF = "C static library easier to use than libc (C standard library)."
OUTPUT_DIRECTORY = documentation
OUTPUT_LANGUAGE = English
OPTIMIZE_OUTPUT_FOR_C = YES

View File

@ -12,14 +12,22 @@ MAIN_EXECUTABLE = bin/main.exe
SET_VERSION_EXECUTABLE = bin/set_version.exe
TEST_EXECUTABLE = bin/test.exe
build/%.o: %.c
mkdir --parents ./build/lib ./build/test
${CC} ${CC_FLAGS} -c $< -o $@
${LIB}: $(addprefix build/, ${LIB_OBJECTS})
rm --force ${LIB}
ar -rcs ${LIB} $(addprefix build/, ${LIB_OBJECTS})
build/lib:
mkdir --parents ./build/lib
build/test:
mkdir --parents ./build/test
build/lib/%.o: lib/%.c ${HEADER_FILES} | build/lib
${CC} ${CC_FLAGS} -c $< -o $@
build/test/%.o: test/%.c ${HEADER_FILES} | build/test
${CC} ${CC_FLAGS} -c $< -o $@
.PHONY: run
run: ${LIB} ./main.c
mkdir --parents ./bin

View File

@ -55,9 +55,16 @@ nm ./build/libcproject.a # to see the symbols
Steps to create a new C project that uses `libcproject`:
### Step 1: Compile `libcproject`
### Step 1: Install and Compile `libcproject`
```sh
# Clone the repository
git clone https://github.com/Divlo/libcproject.git
# Go to libcproject directory
cd libcproject
# Compile the library
make
```

View File

@ -11,5 +11,6 @@
#include "lib/stack.h"
#include "lib/string.h"
#include "lib/terminal.h"
#include "version.h"
#endif