This change appends the -g flag to the DEBUG_CFLAGS variable, enabling debug symbols when compiling with DEBUG mode. This improves debugging experience under GDB and LLDB by providing source-level information such as variable names, line numbers, and function signatures.
Add `libwren.a` and `libwrend.a` static library targets that exclude `main.o`, compile all objects with `-fPIC`, and link the interpreter binaries against the archives instead of individual objects.
Add static `IO.read(prompt)` method to the IO class that writes the prompt to stdout
and reads a line from stdin into a 1024-byte buffer. The C implementation uses
`fgets` for input and returns the string via `wrenReturnString`. The Wren wrapper
calls `IO.write` for the prompt before delegating to the native `IO.read` method.
Reorder the `-lm` flag from before the output file to after the object file list
in both debug (`wrend`) and release (`wren`) linker commands. This fixes linking
errors with `gcc` which requires libraries to follow the objects that reference
them, while `clang` is unaffected by the flag position.
The getline function's return value was previously ignored, causing gcc to emit a
warning that was treated as an error during build. This commit captures the return
value in a ssize_t variable and adds a check for -1 (indicating read failure) to
the existing feof(stdin) condition, ensuring both EOF and error conditions are
properly handled.