"This project is about coding a C library. It will contain a lot of general-purpose functions your programs will rely upon."
Libft is the initial project in the common core curriculum at 42 school. The objective of this project is to build your own library of functions that will later be utilized in almost all upcoming projects at 42. Over time, you can enhance this library with additional functions constructed during other projects, such as get_next_line and ft_printf. However, in this repository, you will only find the first version of Libft, containing the functions required by the project's specifications.
The code was written according to the 42 norm guidelines (norminette).
To use the library in your project, follow these steps:
- Clone the repository
git clone https://github.com/yourusername/42_libft.git
- Do make to compile the files
make
This will generate the libft.a file in the root folder, that is library containing all the functions.
- Go to your header file and include the library
# include "libft.h"
In this initial phase of the project, you are tasked with re-implementing specific functions from the Libc Library. For a detailed list of functions included in this section, please refer to the Subject.
The subsequent phase focuses on the development of a set of functions, either absent in the libc or presented in a different form. To explore the comprehensive list of functions in this section, check the Subject.
For the bonus segment of the project, you will construct functions capable of manipulating lists. For a more detailed understanding of the functions in the bonus part, please consult the Subject.
In this project, the Makefile offers the following essential rules:
-
make: Compiles the primary and secondary functions into
libft.a
. -
make clean: Cleans the directory by removing
.o
files, preservinglibft.a
. -
make fclean: Completely cleans the directory by deleting both
.o
files andlibft.a
. -
make re: Refreshes
libft.a
by recompiling everything.
Additionally:
- make bonus: Incorporates bonus functions into
libft.a
.