Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada

Overview

Lib9wada

Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada

Usage

Compile the library with

make

To link it with your project use flag -l9wada with GCC

gcc main.c -l9wada

Include files depending on functions and modules you will use all header files are available in includes directory

Library Structure And How To Contribute

the root of the repo contains

Makefile
make_config.mk
sources 
includes
author
LICENSE
README.md

Makefile

This makefile does not have rules for every source file, in fact it is static and includes other makefiles. the make_config.mk makefile contains config variables, like what compiler to use, and what modules to compile (we'll get to that later) the sources directory contains multiple subdirectories

base
get_next_line
ttslist
ft_printf

Each subdirectory of sources is called a module Every module contains source files and a make_module.mk file Here's a preview of a make_module.mk file

# MANUALLY GENERATED PART

LOCAL_SRC_DIR = ttslist
MODULE_NAME = ttslist

INCLUDES = ttslist.h

SRC_FILES = ttslist_constructors.c\
	    ttslist_delete.c\
	    ttslist_iterator.c\
	    ttslist_operations.c\
	    ttslist_purge.c\
	    ttslist_tools.c

# AUTO GENERATED PART

include make_config.mk

OBJ_FILES = $(SRC_FILES:.c=.o)
OBJ_FILES := $(addprefix $(OBJ_DIR)/, $(OBJ_FILES))
INCLUDES := $(addprefix $(INC_DIR)/, $(INCLUDES))
...
...
...

We will just pay attention to the MANUALLY GENERATED PART in it you specify a unique module name, and the module directory name, header files to include, and source files the makefile takes care of the rest After adding a new module, we need to load it, so the makefile will compile it and link it to the library. We do that in the make_config.mk

# makefile config specifying locations, compiler and compilation flags

NAME = lib9wada.a
CC = gcc
FLAGS = -Wall -Werror -Wextra
SRC_DIR = sources
INC_DIR = includes
OBJ_DIR = objects
DELETE_COMMAND = rm
DELETE_COMMAND_FLAGS = -rf
LINKER = ar
LINKER_FLAGS = rc
RANLIB = ranlib
RANLIB_FLAGS =

# IN HERE ADD OR REMOVE MODULES

MODULES = base\
	  ttslist\
	  get_next_line

This make_config.mk also contains other config variables, so you can change the compiler you use or the library name.

The documentations

Every module should contain a README.md file, containing the documentation and explaining what each function does, with its prototype and usage. An example documentation is needed finally, the author file contains names or logins of people who contributed to this library.

You might also like...
Implementation of various data structures and algorithms.
Implementation of various data structures and algorithms.

Data Structures and Algorithms A place where you can find and learn the copious number of algorithms in an efficient manner. This repository covers va

Data Structures and Algorithms implemented in C++
Data Structures and Algorithms implemented in C++

OpenOcto - Data Structures and Algorithms Data Structures and Algorithms implemented in C++ Code here directly using Gitpod! Everthing done in C++ All

Data structures and algorithms course, winter 2021/22

Data Structures and Algorithms 2021/22 Repository for the "Data structures and algorithms" course for the 2021/22 academic year. Structure lectures --

A repository by Codechef@MUST for data structures and algorithms
A repository by [email protected] for data structures and algorithms

DSA Overview The main goal of this project is to promote open-source, allowing anyone who wants to contribute. This repository would be focused on var

Personal reference material for Data Structures and Algorithms
Personal reference material for Data Structures and Algorithms

🔗 DSA 📈 Sr Filename Title Notes 1 2-1_datatypes_and_modifiers.cpp Datatypes and Modifiers Type modifiers explained 2 2-2_input_output.cpp stdin and

Redacted source code for exercises proposed in the Data Structures and Algorithms laboratory.

fsega_ie2_dsa Redacted source code for exercises proposed in the Data Structures and Algorithms laboratory. Usage The src/ directory contains a direct

Data Structures and Algorithms course (IIC2133-PUC)

Data-Structures-And-Algorithms This are the homeworks of Jose Antonio Castro from Data Structures and Algorithms course (IIC2133) in Pontificia Univer

100daysofDSA - Explore about arrays, linked lists, stacks & queues, graphs, and  more to master the foundations of data structures & algorithms!
100daysofDSA - Explore about arrays, linked lists, stacks & queues, graphs, and more to master the foundations of data structures & algorithms!

Explore about arrays, linked lists, stacks & queues, graphs, and more to master the foundations of data structures & algorithms!

Implementation of data structures and algorithms in C language

DataStructure_and_Algorithms_in_C Implementation of basic data structures and algorithms in C Data Structure LinkedList Singly Linked List Doubly Link

Comments
  • Makefile needs to be more visual

    Makefile needs to be more visual

    I'll need some of @locust49 's makefile magic, to make it look better, with a loading bar maybe, and some ASCII art.

    @locust49 I know it's been a long time since you have worked with a makefile XD

    enhancement 
    opened by KernelOverseer 0
Owner
Lprogrammers Lm9awdine
Lprogrammers Lm9awdine
A collection of basic data structures syntaxes, useful for competitive coding and placement exams

Data-Structures A collection of basic data structures syntaxes, useful for competitive coding and placement exams 1. Array 2. Matrix 3. Linked List Si

MAINAK CHAUDHURI 2 Aug 8, 2021
Step is a C++17, header-only library of STL-like algorithms and data structures

Step is a C++17, header-only library of STL-like algorithms and data structures. Installation git clone --depth 1 https://github.com/storm-ptr/step.gi

storm-ptr 3 Sep 1, 2022
Repository of problems and solutions of labsheets used for Data Structures and Algorithms (CS F211) in Semester 2, 2020-21 at BITS Pilani - Hyderabad Campus.

CS F211 Data Structures and Algorithms (BITS Pilani - Hyderabad Campus) This repository contains the problems, solution approaches & explanations and

Rohit Dwivedula 27 Oct 31, 2022
Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design

Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.

DSC-Banasthali 53 Oct 4, 2022
Templates, algorithms and data structures implemented and collected for programming contests.

Templates, algorithms and data structures implemented and collected for programming contests.

Shahjalal Shohag 2k Nov 29, 2022
🔗 Common Data Structures and Algorithms

?? Data Structures and Algorithms This library provides common data structures. It will also provide some data structures which needed in render or ga

Recep Aslantas 44 Nov 28, 2022
An assortment of commonly used algorithms and data structures implemented with C++.

Algorithms-And-Data-Structures This repo contains C++ implementations of common algorithms and data structures, grouped by topics. The list will be sp

Tony Sheng 23 Nov 9, 2021
The aim of this repository is to make it a one final stop for revision for technical interviews involving data structures and algorithms .

Hey ??‍♂️ This repository is meant for data structures and algorithms . I will be updating this often and will include all the data structures importa

Prakhar Rai 51 Sep 29, 2022
This is a beginner-friendly project aiming to build a problem-set on different data structures and algorithms in different programming languages.

DSAready Overview This is a beginner-friendly project that aims to create a problem-set for various Data Structures and Algorithms. Being a programmer

Riddhi Jain 13 Aug 17, 2022