Skip to content

Commit db2a8b1

Browse files
committed
Add print() etc to Makefile.dukdebug
1 parent af2463b commit db2a8b1

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

dist-files/Makefile.dukdebug

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DUKTAPE_SOURCES = prep/duktape.c
66

77
# Windows (MinGW): use examples/debug-trans-socket/duk_trans_socket_windows.c
88
# and link with -lws2_32.
9-
DUKTAPE_CMDLINE_SOURCES = \
9+
CMDLINE_SOURCES = \
1010
examples/cmdline/duk_cmdline.c \
1111
examples/debug-trans-socket/duk_trans_socket_unix.c
1212

@@ -16,9 +16,19 @@ CCOPTS += -I./prep -I./examples/debug-trans-socket
1616
CCOPTS += -DDUK_CMDLINE_DEBUGGER_SUPPORT # enable --debugger in ./duk
1717
CCLIBS = -lm
1818

19+
# Enable a few optional modules.
20+
CCOPTS += -DDUK_CMDLINE_PRINTALERT_SUPPORT -I./extras/print-alert
21+
CMDLINE_SOURCES += extras/print-alert/duk_print_alert.c
22+
CCOPTS += -DDUK_CMDLINE_CONSOLE_SUPPORT -I./extras/console
23+
CMDLINE_SOURCES += extras/console/duk_console.c
24+
CCOPTS += -DDUK_CMDLINE_LOGGING_SUPPORT -I./extras/logging
25+
CMDLINE_SOURCES += extras/logging/duk_logging.c
26+
CCOPTS += -DDUK_CMDLINE_MODULE_SUPPORT -I./extras/module-duktape
27+
CMDLINE_SOURCES += extras/module-duktape/duk_module_duktape.c
28+
1929
# Use tools/configure.py to prepare Duktape config header and sources with
2030
# custom configuration.
21-
duk: $(DUKTAPE_CMDLINE_SOURCES)
31+
duk: $(CMDLINE_SOURCES)
2232
@rm -rf prep
2333
python2 tools/configure.py \
2434
--source-directory src-input \
@@ -28,4 +38,4 @@ duk: $(DUKTAPE_CMDLINE_SOURCES)
2838
-DDUK_USE_INTERRUPT_COUNTER \
2939
-DDUK_USE_DEBUGGER_DUMPHEAP \
3040
-DDUK_USE_DEBUGGER_INSPECT
31-
$(CC) -o $@ $(DEFINES) $(CCOPTS) $(DUKTAPE_SOURCES) $(DUKTAPE_CMDLINE_SOURCES) $(CCLIBS)
41+
$(CC) -o $@ $(DEFINES) $(CCOPTS) $(DUKTAPE_SOURCES) $(CMDLINE_SOURCES) $(CCLIBS)

0 commit comments

Comments
 (0)