Updated Toy, fixed build process
This commit is contained in:
2
Toy
2
Toy
Submodule Toy updated: 501ff6fff4...1668dca255
14
box/makefile
14
box/makefile
@@ -8,7 +8,7 @@ ODIR = obj
|
|||||||
SRC = $(wildcard *.c)
|
SRC = $(wildcard *.c)
|
||||||
OBJ = $(addprefix $(ODIR)/,$(SRC:.c=.o))
|
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
|
OUTNAME=box
|
||||||
|
|
||||||
@@ -27,15 +27,15 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
library: libs $(OBJ)
|
library: repllibs $(OBJ)
|
||||||
$(CC) -DBOX_EXPORT $(CFLAGS) -shared -o $(OUT) $(LIBLINE) -L../$(LIBDIR) $(LIBS)
|
$(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)
|
ar crs $(BOX_OUTDIR)/lib$(OUTNAME).a $(OBJ) -L../$(LIBDIR) $(LIBS)
|
||||||
|
|
||||||
#copy the stuff from Toy/repl that is needed
|
#copy the stuff from Toy/repl that is needed
|
||||||
libs:
|
repllibs:
|
||||||
cp $(TOYLIBS) .
|
cp $(REPLLIBS) .
|
||||||
|
|
||||||
$(OBJ): | $(ODIR)
|
$(OBJ): | $(ODIR)
|
||||||
|
|
||||||
@@ -47,5 +47,5 @@ $(ODIR)/%.o: %.c
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
clean-libs:
|
clean-repllibs:
|
||||||
$(RM) $(notdir $(TOYLIBS))
|
$(RM) $(notdir $(REPLLIBS))
|
||||||
@@ -94,7 +94,7 @@ const unsigned char* Toy_compileString(const char* source, size_t* size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//get the bytecode dump
|
//get the bytecode dump
|
||||||
const unsigned char* tb = Toy_collateCompiler(&compiler, (int*)(size));
|
const unsigned char* tb = Toy_collateCompiler(&compiler, size);
|
||||||
|
|
||||||
//cleanup
|
//cleanup
|
||||||
Toy_freeCompiler(&compiler);
|
Toy_freeCompiler(&compiler);
|
||||||
|
|||||||
Reference in New Issue
Block a user