c-calc uses GNU Make and GCC to compile its C source files into a single executable binary namedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Project516/c-calc/llms.txt
Use this file to discover all available pages before exploring further.
c-calc. The Makefile defines three targets for different use cases: a standard debug build, an optimized release build, and a clean target that removes the binary. A run.sh script is also available to compile and immediately run the program in one step.
Make targets
make / make all
make / make all
Compiles all source files with warnings enabled and the Output binary:
include/ directory on the header search path. This is the standard development build../c-calcCompiler flags used:| Flag | Effect |
|---|---|
-Wall | Enable all compiler warnings |
-Iinclude | Add include/ to the header search path |
make release
make release
Compiles with maximum optimization and strips debug symbols from the output binary. Use this target when distributing or deploying the program.Output binary:
./c-calcCompiler flags used (in addition to -Wall -Iinclude):| Flag | Effect |
|---|---|
-O3 | Maximum optimization level |
-s | Strip debug symbols from the binary |
make clean
make clean
Removes the compiled
c-calc binary from the working directory. Does not remove object files (none are produced by this build system).Compiler flags reference
The following table lists every compiler flag used across all Makefile targets.| Flag | Target | Description |
|---|---|---|
-Wall | all, release | Enables all GCC warnings to catch potential bugs at compile time |
-Iinclude | all, release | Adds the include/ directory so #include "calc.h" and similar directives resolve correctly |
-O3 | release only | Instructs GCC to apply the highest level of optimization, improving runtime performance |
-s | release only | Strips the symbol table and debug information from the binary, reducing file size |
Source files
The Makefile compiles the following source files in every build:include/ and are automatically found because of the -Iinclude flag.