|
|
@ -111,33 +111,10 @@ DUKTAPE_SOURCES = $(DUKTAPE_SOURCES_COMBINED) |
|
|
|
DUKTAPE_CMDLINE_SOURCES = \
|
|
|
|
$(DISTCMD)/duk_cmdline.c |
|
|
|
|
|
|
|
DUK_SHARED_LIBS_NONDEBUG = \
|
|
|
|
libduktape100.so.1.0.0 libduktape101.so.1.0.0 \
|
|
|
|
libduktape200.so.1.0.0 libduktape201.so.1.0.0 \
|
|
|
|
libduktape300.so.1.0.0 libduktape301.so.1.0.0 \
|
|
|
|
libduktape400.so.1.0.0 libduktape401.so.1.0.0 \
|
|
|
|
libduktape500.so.1.0.0 libduktape501.so.1.0.0 |
|
|
|
|
|
|
|
DUK_SHARED_LIBS_DEBUG = \
|
|
|
|
libduktape100d.so.1.0.0 libduktape101d.so.1.0.0 \
|
|
|
|
libduktape200d.so.1.0.0 libduktape201d.so.1.0.0 \
|
|
|
|
libduktape300d.so.1.0.0 libduktape301d.so.1.0.0 \
|
|
|
|
libduktape400d.so.1.0.0 libduktape401d.so.1.0.0 \
|
|
|
|
libduktape500d.so.1.0.0 libduktape501d.so.1.0.0 |
|
|
|
|
|
|
|
DUK_CMDLINE_TOOLS_NONDEBUG = \
|
|
|
|
duk.100 duk.101 \
|
|
|
|
duk.200 duk.201 \
|
|
|
|
duk.300 duk.301 \
|
|
|
|
duk.400 duk.401 \
|
|
|
|
duk.500 duk.501 |
|
|
|
|
|
|
|
DUK_CMDLINE_TOOLS_DEBUG = \
|
|
|
|
duk.100d duk.101d \
|
|
|
|
duk.200d duk.201d \
|
|
|
|
duk.300d duk.301d \
|
|
|
|
duk.400d duk.401d \
|
|
|
|
duk.500d duk.501d |
|
|
|
DUK_SHARED_LIBS_NONDEBUG = libduktape.so.1.0.0 libduktapep.so.1.0.0 |
|
|
|
DUK_SHARED_LIBS_DEBUG = libduktaped.so.1.0.0 libduktapepd.so.1.0.0 |
|
|
|
DUK_CMDLINE_TOOLS_NONDEBUG = duk dukp |
|
|
|
DUK_CMDLINE_TOOLS_DEBUG = dukd dukpd |
|
|
|
|
|
|
|
# Compiler setup for Linux
|
|
|
|
CC = gcc |
|
|
@ -150,6 +127,8 @@ CCOPTS_SHARED += -DDUK_OPT_DPRINT_COLORS |
|
|
|
#CCOPTS_SHARED += -DDUK_OPT_NO_FILE_IO
|
|
|
|
#CCOPTS_SHARED += '-DDUK_PANIC_HANDLER(code,msg)={printf("*** %d:%s\n",(code),(msg));abort();}'
|
|
|
|
CCOPTS_SHARED += -DDUK_OPT_SELF_TESTS |
|
|
|
#CCOPTS_SHARED += -DDUK_OPT_NO_TRACEBACKS
|
|
|
|
#CCOPTS_SHARED += -DDUK_OPT_NO_VERBOSE_ERRORS
|
|
|
|
CCOPTS_NONDEBUG = $(CCOPTS_SHARED) -Os -fomit-frame-pointer |
|
|
|
CCOPTS_DEBUG = $(CCOPTS_SHARED) -O0 -g -ggdb |
|
|
|
CCLIBS = -lm |
|
|
@ -157,22 +136,11 @@ CCLIBS += -lreadline |
|
|
|
CCLIBS += -lncurses # on some systems -lreadline also requires -lncurses (e.g. RHEL) |
|
|
|
.PHONY: default all clean test install |
|
|
|
|
|
|
|
default: all64 |
|
|
|
|
|
|
|
all32: $(DUK_CMDLINE_TOOLS_NONDEBUG) \ |
|
|
|
all: $(DUK_CMDLINE_TOOLS_NONDEBUG) \ |
|
|
|
$(DUK_CMDLINE_TOOLS_DEBUG) \
|
|
|
|
$(DUK_SHARED_LIBS_NONDEBUG) \
|
|
|
|
$(DUK_SHARED_LIBS_DEBUG) |
|
|
|
|
|
|
|
all64: duk.400 duk.401 \ |
|
|
|
duk.400d duk.401d \
|
|
|
|
duk.500 duk.501 \
|
|
|
|
duk.500d duk.501d \
|
|
|
|
libduktape400.so.1.0.0 libduktape401.so.1.0.0 \
|
|
|
|
libduktape400d.so.1.0.0 libduktape401d.so.1.0.0 \
|
|
|
|
libduktape500.so.1.0.0 libduktape501.so.1.0.0 \
|
|
|
|
libduktape500d.so.1.0.0 libduktape501d.so.1.0.0 |
|
|
|
|
|
|
|
clean: |
|
|
|
-@rm -rf dist/ |
|
|
|
-@rm -rf full/ |
|
|
@ -187,32 +155,32 @@ clean: |
|
|
|
|
|
|
|
$(DUK_SHARED_LIBS_NONDEBUG): dist |
|
|
|
-rm -f $(subst .so.1.0.0,.so.1,$@) $(subst .so.1.0.0,.so.1.0.0,$@) $(subst .so.1.0.0,.so,$@) |
|
|
|
$(CC) -o $@ -shared -Wl,-soname,$(subst .so.1.0.0,.so.1,$@) -fPIC -DDUK_PROFILE=$(subst d,,$(subst .so.1.0.0,,$(subst libduktape,,$@))) $(CCOPTS_NONDEBUG) $(DUKTAPE_SOURCES) $(CCLIBS) |
|
|
|
$(CC) -o $@ -shared -Wl,-soname,$(subst .so.1.0.0,.so.1,$@) -fPIC $(CCOPTS_NONDEBUG) $(DUKTAPE_SOURCES) $(CCLIBS) |
|
|
|
ln -s $@ $(subst .so.1.0.0,.so.1,$@) |
|
|
|
ln -s $@ $(subst .so.1.0.0,.so,$@) |
|
|
|
|
|
|
|
$(DUK_SHARED_LIBS_DEBUG): dist |
|
|
|
-rm -f $(subst .so.1.0.0,.so.1,$@) $(subst .so.1.0.0,.so.1.0.0,$@) $(subst .so.1.0.0,.so,$@) |
|
|
|
$(CC) -o $@ -shared -Wl,-soname,$(subst .so.1.0.0,.so.1,$@) -fPIC -DDUK_PROFILE=$(subst d,,$(subst .so.1.0.0,,$(subst libduktape,,$@))) $(CCOPTS_DEBUG) $(DUKTAPE_SOURCES) $(CCLIBS) |
|
|
|
$(CC) -o $@ -shared -Wl,-soname,$(subst .so.1.0.0,.so.1,$@) -fPIC $(CCOPTS_DEBUG) $(DUKTAPE_SOURCES) $(CCLIBS) |
|
|
|
ln -s $@ $(subst .so.1.0.0,.so.1,$@) |
|
|
|
ln -s $@ $(subst .so.1.0.0,.so,$@) |
|
|
|
|
|
|
|
$(DUK_CMDLINE_TOOLS_NONDEBUG): dist |
|
|
|
$(CC) -o $@ -DDUK_PROFILE=$(subst d,,$(subst duk.,,$@)) $(CCOPTS_NONDEBUG) $(DUKTAPE_SOURCES) $(DUKTAPE_CMDLINE_SOURCES) $(CCLIBS) |
|
|
|
$(CC) -o $@ $(CCOPTS_NONDEBUG) $(DUKTAPE_SOURCES) $(DUKTAPE_CMDLINE_SOURCES) $(CCLIBS) |
|
|
|
|
|
|
|
$(DUK_CMDLINE_TOOLS_DEBUG): dist |
|
|
|
$(CC) -o $@ -DDUK_PROFILE=$(subst d,,$(subst duk.,,$@)) $(CCOPTS_DEBUG) $(DUKTAPE_SOURCES) $(DUKTAPE_CMDLINE_SOURCES) $(CCLIBS) |
|
|
|
$(CC) -o $@ $(CCOPTS_DEBUG) $(DUKTAPE_SOURCES) $(DUKTAPE_CMDLINE_SOURCES) $(CCLIBS) |
|
|
|
|
|
|
|
test: npminst duk.400 |
|
|
|
node runtests/runtests.js --run-duk --cmd-duk=$(shell pwd)/duk.400 --run-nodejs --run-rhino --num-threads 8 --log-file=/tmp/duk-test.log ecmascript-testcases/ |
|
|
|
test: npminst duk |
|
|
|
node runtests/runtests.js --run-duk --cmd-duk=$(shell pwd)/duk --run-nodejs --run-rhino --num-threads 8 --log-file=/tmp/duk-test.log ecmascript-testcases/ |
|
|
|
|
|
|
|
qtest: npminst duk.400 |
|
|
|
node runtests/runtests.js --run-duk --cmd-duk=$(shell pwd)/duk.400 --num-threads 16 --log-file=/tmp/duk-test.log ecmascript-testcases/ |
|
|
|
qtest: npminst duk |
|
|
|
node runtests/runtests.js --run-duk --cmd-duk=$(shell pwd)/duk --num-threads 16 --log-file=/tmp/duk-test.log ecmascript-testcases/ |
|
|
|
|
|
|
|
vgtest: npminst duk.400 |
|
|
|
node runtests/runtests.js --run-duk --cmd-duk=$(shell pwd)/duk.400 --num-threads 1 --test-sleep 30 --log-file=/tmp/duk-vgtest.log --valgrind --verbose ecmascript-testcases/ |
|
|
|
vgtest: npminst duk |
|
|
|
node runtests/runtests.js --run-duk --cmd-duk=$(shell pwd)/duk --num-threads 1 --test-sleep 30 --log-file=/tmp/duk-vgtest.log --valgrind --verbose ecmascript-testcases/ |
|
|
|
|
|
|
|
apitest: npminst libduktape400.so.1.0.0 |
|
|
|
apitest: npminst libduktape.so.1.0.0 |
|
|
|
node runtests/runtests.js --num-threads 1 --log-file=/tmp/duk-api-test.log api-testcases/ |
|
|
|
|
|
|
|
# FIXME: torturetest; torture + valgrind
|
|
|
|