diff --git a/Makefile b/Makefile index 2b00bb8..f4df9f6 100644 --- a/Makefile +++ b/Makefile @@ -24,18 +24,18 @@ opnames.h : jscompile.h jsdump.c : astnames.h opnames.h +one.c : $(SRCS) + ls $(SRCS) | awk '{print "#include \""$$1"\""}' > $@ + js: build/main.o build/libjs.a $(CC) -o $@ $^ -lm +jsone: build/main.o build/one.o + $(CC) -o $@ $^ -lm + re: regex.c utf.c utftype.c $(CC) $(CFLAGS) -DTEST -o $@ $^ -libjs.c : $(SRCS) - ls $(SRCS) | awk '{print "#include \""$$1"\""}' > $@ - -jsone: build/main.o build/libjs.o - $(CC) $(CFLAGS) -o $@ $^ -lm - tags: $(SRCS) main.c $(HDRS) ctags $^ @@ -43,6 +43,6 @@ test: js python tests/sputniktests/tools/sputnik.py --tests=tests/sputniktests --command ./js --summary clean: - rm -f astnames.h opnames.h libjs.c build/* js + rm -f astnames.h opnames.h one.c build/* js .PHONY: default test clean diff --git a/one.c b/one.c new file mode 100644 index 0000000..0baed89 --- /dev/null +++ b/one.c @@ -0,0 +1,25 @@ +#include "jsarray.c" +#include "jsboolean.c" +#include "jsbuiltin.c" +#include "jscompile.c" +#include "jsdate.c" +#include "jsdump.c" +#include "jserror.c" +#include "jsfunction.c" +#include "jsgc.c" +#include "jsintern.c" +#include "jslex.c" +#include "jsmath.c" +#include "jsnumber.c" +#include "jsobject.c" +#include "json.c" +#include "jsparse.c" +#include "jsproperty.c" +#include "jsregexp.c" +#include "jsrun.c" +#include "jsstate.c" +#include "jsstring.c" +#include "jsvalue.c" +#include "regex.c" +#include "utf.c" +#include "utftype.c"