Files
42test/libft
2021-10-27 10:26:58 +02:00
..
2021-10-27 09:57:54 +02:00
2021-10-22 10:26:25 +02:00
2021-10-22 10:26:25 +02:00
2021-10-22 10:26:25 +02:00
2021-10-27 10:07:58 +02:00
2021-10-26 20:50:09 +00:00
2021-10-22 10:26:25 +02:00
2021-10-27 10:26:58 +02:00

libft

Setup

Clone 42test

git clone --recurse-submodules https://vogsphere.baco.net/baco/42test.git 42test

cd 42test

git config pull.rebase false
git config user.name "${USER-marvin}"
git config user.email "${MAIL-marvin@student.42lausanne.ch}"

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

Usage

# 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

# alelievr/libft-unit-test (mind the protect == NULL)
# Linux: please install libbsd-dev and setup so: in your libft/Makefile (check info above)
# MacOS X: ft_memmove and ft_strrchr will crash on Apple Silicon M1 and work on Intel
# d for tests, e for the bench (slow if you are not using at least CFLAGS += -pipe -O2)
make d
make e

# ysoroko/ft_split_tester
make f

# test bonuses
make bonus

# launch a b c d e f (all you can eat, good luck)
make test

External Subprojects

Update

make update

REFERENCES

How to add submodules (already done)

cd 42test/libft

git submodule add -f https://github.com/jtoty/Libftest.git
git submodule add -f https://github.com/alelievr/libft-unit-test.git
git submodule add -f https://github.com/Tripouille/libftTester.git
git submodule add -f https://github.com/nemequ/munit.git
git submodule add -f https://github.com/Ysoroko/FT_SPLIT_TESTER.git

vi ../.gitignore
libft/Libftest
libft/libft-unit-test
libft/libftTester
libft/munit
libft/FT_SPLIT_TESTER
:wq

# add ignore
vi ../.gitmodules
[submodule "libft/Libftest"]
    ignore = dirty
[submodule "libft/libft-unit-test"]
    ignore = dirty
[submodule "libft/libfttester"]
    ignore = dirty
[submodule "libft/munit"]
    ignore = dirty
[submodule "libft/FT_SPLIT_TESTER"]
    ignore = dirty
:wq