Build Targets
The Makefile provides the following targets:Compilation Process
Build both executables
Run the default target to compile both server and client:This executes
make all, which builds both server and client executables.Compilation details
The Makefile uses the following compiler configuration:Both executables are compiled with strict warning flags that treat warnings as errors.
Dependencies
Both executables depend on utility functions from libft:ft_printf- Custom printf implementationft_write_pointer- Pointer formattingft_write_num- Number formattingft_write_char- Character outputft_write_str- String output
Server Compilation
Client Compilation
Cleaning Build Files
- Remove object files
- Remove everything
- Rebuild from scratch
.o files (server.o, client.o, and utility object files).Troubleshooting
Error: missing libft files
Error: missing libft files
libft directory exists and contains all required files:ft_printf.hft_printf.cft_write_pointer.cft_write_num.cft_write_char.cft_write_str.c
Error: compilation flags too strict
Error: compilation flags too strict
If you encounter warnings treated as errors due to
-Werror, you have two options:- Fix the warnings (recommended)
- Temporarily remove -Werror from the Makefile FLAGS (not recommended for production)
Error: permission denied
Error: permission denied
Build doesn't update after changes
Build doesn't update after changes
If modifications to source files don’t seem to take effect:This performs a full rebuild from scratch.
Build Output Files
After runningmake, your directory will contain:
server- Server executableclient- Client executableserver.o- Server object fileclient.o- Client object filelibft/*.o- Utility object files
.o files can be removed with make clean while keeping the executables.