A vertical slice of real libuv integration.
This adds a "timer" module to the CLI that provides a Timer class with a static sleep() method. Not the most exciting functionality in the world, but it requires the full hunk of libuv integration: - The CLI sets up libuv and runs the event loop. - Added a new directory src/module for CLI modules. - Updated all the make scripts to handle it. - Reorganized some other CLI code.
This commit is contained in:
@@ -4,15 +4,15 @@
|
||||
|
||||
# Executables are built to bin/. Libraries are built to lib/.
|
||||
|
||||
LIB_UV := build/libuv/build/Release/libuv.a
|
||||
LIBUV := build/libuv/build/Release/libuv.a
|
||||
|
||||
# A normal, optimized release build for the current CPU architecture.
|
||||
release: $(LIB_UV)
|
||||
release: $(LIBUV)
|
||||
@ $(MAKE) -f script/wren.mk
|
||||
@ cp bin/wren wren # For convenience, copy the interpreter to the top level.
|
||||
|
||||
# A debug build for the current architecture.
|
||||
debug: $(LIB_UV)
|
||||
debug: $(LIBUV)
|
||||
@ $(MAKE) -f script/wren.mk MODE=debug
|
||||
|
||||
# A release build of just the VM. Does not require libuv.
|
||||
@@ -33,7 +33,7 @@ all: debug release
|
||||
@ $(MAKE) -f script/wren.mk MODE=debug LANG=cpp ARCH=64
|
||||
|
||||
# Download and build libuv to a static library.
|
||||
$(LIB_UV): script/libuv.py
|
||||
$(LIBUV): script/libuv.py
|
||||
@ ./script/libuv.py
|
||||
|
||||
# Remove all build outputs and intermediate files.
|
||||
|
||||
Reference in New Issue
Block a user