Files
42test/libft/README.md
2021-10-27 07:13:52 +02:00

85 lines
1.7 KiB
Markdown

# libft
## Setup
Clone [42test](https://vogsphere.baco.net/baco/42test)
Create a link to the base of your libft
(the one with libft.a and all ft_ and Makefile files)
```
cd libft
make setup
# You can also specify the path to your libft manually
ln -snvf $HOME/libft libft
```
Only for Linux
```
sudo apt-get install -qq -y make gcc clang valgrind build-essential
# for make d (alelievr/libft-unit-test)
sudo apt-get install -qq -y libbsd-dev libncurses-dev
vi 42test/libft/libft/Makefile
LIB = libft.so
so: $(OBJ) $(OBJ_BONUS)
@$(CC) $(CFLAGS) -shared -fPIC -o $(LIB) $(OBJ) $(OBJ_BONUS)
:wq
```
## Update
```
cd libft
make update
```
## Usage
```
cd 42test/libft
# Display various options
make help
# Tripouille/libftTester (straight to the point)
make b
# jtoty/Libftest (cool layout)
make c
# nemequ/µnit w/ my own Unit Testing (beta software not complete)
make a
# works on MacOS X (and Linux if libbsd-dev installed and so: in libft/Makefile)
# alelievr/libft-unit-test (mind the protect == NULL)
make d
# test bonuses
make bonus
# launch a b c d e (All you can eat)
make test
```
## External Subprojects
- a: [nemequ/µnit](https://nemequ.github.io/munit/)
- b: [Tripouille/libftTester](https://github.com/Tripouille/libftTester)
- c: [jtoty/Libftest](https://github.com/jtoty/Libftest)
- d: [alelievr/libft-unit-test (tests)](https://github.com/alelievr/libft-unit-test)
- e: [alelievr/libft-unit-test (bench)](https://github.com/alelievr/libft-unit-test)
Create subprojects
```
git submodule add https://github.com/jtoty/Libftest.git
git submodule add https://github.com/alelievr/libft-unit-test.git
git submodule add https://github.com/Tripouille/libftTester.git
git submodule add https://github.com/nemequ/munit.git
```