Commit Graph
3 Commits
Author SHA1 Message Date
Paul Woolcock 820faaa6b5 feat: separate library and binary builds with static archive targets
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.
2015-01-02 19:59:52 +00:00
Paul Woolcock 361e911897 fix: move -lm linker flag after object files in Makefile
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.
2015-01-02 13:10:46 +00:00
Paul Woolcock 7c25b4e187 fix: check getline return value to suppress gcc warning and fix build failure
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.
2015-01-02 13:10:03 +00:00