From 8f46a3518a5b865ccf010bc8652db14d2b709ea4 Mon Sep 17 00:00:00 2001 From: Rockingcool Date: Sat, 25 Mar 2023 10:43:18 -0500 Subject: [PATCH] Updated README --- README.md | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a678e0d..b1ac5df 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,41 @@ ## An easy-to-use C socket library *Easysock* is a single-file, easy-to-use socket library, that can be used for network programming in C. It has no dependencies other than the C standard library. - +___ +### Compiling +The library can be compiled using the provided Makefile. + +``` +make +``` + +There are a few optional targets, which enable specific functionality. +`allwarn - enable all warnings` +`debug - compile with 'debug' flag` +`static - compile as statically linked library - NOT IMPLEMENTED` + +They can be used as follows: +`make [TARGET NAME]` +___ ### Installation - - - - - - - - +The library can also be installed using the provided Mekfile. +``` +make install +``` +The `install` target supports two environment variables. `DESTDIR`, which specifies the installation directory, and `PREFIX` which specifies the installation prefix. They are used as follows: + +`DESTDIR=/home/user PREFIX=/usr/local make install` + +This will install the library file in `/home/user/usr/local/lib` and the header file in `/home/user/usr/local/include`. +___ +### Usage +To use the library, simply include the header file: +``` +#include +... +``` +and link the library: +` gcc example.c -o example -leasysock` +___ This file was written using [Dillinger](https://dillinger.io).