mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
964 B
30 lines
964 B
#
|
|
# Example Makefile for building a program with embedded Duktape.
|
|
# The example program here is the Duktape command line tool.
|
|
#
|
|
|
|
DUKTAPE_SOURCES = src/duktape.c
|
|
|
|
DUKTAPE_CMDLINE_SOURCES = \
|
|
examples/cmdline/duk_cmdline.c
|
|
|
|
CC = gcc
|
|
CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer
|
|
CCOPTS += -I./src # duktape.h and duk_config.h must be in include path
|
|
CCLIBS = -lm
|
|
|
|
# If you have readline, you may want to enable these. On some platforms
|
|
# -lreadline also requires -lncurses (e.g. RHEL), so it is added by default
|
|
# (you may be able to remove it)
|
|
#CCOPTS += -DDUK_CMDLINE_FANCY
|
|
#CCLIBS += -lreadline
|
|
#CCLIBS += -lncurses
|
|
|
|
# Optional feature defines, see: http://duktape.org/guide.html#compiling
|
|
CCOPTS += -DDUK_OPT_SELF_TESTS
|
|
#CCOPTS += -DDUK_OPT_DEBUG
|
|
#CCOPTS += -DDUK_OPT_DPRINT
|
|
# ...
|
|
|
|
duk: $(DUKTAPE_SOURCES) $(DUKTAPE_CMDLINE_SOURCES)
|
|
$(CC) -o $@ $(DEFINES) $(CCOPTS) $(DUKTAPE_SOURCES) $(DUKTAPE_CMDLINE_SOURCES) $(CCLIBS)
|
|
|