This page collects the Makefile commands that matter most when working on this
repository: standard builds, rebuilds, test targets, and sanitizer-oriented
cleanup.
Build commands
The Makefile is the operational entry point for mandatory, bonus, cleanup, and tests
This section shows which target to run, what binary or side effect it produces, and when each command is the right one to use during development or validation.
01 Main targets These are the Makefile targets most likely to be used when building, rebuilding, testing, or debugging this repository.
make ./cub3D
Build mandatory Compiles the mandatory source set and produces the baseline executable.
make bonus ./cub3D_bonus
Build bonus Compiles the bonus source set and links the bonus runtime path.
make clean
Remove object files Deletes intermediate object directories without removing final binaries.
make fclean
Full clean Runs the clean phase and also removes built executables.
make re ./cub3D
Full mandatory rebuild Equivalent to a clean rebuild of the mandatory executable.
make rebonus ./cub3D_bonus
Full bonus rebuild Equivalent to a clean rebuild of the bonus executable.
make test
Run mandatory tests Builds the mandatory binary and runs the repository smoke script for parser, validation, init, and render cases.
make test_bonus
Run bonus tests Builds the bonus binary and runs the repository bonus smoke script, including bonus-specific runtime checks.
02 Typical workflows These command sequences are the practical shortcuts most people actually need while working on the project.
First mandatory build make
./cub3D <map.cub>
Use this to confirm the baseline executable compiles and starts on a valid map.
Full bonus rebuild make rebonus
./cub3D_bonus <bonus_map.cub>
Use this when bonus source files or bonus-only assets changed and you want a fresh binary.
Pre-push smoke check make fclean
make
make bonus
make test
make test_bonus
Use this before declaring the branch stable or preparing a demo / evaluation run.
03 Produced binaries The build system generates separate executables for mandatory and bonus runs.
./cub3D./cub3D_bonus
04 Environment notes Compilation and runtime are not constrained by exactly the same conditions, so it helps to call out those differences explicitly.
- Build success and MLX runtime success are different checks.
- MiniLibX still requires a working graphical session when the executable launches.
- Repository test scripts rely on helpers such as `timeout` and `python3`; `nm` is only used by bonus symbol checks when available.
- If you add new C files, they must be registered in the correct Makefile source group.
✓ Build invariant A successful build does not automatically guarantee a successful graphical run.
Targets such as `make`, `make bonus`, `make test`, and `make test_bonus` validate compilation and scripted smoke coverage. Runtime execution still depends on the environment, especially MiniLibX and graphical availability when the executable starts.
Use this page as the practical entry point for build commands. The more detailed
QA interpretation of those targets still lives in the tooling pages such as
testing strategy, valgrind checks, and build targets.