# # Duktape command line tool with debugger support. # DUKTAPE_SOURCES = prep/duktape.c # Windows (MinGW): use examples/debug-trans-socket/duk_trans_socket_windows.c # and link with -lws2_32. DUKTAPE_CMDLINE_SOURCES = \ examples/cmdline/duk_cmdline.c \ examples/debug-trans-socket/duk_trans_socket_unix.c CC = gcc CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer CCOPTS += -I./prep -I./examples/debug-trans-socket CCOPTS += -DDUK_CMDLINE_DEBUGGER_SUPPORT # enable --debugger in ./duk CCLIBS = -lm # Use tools/configure.py to prepare Duktape config header and sources with # custom configuration. duk: $(DUKTAPE_CMDLINE_SOURCES) @rm -rf prep python2 tools/configure.py \ --source-directory src-input \ --output-directory prep \ --config-metadata config \ -DDUK_USE_DEBUGGER_SUPPORT \ -DDUK_USE_INTERRUPT_COUNTER \ -DDUK_USE_DEBUGGER_DUMPHEAP \ -DDUK_USE_DEBUGGER_INSPECT $(CC) -o $@ $(DEFINES) $(CCOPTS) $(DUKTAPE_SOURCES) $(DUKTAPE_CMDLINE_SOURCES) $(CCLIBS)