The monty hall simulator to determine if it's better to stay with current option or to switch option.
Makefile contains three targets, doors
, run
and all
.
-
all
:- The default target that depends on both the
doors
andrun
targets. - Running
make
without specifying a target will invokeall
, which compiles the program and then runs it.
- The default target that depends on both the
-
doors
:- Compiles the C source file
doors.c
into an executable nameddoors
. - Uses the
gcc
compiler with the following flags:-Wall
: Enables all compiler warning messages, helping identify potential issues in the code.-Werror
: Treats all warnings as errors, ensuring the code compiles without any warnings.
- Compiles the C source file
-
run
:- Runs application named
doors
.
- Runs application named