Skip to content

A foundational C library reimplementation of standard libc functions, including string/memory manipulation, I/O, and linked list utilities. The first project of 42 core curriculum.

License

Notifications You must be signed in to change notification settings

darrenkuro/libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LIBFT

License Score Date

This repo contains many reimplementation of general purpose functions of the standard C library. It is the first project of 42 common core. It is, however, the finalized version that goes beyond the original subject of libft, which includes source code of some of the following subjects as well, such as get-next-line, and printf.

📝 Notes

Makefile

Order-only prerequisite

# Ensure OBJDIR exists before compiling each .c file into a .o file.
# The dependency after '|' is an order-only prerequisite: it must exist,
# but won't cause a rebuild if its timestamp changes.
$(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR)
    $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

Dependency tracking

# Add -MMD and -MP flags will automatically generate dependency files.
# MMD tells the compiler to generate .d files containing header dependencies.
# MP adds dummy rules for each header file to prevent errors if headers are later deleted.
# This ensures object files are rebuilt when relevant headers change.
CFLAGS := ... -MMD -MP

# '-' indicates optional, so that make doesn't error if these files are missing.
# It is at the end of the Makefile to avoid overwrite for conflicting targets.
-include $(OBJ:.o=.d)

📄 License

This project is licensed under the MIT License.


📫 Contact

Darren Kuro – darrenkuro@icloud.com
GitHub: @darrenkuro

About

A foundational C library reimplementation of standard libc functions, including string/memory manipulation, I/O, and linked list utilities. The first project of 42 core curriculum.

Topics

Resources

License

Stars

Watchers

Forks