mirror of
https://github.com/ccxvii/mujs.git
synced 2026-09-21 14:43:34 +08:00
Add "jsone" makefile target.
Compile all files concatenated as one compilation unit. Speeds up interpreter significantly, due to cross-unit inlining opportunities.
This commit is contained in:
@@ -26,6 +26,12 @@ jsdump.c : astnames.h opnames.h
|
||||
js: build/main.o build/libjs.a
|
||||
$(CC) -o $@ $^ -lm
|
||||
|
||||
libjs.c : $(SRCS)
|
||||
ls $(SRCS) | awk '{print "#include \""$$1"\""}' > $@
|
||||
|
||||
jsone: build/main.o build/libjs.o
|
||||
$(CC) -o $@ $^ -lm
|
||||
|
||||
tags: $(SRCS) main.c $(HDRS)
|
||||
ctags $^
|
||||
|
||||
@@ -33,6 +39,6 @@ test: js
|
||||
python tests/sputniktests/tools/sputnik.py --tests=tests/sputniktests --command ./js --summary
|
||||
|
||||
clean:
|
||||
rm -f astnames.h opnames.h build/* js
|
||||
rm -f astnames.h opnames.h libjs.c build/* js
|
||||
|
||||
.PHONY: default test clean
|
||||
|
||||
Reference in New Issue
Block a user