Browse Source

makefile tweaks: add -lncurses whenever -lreadline occurs, because readline requires ncurses on some systems (e.g. RHEL)

pull/1/head
Sami Vaarala 11 years ago
parent
commit
7bc480d8c1
  1. 6
      Makefile
  2. 4
      examples/Makefile.cmdline
  3. 3
      examples/Makefile.example

6
Makefile

@ -143,11 +143,11 @@ CCOPTS_SHARED = -pedantic -ansi -std=c99 -Wall -fstrict-aliasing
CCOPTS_SHARED += -I./dist/src CCOPTS_SHARED += -I./dist/src
#CCOPTS_SHARED += -I./dist/src-separate #CCOPTS_SHARED += -I./dist/src-separate
#CCOPTS_SHARED += -m32 # force 32-bit compilation on a 64-bit host #CCOPTS_SHARED += -m32 # force 32-bit compilation on a 64-bit host
CCOPTS_SHARED += -I/usr/include/ncurses # for cmdline tool
CCOPTS_NONDEBUG = $(CCOPTS_SHARED) -Os -fomit-frame-pointer CCOPTS_NONDEBUG = $(CCOPTS_SHARED) -Os -fomit-frame-pointer
CCOPTS_DEBUG = $(CCOPTS_SHARED) -O0 -g -ggdb CCOPTS_DEBUG = $(CCOPTS_SHARED) -O0 -g -ggdb
CCLIBS = -lm CCLIBS = -lm
CCLIBS += -lreadline -lncurses # for cmdline tool CCLIBS += -lreadline
CCLIBS += -lncurses # on some systems -lreadline also requires -lncurses (e.g. RHEL)
.PHONY: default all clean test install .PHONY: default all clean test install
default: all64 default: all64
@ -203,7 +203,7 @@ 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/ node runtests/runtests.js --run-duk --cmd-duk=$(shell pwd)/duk.400 --num-threads 16 --log-file=/tmp/duk-test.log ecmascript-testcases/
vgtest: npminst duk.400 vgtest: npminst duk.400
node runtests/runtests.js --run-duk --cmd-duk=$(shell pwd)/duk.400 --num-threads 1 --log-file=/tmp/duk-vgtest.log --valgrind --verbose ecmascript-testcases/ 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/
apitest: npminst libduktape400.so.1.0.0 apitest: npminst libduktape400.so.1.0.0
node runtests/runtests.js --num-threads 1 --log-file=/tmp/duk-api-test.log api-testcases/ node runtests/runtests.js --num-threads 1 --log-file=/tmp/duk-api-test.log api-testcases/

4
examples/Makefile.cmdline

@ -16,6 +16,10 @@ CCLIBS = -lm
# For the command line tool # For the command line tool
CCLIBS += -lreadline CCLIBS += -lreadline
# On some platforms -lreadline also requires -lncurses (e.g. RHEL), so it is
# added by default (you may be able to remove it)
CCLIBS += -lncurses
# If you don't have readline, or something else fails to compile # If you don't have readline, or something else fails to compile
#CCOPTS += -DDUK_CMDLINE_BAREBONES #CCOPTS += -DDUK_CMDLINE_BAREBONES

3
examples/Makefile.example

@ -17,10 +17,11 @@ CC = gcc
CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer
CCOPTS += -I./src # for combined sources CCOPTS += -I./src # for combined sources
CCLIBS = -lm CCLIBS = -lm
DEFINES =
# These should not be needed but you might consider them # These should not be needed but you might consider them
#CCOPTS += -m32 # force 32-bit compilation on a 64-bit host #CCOPTS += -m32 # force 32-bit compilation on a 64-bit host
#DEFINES = -DDUK_PROFILE=100 # if omitted, profile defaults to 100 on a #DEFINES += -DDUK_PROFILE=100 # if omitted, profile defaults to 100 on a
# # 32-bit platform, and 400 otherwise # # 32-bit platform, and 400 otherwise
# For debugging, use -O0 -g -ggdb, and don't add -fomit-frame-pointer # For debugging, use -O0 -g -ggdb, and don't add -fomit-frame-pointer

Loading…
Cancel
Save