Update README.md

This commit is contained in:
2025-05-26 10:51:21 +02:00
parent 5f4180862d
commit d931b3958e

View File

@ -1,41 +1,7 @@
# [ft_ping](https://git.blenderwizard.space//Blenderwizard/ft_ping)
This is a template C project using CMake (v3.27) and Make.
ft_ping is a 42 project where the goal is to recreate inetutils 2.0's ping program with just ipv4 support, without dns resolution. Ping is a program that sends icmp echo request packets and awaits icmp echo response packets, calculating the RTT in miliseconds and shows the min/max/avg/stddev time on program exit.
To add C files, simply add the relative path from the root of the project to the C_SRCS variable in makefile, seperated
by a space
Example:
```makefile
C_SRCS = srcs/main.c srcs/file.c srcs/other_file.c srcs/one/two/three/directory.c
```
To add C Header files, you must add the directory to the INCLUDE_DIRS and the relative path from the root of the project
of the Header file to the INCLUDE_SRCS variable in the makefile, they must be seperated by spaces.
Example:
```makefile
INCLUDE_DIRS = includes otherpath/includes
INCLUDE_SRCS = includes/main.h otherpath/includes/file.h
```
To add compilation flags, just add them to the CFLAGS Makefile variable, they must be seperated by spaces.
Example:
```makefile
CFLAGS = -Wall -Werror -Wextra
```
To add project libraries, simply place them in a directory located in the root directory with the same name as the library.
Then just add them to the CFLAGS Makefile variable, they must be seperated by spaces.
Example:
```makefile
SUBDIRECTORIES = mycoollib openssl
```
You can change CMake Specific variables in the Makefile, such as Number of Workers, Build Directory, Install Directory,
Generator Type and the Release Type.
To build simply run `make`
To build simply run `make`, to install into project root with the correct permisions run `make install`.
For usage run `./ft_ping --usage`, For help run `./ft_ping --help`