From 0d83e44cc1b40213ebb440b04f6cfce720367fa6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 11 Feb 2014 13:54:28 +0100 Subject: [PATCH] Add "jsone" makefile target. Compile all files concatenated as one compilation unit. Speeds up interpreter significantly, due to cross-unit inlining opportunities. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 22092de..861e3d9 100644 --- a/Makefile +++ b/Makefile @@ -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