diff --git a/Toy b/Toy index 501ff6f..1668dca 160000 --- a/Toy +++ b/Toy @@ -1 +1 @@ -Subproject commit 501ff6fff45b4cd669eefbf4d6f3414d25f5b115 +Subproject commit 1668dca2550aa3a9c6553a250c8604fcc260eb9e diff --git a/box/makefile b/box/makefile index c8d18ea..75dbbb9 100644 --- a/box/makefile +++ b/box/makefile @@ -8,7 +8,7 @@ ODIR = obj SRC = $(wildcard *.c) OBJ = $(addprefix $(ODIR)/,$(SRC:.c=.o)) -TOYLIBS = $(wildcard ../Toy/repl/lib*) $(wildcard ../Toy/repl/repl_tools.*) +REPLLIBS = $(wildcard ../Toy/repl/lib*) $(wildcard ../Toy/repl/repl_tools.*) OUTNAME=box @@ -27,15 +27,15 @@ else exit 1 endif -library: libs $(OBJ) +library: repllibs $(OBJ) $(CC) -DBOX_EXPORT $(CFLAGS) -shared -o $(OUT) $(LIBLINE) -L../$(LIBDIR) $(LIBS) -static: libs $(OBJ) +static: repllibs $(OBJ) ar crs $(BOX_OUTDIR)/lib$(OUTNAME).a $(OBJ) -L../$(LIBDIR) $(LIBS) #copy the stuff from Toy/repl that is needed -libs: - cp $(TOYLIBS) . +repllibs: + cp $(REPLLIBS) . $(OBJ): | $(ODIR) @@ -47,5 +47,5 @@ $(ODIR)/%.o: %.c .PHONY: clean -clean-libs: - $(RM) $(notdir $(TOYLIBS)) \ No newline at end of file +clean-repllibs: + $(RM) $(notdir $(REPLLIBS)) \ No newline at end of file diff --git a/box/repl_tools.c b/box/repl_tools.c index 141ba4d..2d13715 100644 --- a/box/repl_tools.c +++ b/box/repl_tools.c @@ -94,7 +94,7 @@ const unsigned char* Toy_compileString(const char* source, size_t* size) { } //get the bytecode dump - const unsigned char* tb = Toy_collateCompiler(&compiler, (int*)(size)); + const unsigned char* tb = Toy_collateCompiler(&compiler, size); //cleanup Toy_freeCompiler(&compiler); diff --git a/makefile b/makefile index 067ef82..6389a3c 100644 --- a/makefile +++ b/makefile @@ -20,7 +20,8 @@ toy: $(LIBDIR) $(MAKE) -j8 -C Toy/source box: $(LIBDIR) - $(MAKE) -j8 -C box + $(MAKE) -j8 -C box repllibs + $(MAKE) -j8 -C box library $(OUTDIR): mkdir $(OUTDIR)